Name
XtRealizeWidget — realize a widget instance.
Synopsis
void XtRealizeWidget(w)
Widget w;
Arguments
wSpecifies the widget to be realized.
Description
XtRealizeWidget causes widgets to set window attributes, create their windows on the display, and perform their final initializations. XtRealizeWidget is called just prior to calling XtAppMainLoop to process events. The argument to XtRealizeWidget is usually the top-level widget returned from XtAppInitialize.
If the widget is already realized, XtRealizeWidget simply returns. Otherwise, it performs the following:
•Binds all action names in the widget’s translation table to procedures.
•Makes a post-order traversal of the widget tree rooted at the specified widget and calls the change_managed method of each composite widget that has one or more managed children.
•Constructs an XSetWindowAttributes structure filled in with information derived from the Core widget fields and calls the realize method for the widget, which adds any widget-specific attributes and creates the X window.
•If the widget is not a subclass of compositeWidgetClass, XtRealizeWidget returns; otherwise, it performs the following:
−Descends recursively to each of the widget’s managed children and calls the realize procedures. Primitive widgets that instantiate children are responsible for realizing those children themselves.
−Maps all of the managed child windows that have mapped_when_managed True. (If a widget is managed but mapped_when_managed is False, the widget is allocated visual space but is not displayed.)
If the widget is a top-level shell widget (that is, if it has no parent) and mapped_when_managed is True, then XtRealizeWidget maps the widget window.
XtCreateWidget, XtRealizeWidget, XtManageChildren, XtUnmanageChildren, and XtDestroyWidget maintain the following invariants:
•If a widget is realized, then all of its managed children are realized.
•If a widget is realized, then all of its managed children that are also mapped_when_managed are mapped.
All Intrinsics functions and all widget methods should accept either realized or unrealized widgets. When calling the realize methods for children of a composite widget, XtRealizeWidget calls the methods in reverse order of appearance in the list specified by composite.children. By default, this causes the stacking order of any newly created subwindows to be top-to-bottom in the order of appearance on the list, with the most recently created child at the bottom.
See Also
AppXtInitialize(1), XtIsRealized(1), XtUnrealizeWidget(1),
Core(3),
realize(4).