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



Guidelines for Grabs

Following is a summary of the restrictions on Motif programs regarding the posting and unposting of shell widgets and the use of grabs:

  1. The functions XtAddGrab and XtRemoveGrab cannot be used by a Motif application.

  2. The Intrinsics convenience popup callback functions XtCallbackNonexclusive and XtCallbackExclusive cannot be used by Motif applications.

  3. The functions XtPopup, XtPopupSpringLoaded, and XtPopdown can only be used on shell widgets created with the functions XtCreatePopupShell or XtVaCreatePopupShell. XtMapWidget and XtUnmapWidget should never be used on shells created in this manner.

  4. For Motif applications, the value of the second argument of XtPopup must always be XtGrabNone.

  5. Never use XtManageChild and XtUnmanageChild on shell widgets.

  6. Use XtMapWidget and XtUnmapWidget only on widgets with the XmNmappedWhenManaged resource set to False.

  7. By default, top level shells (those shells created with XtAppCreateShell and XtVaAppCreateShell) are mapped at the time that they are realized. Generally, only shells of classes applicationShellWidgetClass and topLevelShellWidgetClass are created in this manner. Except for iconification, these shells are generally expected to remain mapped until they are destroyed or until the application is terminated. (Transient shells should use the "popup" interfaces).

  8. For unconventional uses of these top level shells, control of posting and unposting can be achieved by creating these shells with the XmNmappedWhenManaged resource set to False, and then using XtMapWidget and XtUnmapWidget to post and unpost them. Note that neither the XtSetValues nor the XtSetMappedWhenManaged interfaces are effective for this resource on shell widgets; these widgets must be created with XmNmappedWhenManaged set to False in order to use XtMapWidget and XtUnmapWidget.

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