next up previous contents index
Next: 1. The initialize() Method Up: 5. Messy Geometry Management Previous: 2. The LessTif Way   Contents   Index

3. Geometry Management and the Widget Methods

The basic cycle involved is:
\begin{itemlist}
\item[\circled{1}] Calculate your \emph{preferred size}.
\item[...
...Request()}}.
\item[\circled{3}] Run your \emph{layout} procedure.
\end{itemlist}

For both primitives and composites, all the following rules for geometry management apply, except where otherwise stated. The rules mentioned in the subsections for the geometry_manager(), change_managed(), insert_child() and delete_child() methods apply only to composites. For Constraint widgets (and descendants), you should watch the rules mentioned for the constraint_initialize() and constraint_set_values() methods.

Just another note: if you have a composite widget, and this widget has either no children, or it doesn't has managed children (by the way, _XmGeoCount_kids() will return zero in the second case, but the GeoUtils are described in more detail in the next chapter), then you probably shouldn't bother in either method to compute the preferred size or the layout - mostly because you don't have anything to operate on. Instead you should probably return the current geometry in query_geometry().



Subsections
next up previous contents index
Next: 1. The initialize() Method Up: 5. Messy Geometry Management Previous: 2. The LessTif Way   Contents   Index
Danny Backx
2000-12-13