Enum cursive_core::direction::Absolute
source · pub enum Absolute {
Left,
Up,
Right,
Down,
None,
}
Expand description
Absolute direction (up, down, left, right).
Variants§
Left
Left
Up
Up
Right
Right
Down
Down
None
No real direction.
Used when the “direction” is accross layers for instance.
Implementations§
source§impl Absolute
impl Absolute
sourcepub fn relative(self, orientation: Orientation) -> Option<Relative>
pub fn relative(self, orientation: Orientation) -> Option<Relative>
Returns the relative direction for the given orientation.
Returns None
when the direction does not apply to the given
orientation (ex: Left
and Vertical
).
sourcepub fn split(self) -> (Orientation, Relative)
pub fn split(self) -> (Orientation, Relative)
Splits this absolute direction into an orientation and relative direction.
For example, Right
will give (Horizontal, Back)
.