next up previous contents index
Next: 6. Fun and Pain Up: 3. Geometry Management and Previous: 10. The constraint_set_values() Method   Contents   Index

11. The Geometry Management Helper Interfaces

There are two sets of two basic functions, that roughly have the following signatures. First, the ones for primitives:


PreferredSize( Widget w °/* input */° );
Layout( Widget w °/* input with side effects */° );

and for composites:


PreferredSize( Widget w,                         °/* input */°
               Widget instig,                    °/* input */°
               XtWidgetGeometry *instig_request, °/* input */°
               XtWidgetGeometry *preferred_geom  °/* output */° );

Layout( Widget w,                         °/* input */°
        Widget instig,                    °/* input */°
        XtWidgetGeometry *instig_request, °/* input/output */°
        XtWidgetGeometry *preferred_geom  °/* input */° );

For primitives, an example of the function to calculate the preferred size is XmCalcLabelDimensions(). The equivalent layout procedure would be the resize() method. Regardless, your layout function or preferred-size function can be modified for different behavior as appropriate to your class.



Danny Backx
2000-12-13