12.07.2015 Views

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using <strong>Widget</strong>sapp_contextSpecifies the application context of this application.The value is normally returned by XtAppInitialize.This function never returns: it is an infinite loop that processes the X events. Userinput can be handled through callback procedures and application defined actionroutines. More details are provided in X Toolkit Intrinsics - C <strong>Language</strong> <strong>Interface</strong>.Standard <strong>Widget</strong> Manipulation FunctionsAfter a widget has been created, a client can interact with that widget by callingone of the standard widget manipulation routines provided by the Intrinsics, or awidget class-specific manipulation routine.The Intrinsics provide generic routines to give the application programmer accessto a set of standard widget functions. The common widget routines let an applicationor composite widget perform the following operations on widgets without requiringexplicit knowledge of the widget type.• Control the mapping of widget windows• Destroy a widget instance• Obtain an argument value• <strong>Set</strong> an argument valueMapping <strong>Widget</strong>sBy default, widget windows are mapped (made viewable) automatically by XtRealize<strong>Widget</strong>.This behavior can be disabled by using Xt<strong>Set</strong>MappedWhenManaged,making the client responsible for calling XtMap<strong>Widget</strong> to make the widget viewable.void Xt<strong>Set</strong>MappedWhenManaged( w, map_when_managed);wmap_when_managedSpecifies the widget.Specifies the new value. If map_when_managed isTrue, the widget is mapped automatically when it isrealized. If map_when_managed is False, the clientmust call XtMap<strong>Widget</strong> or make a second call toXt<strong>Set</strong>MappedWhenManaged to cause the child windowto be mapped.The definition for XtMap<strong>Widget</strong> is:void XtMap<strong>Widget</strong>( w);wSpecifies the widget.When you are creating several children in sequence for a previously realized commonparent it is generally more efficient to construct a list of children as they arecreated (using XtCreate<strong>Widget</strong>) and then use XtManageChildren to request thattheir parent managed them all at once. By managing a list of children at one time,the parent can avoid wasteful duplication of geometry processing and the associated``screen flash''.12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!