orbtk_utils/text_alignment.rs
1/// Used to align a text.
2#[derive(Clone, Copy, Debug, PartialEq)]
3pub enum TextAlignment {
4 Left,
5 Right,
6 Center,
7 Start,
8 End,
9}
10
11impl ToString for TextAlignment {
12 fn to_string(&self) -> String {
13 match self {
14 TextAlignment::Left => "left".to_string(),
15 TextAlignment::Right => "right".to_string(),
16 TextAlignment::Center => "center".to_string(),
17 TextAlignment::Start => "start".to_string(),
18 TextAlignment::End => "end".to_string(),
19 }
20 }
21}