Module termwiz::widgets::layout[][src]

This module provides some automatic layout functionality for widgets. The parameters are similar to those that you may have encountered in HTML, but do not fully recreate the layout model.

Structs

Constraints

Specifies the size constraints for a widget

Dimension

Specifies the extent of a width or height. The spec field holds the preferred size, while the minimum and maximum fields set optional lower and upper bounds.

LaidOutWidget
LayoutState

Holds state used to compute the layout of a tree of widgets

Enums

ChildOrientation

Specifies whether the children of a widget are laid out vertically (top to bottom) or horizontally (left to right). The default is horizontal.

DimensionSpec

Specify whether a width or a height has a preferred fixed size or whether it should occupy a percentage of its parent container. The default is 100% of the parent container.

HorizontalAlignment

Specifies whether the widget should be aligned to the left, center or right of the horizontal space in its parent. The default is Left.

VerticalAlignment

Specifies whether the widget should be aligned to the top, middle or bottom of the vertical space in its parent. The default is Top.