[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide

Manager Widgets and Their Children

Each Primitive widget has resources that determine its layout or contents. For example, the size of a Text widget depends on the values of the XmNrows, XmNcolumns, XmNmarginHeight, and XmNmarginWidth Text resources; the XmNhighlightThickness and XmNshadowThickness Primitive resources; and the basic Core geometry resources. In addition, when the Text XmNresizeHeight or XmNresizeWidth resource is True, the size of the widget can depend on the size of the text (the XmNvalue resource). Setting any of these resources can cause Text to generate a geometry request.

Manager widgets have their own layout policies, which they use in responding to geometry requests from their children or to resizing by their parents. These policies are determined by the Manager's own resources and, for some Managers, by its constraint resources.

Constraints are resources defined by the Manager but associated with each child. An application or user initializes, sets, or gets constraint resources for the child as if they were resources defined by the child's class. Initialization, XtSetValues, and XtGetValues for the child operate on the parent's constraint resources associated with that child. The Manager has constraint initialize and set_values procedures that allow it to set other constraints and recompute its layout.

Motif uses constraints in determining the layout of Form, PanedWindow, and Frame widgets. Motif also uses constraints to adjust the positions of child widgets in PanedWindow and RowColumn. The Form widget is discussed in Section 14.5. PanedWindow and Frame are discussed in Chapter 8.

[ Previous | Next | Contents | Glossary | Home | Search ]