layout library
Layout definitions, computations, and utilities.
The coordinate system runs left-to-right on the x-axis and top-to-bottom on
the y-axis, with the origin Offset.zero at the top-left corner. The x
and y
coordinates are represented by int values and are generally listed
in the order (x, y)
.
(0, 0) -------------------------> x (columns)
|
|
|
|
|
|
|
v
y (rows)
Classes
- Constrained
- A layout that splits an area based on the provided constraints.
- Constraint
- A constraint that can be applied to a layout.
- Fixed
- A constraint that specifies a fixed size.
- FixedHeightRows
- A layout that splits an area into rows a defined height.
- FixedWidthColumns
- A layout that splits an area into columns of a defined width.
- Flexible
- A constraint that specifies a flexible size based on a weight.
- LayoutSpec
- A layout is a way to split an area into multiple sub-areas.
- Offset
- A 2D offset relative to the top left corner of a coordinate space.
- Rect
-
A rectangular area defined by its top-left corner
(x, y)
and dimensions. - Spacing
- Defines spacing insets for edges of a box.
Enums
- Axis
- An enum that represents the axis of a layout.
Extensions
- LayoutRect on Rect
- Provides a split for splitting areas into multiple sub-areas.