- Each column's <i>actual width</i> is set to the maximum
- <i>minimum width</i> of all the cells in that column.
- <b>NOTE:</b> although a column or row can be sized smaller
- than its "minimum width" or larger than its "maximum width", a
- box will <i>never</i> be smaller than its <t>minwidth</t> or
- larger than its <t>maxwidth</t>.
-
- Each column's maximum width is the largest maximum width of
- the cells in that column, but no smaller than the column's
- minimum width.
-
- A value <t>k</t> is chosen such that when each column's width
- is set to <t>min(maximum width, max(minimum width, k))</t>,
- the sum of all the column widths equals the parent's width.
- If no such value exists, positive or negative infinity is used
- (whichever is appropriate). Each column is then set to the
- width dictated by <t>k</t>.
-
- Next, the rows and columns are positioned within the parent
- box. The rows and columns are transformed according to the
- parent's <t>transform</t> property [<i>Note: Vector Graphics
- support (including the <t>transform</t> property) is currently
- not implemented</i>]., and the bounding box of the resulting
- cells are placed such that the cells' alignment point
- coincides with the parent's alignment point (both alignment
- points are determined by the parent's <t>align</t> property).
-
- <image url="grid.pdf" caption="Positioning grid cells"/>
+ <heading title="Non-Packed Boxes"/>
+
+ Each non-packed box is transformed according to the parent's
+ [[transform]] property and then positioned so that its alignment
+ point is [[(child.x, child.y)]] pixels from the corresponding
+ edge/corner/center of its parent.
+
+ <heading title="Packed Boxes"/>
+
+ Ibex formulates a set of constraints for placing a box's
+ **packed** children as follows:
+
+ <list>
+ - A box's width can be no greater than the sum of the
+ columns it occupies
+ - The sum of a set of colums cannot be smaller than the
+ minimum width of a box that spans them.
+ - The sum of the widths of the parents' columns will be at
+ least as large as the parent's width is (but possibly
+ larger).
+ </list>
+
+ Subject to these two unbreakable constraints, Ibex searches for
+ a solution which will optimize the following three goals,
+ prioritized from most important to least important:
+
+ <list>
+ - (__Most Important__) The sum of all columns will be a close
+ to the parent's with as possible (ie as small as possible)
+ - Ibex will attempt to make a set of columns no wider than
+ the [[maxwidth]] of a box spanning them.
+ - (__Least Important__) Ibex will attempt to make all
+ columns the same width.
+ </list>
+
+ Each packed box is then placed within the set of cells that it
+ spans. Usually the box will exactly fill this rectangle; if it
+ does not (due to [[maxwidth]] or minimum width constraints), the
+ box's will be placed so that its alignment point coincides with
+ the alignment point of that rectangle of cells.