cacao/src/progress/enums.rs
2022-07-15 16:14:02 +02:00

21 lines
445 B
Rust

use crate::foundation::NSUInteger;
/// The type of spinner style you're after.
#[derive(Debug)]
pub enum ProgressIndicatorStyle {
/// A loading bar.
Bar,
/// A spinning circle.
Spinner
}
impl From<ProgressIndicatorStyle> for NSUInteger {
fn from(style: ProgressIndicatorStyle) -> Self {
match style {
ProgressIndicatorStyle::Bar => 0,
ProgressIndicatorStyle::Spinner => 1
}
}
}