Specifications
Athena Widget Set libXaw 1.0.7
2.7. Processing Events
Nowthat the application has created, managed and realized its widgets, it is ready to process the
ev e nts that will be delivered by the X Server to this client. Afunction call that will process the
ev e nts is XtAppMainLoop.
void XtAppMainLoop(app_context)
XtAppContext app_context;
app_context Specifies the application context of this application. The value is normally
returned by XtAppInitialize.
This function neverreturns: it is an infinite loop that processes the X events. User input can be
handled through callback procedures and application defined action routines. More details are
provided in XToolkit Intrinsics — C Language Interface.
2.8. Standard Widget Manipulation Functions
After a widget has been created, a client can interact with that widget by calling one of the stan-
dard widget manipulation routines provided by the Intrinsics, or a widget class-specific manipula-
tion routine.
The Intrinsics provide generic routines to give the application programmer access to a set of stan-
dard widget functions. The common widget routines let an application or composite widget per-
form the following operations on widgets without requiring explicit knowledge of the widget
type.
•Control the mapping of widget windows
•Destroyawidget instance
•Obtain an argument value
•Set an argument value
2.8.1. Mapping Widgets
By default, widget windows are mapped (made viewable) automatically by XtRealizeWidget.
This behavior can be disabled by using XtSetMappedWhenManaged,making the client respon-
sible for calling XtMapWidget to makethe widget viewable.
void XtSetMappedWhenManaged(w, map_when_managed)
Widget w;
Boolean map_when_managed;
w Specifies the widget.
map_when_managed
Specifies the newvalue. If map_when_managed is True,the widget is mapped
automatically when it is realized. If map_when_managed is False,the client
must call XtMapWidget or makeasecond call to XtSetMappedWhenMan-
aged to cause the child windowtobemapped.
The definition for XtMapWidget is:
void XtMapWidget(w)
Widget w;
w Specifies the widget.
When you are creating several children in sequence for a previously realized common parent it is
generally more efficient to construct a list of children as theyare created (using XtCreateWidget)
and then use XtManageChildren to request that their parent managed them all at once. By man-
aging a list of children at one time, the parent can avoid wasteful duplication of geometry pro-
cessing and the associated ‘‘screen flash’’.
10