Module cursive_core::direction
source · [−]Expand description
Direction-related structures.
This module defines two main concepts: Orientation and Direction.
Orientation
Orientation is a simple enum that can take two values:
Horizontal or Vertical.
Direction
Direction is a bit more complex, and can be of two kinds:
-
Absolute direction: left, up, right, or down
-
Relative direction: front or back. Its actual direction depends on the orientation.
Usually, “front” refers to the “forward” direction, or the “next” element. For example, for a vertical
LinearLayout, “front” would refer to the “down” direction.This is mostly relevant when referring to change of focus. Hitting the
Tabkey would usually cycle focus in the “front” direction, while using the arrow keys would use absolute directions instead.
Enums
Absolute direction (up, down, left, right).
Represents a direction, either absolute or orientation-dependent.
Describes a vertical or horizontal orientation for a view.
Direction relative to an orientation.