When a child's size changes, the Intrinsics automatically call the child's resize method. This call informs the child that its size has been changed. The child's resize method must make any internal changes necessary to conform to the new dimensions. If the child is itself a composite widget, its resize method can move or resize its own children.
A widget's resize method is invoked in the following circumstances:
In addition, a shell's resize method is invoked when the size of the shell is changed, often by a user through the window manager.
When the Intrinsics call the resize method, the widget's Core geometry resources contain the new position and dimensions. The resize method must take these resource values as given; the resize method cannot issue a geometry request. The resize method uses these resource values to recalculate the widget's layout.
The resize method of a manager widget should not do layout itself. Rather, a manager widget should provide a separate layout routine. This layout routine should take as an argument the child that is making the request (if any) so that the layout routine can avoid resizing that child.
One of the responsibilities of a resize method is to determine what should be displayed when there is not enough space to display everything. Motif provides the following precedence recommendations for handling this situation: