[−][src]Module kas::layout
Layout solver
Size units are physical (real) pixels. This applies to most of KAS.
Data types
SizeRules
is the "heart" of widget layout, used to specify a widget's
size requirements. It provides various methods to compute derived rules
and SizeRules::solve_seq
, the "muscle" of the layout engine.
AxisInfo
, Margins
and StretchPolicy
are auxilliary data types.
Layout engines
The RulesSolver
and RulesSetter
traits define interfaces for
layout engines:
SingleSolver
andSingleSetter
are trivial implementations for single-child parentsRowSolver
andRowSetter
set out a row or column of children. These are parametrised overS: RowStorage
allowing both efficient operation on a small fixed number of children withFixedRowStorage
and operation on a over aVec
withDynRowStorage
.GridSolver
andGridSetter
set out children assigned to grid cells with optional cell-spans. This is the most powerful and flexible layout engine.
RowPositionSolver
may be used with widgets set out by RowSetter
to quickly locate children from a coord
or rect
.
Structs
AxisInfo | Information on which axis is being resized |
DynGridStorage | Variable-length grid storage |
DynRowStorage | Variable-length row storage |
FixedGridStorage | Fixed-length grid storage |
FixedRowStorage | Fixed-length row storage |
GridChildInfo | Per-child information |
GridSetter | A |
GridSolver | A |
Margins | Margin sizes |
RowPositionSolver | Allows efficient implementations of |
RowSetter | A |
RowSolver | A |
SingleSetter |
|
SingleSolver |
|
SizeRules | Widget sizing information |
SolveCache | Size solver |
Enums
StretchPolicy | Policy for stretching widgets beyond ideal size |
Traits
GridStorage | Requirements of grid solver storage type |
RowStorage | Requirements of row solver storage type |
RowTemp | Temporary storage type. |
RulesSetter | Resolves a |
RulesSolver | A |
Storage | Master trait over storage types |