iced-yoda/core/src/align.rs

39 lines
718 B
Rust
Raw Normal View History

2019-11-23 12:00:50 +01:00
/// Alignment on an axis of a container.
2019-09-20 19:15:31 +02:00
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Align {
2019-11-23 12:00:50 +01:00
/// Align at the start of the axis.
2019-09-20 19:15:31 +02:00
Start,
2019-11-23 12:00:50 +01:00
/// Align at the center of the axis.
2019-09-20 19:15:31 +02:00
Center,
2019-11-23 12:00:50 +01:00
/// Align at the end of the axis.
2019-09-20 19:15:31 +02:00
End,
}
/// The horizontal alignment of some resource.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum HorizontalAlignment {
/// Align left
Left,
/// Horizontally centered
Center,
/// Align right
Right,
}
/// The vertical alignment of some resource.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum VerticalAlignment {
/// Align top
Top,
/// Vertically centered
Center,
/// Align bottom
Bottom,
}