[SF] Layout Support
Last updated at 11:08 pm UTC on 14 October 2008
SmallFaces offers a minimal layout support. It implements two types of layout:
- To accommodate the widgets and their labels called label layout
- In composite widgets, to accommodate their children called children layout.
The Label Layout
The SmallFaces widgtes can accommodate their labels in several ways. For that purpose they use SFLabelLayout (#labelLayout:). Currently we've implemented the following label layouts:
- SFFrontLabelLayout: render the label first and then the control after.
- SFBackLabelLayout: render the control first and then its label after.
- SFTopBottomLabelLayout: render the label first and the control below.
The Children Layout
The composite widgets can distribute their children in several ways. For that purpose they use SFChildrenLayout (#childrenLayout:). Currently we've implemented the following children layouts:
- SFNullChildrenLayout: distributes the control subpanes one followed by another, without adding anything in between.
- SFTableChildrenLayout:distributes the control subpanes in a table. You can configure the number of columns in which you want to distribute the subpanes. The number of rows depends on the amount of subpanes and the number of columns previously configured.
- SFTopBottomChildrenLayou: distributes the control subpanes one below the other