Module embedded_layout::align

source ·
Expand description

Alignment operations

Alignment operations are used to arrange two Views relative to each other. A single align_* call requires both a horizontal and a vertical alignment parameter.

The list of currently supported alignments:

  • horizontal
    • NoAlignment, Left, Center, Right
    • LeftToRight
    • RightToLeft
  • vertical
    • NoAlignment, Top, Center, Bottom
    • TopToBottom
    • BottomToTop

Alignment works by calling align_to or align_to_mut on an object that implements the Align trait. The call needs a second View to align to, called the reference View, and two alignment parameters. The second View will not be translated by the alignment operation.

Modules

Traits