Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmMeShell(Xm) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 XmMenuShell(Xm)                6 January 1993                XmMenuShell(Xm)


 Name

    XmMenuShell - the MenuShell widget class

 Syntax


    #include <Xm/MenuShell.h>


 Description

    The MenuShell widget is a custom OverrideShell widget. An OverrideShell
    widget bypasses mwm when displaying itself. It is designed specifically
    to contain Popup or Pulldown MenuPanes.

    Most application writers never encounter this widget if they use the
    menu-system convenience functions, XmCreatePopupMenu or XmCreatePulldown-
    Menu, to create a Popup or Pulldown MenuPane.  The convenience functions
    automatically create a MenuShell widget as the parent of the MenuPane.
    However, if the convenience functions are not used, the application pro-
    grammer must create the required MenuShell. In this case, it is important
    to note that the parent of the MenuShell depends on the type of menu sys-
    tem being built.

    +  If the MenuShell is for the top-level Popup MenuPane, the MenuShell's
       parent must be the widget from which the Popup MenuPane is popped up.

    +  If the MenuShell is for a MenuPane that is pulled down from a Popup or
       another Pulldown MenuPane, the MenuShell's parent must be the Popup or
       Pulldown MenuPane.

    +  If the MenuShell is for a MenuPane that is pulled down from a MenuBar,
       the MenuShell's parent must be the MenuBar.

    +  If the MenuShell is for a Pulldown MenuPane in an OptionMenu, the
       MenuShell's parent must be the OptionMenu's parent.

    Setting XmNheight, XmNwidth, or XmNborderWidth for either a MenuShell or
    its child sets that resource to the same value in both the parent and the
    child.  An application should always specify these resources for the
    child, not the parent.

    For the managed child of a MenuShell, regardless of the value of the
    shell's XmNallowShellResize, setting XmNx or XmNy sets the corresponding
    resource of the parent but does not change the child's position relative
    to the parent.  XtGetValues for the child's XmNx or XmNy yields the value
    of the corresponding resource in the parent.  The x and y coordinates of
    the child's upper left outside corner relative to the parent's upper left
    inside corner are both zero minus the value of XmNborderWidth.

    Classes

    MenuShell inherits behavior and resources from Core, Composite, Shell,
    and OverrideShell classes.

    The class pointer is xmMenuShellWidgetClass.

    The class name is XmMenuShell.

    New resources

    MenuShell overrides the XmNallowShellResize resource in Shell.  The fol-
    lowing table defines a set of widget resources used by the programmer to
    specify data. The programmer can also set the resource values for the
    inherited classes to set attributes for this widget. To reference a
    resource by name or by class in a .Xdefaults file, remove the ``XmN'' or
    ``XmC'' prefix and use the remaining letters. To specify one of the
    defined values for a resource in a .Xdefaults file, remove the ``Xm''
    prefix and use the remaining letters (in either lowercase or uppercase,
    but include any underscores between words).  The codes in the access
    column indicate if the given resource can be set at creation time (C),
    set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
    not applicable (N/A).

 XmMenuShell resource set

 ____________________________________________________________________________
 Name                  Class                Type          Default      Access
 ____________________________________________________________________________
 XmNbuttonFontList     XmCButtonFontList    XmFontList    dynamic      CSG
 XmNdefaultFontList    XmCDefaultFontList   XmFontList    dynamic      CG
 XmNlabelFontList      XmCLabelFontList     XmFontList    dynamic      CSG


    XmNbuttonFontList
            Specifies the font list used for MenuShell's button descendants.
            If this value is NULL at initialization and if the value of
            XmNdefaultFontList is not NULL, XmNbuttonFontList is initialized
            to the value of XmNdefaultFontList. If the value of XmNdefault-
            FontList is NULL, XmNbuttonFontList is initialized by looking up
            the parent hierarchy of the widget for an ancestor that is a sub-
            class of the XmBulletinBoard, VendorShell, or XmMenuShell widget
            class. If such an ancestor is found, XmNbuttonFontList is ini-
            tialized to the XmNbuttonFontList of the ancestor  widget. If no
            such ancestor is found, the default is implementation dependent.

    XmNdefaultFontList
            Specifies a default font list for MenuShell's descendants.  This
            resource is obsolete and exists for compatibility with earlier
            releases. It has been replaced by XmNbuttonFontList and XmNlabel-
            FontList.

    XmNlabelFontList
            Specifies the font list used for MenuShell's label descendants
            (Labels and LabelGadgets). If this value is NULL at initializa-
            tion and if the value of XmNdefaultFontList is not NULL,
            XmNlabelFontList is initialized to the value of XmNdefault-
            FontList. If the value of XmNdefaultFontList is NULL, XmNlabel-
            FontList is initialized by looking up the parent hierarchy of the
            widget for an ancestor that is a subclass of the XmBulletinBoard,
            VendorShell, or XmMenuShell widget class. If such an ancestor is
            found, XmNlabelFontList is initialized to the XmNlabelFontList of
            the ancestor widget. If no such ancestor is found, the default is
            implementation dependent.

    Inherited resources

    MenuShell inherits behavior and resources from the following superc-
    lasses. For a complete description of each resource, refer to the man
    page for that superclass.  The following tables define a set of widget
    resources used by the programmer to specify data. The programmer can set
    the resource values for these inherited classes to set attributes for
    this widget. To reference a resource by name or by class in a .Xdefaults
    file, remove the ``XmN'' or ``XmC'' prefix and use the remaining letters.
    To specify one of the defined values for a resource in a .Xdefaults file,
    remove the ``Xm'' prefix and use the remaining letters (in either lower-
    case or uppercase, but include any underscores between words).  The codes
    in the access column indicate if the given resource can be set at crea-
    tion time (C), set by using XtSetValues (S), retrieved by using XtGet-
    Values (G), or is not applicable (N/A).

 Shell resource set

 ____________________________________________________________________________
 Name                Class             Type            Default         Access
 ____________________________________________________________________________
 XmNallow-           XmCAllow-         Boolean         True            G
 ShellResize         ShellResize
 XmNcreate-          XmCCreate-        XtCreate-       NULL            CSG
 PopupChildProc      PopupChildProc    PopupChildProc
 XmNgeometry         XmCGeometry       String          NULL            CSG
 XmNoverride-        XmCOverride-      Boolean         True            CSG
 Redirect            Redirect
 XmNpopdownCallback  XmCCallback       XtCallbackList  NULL            C
 XmNpopupCallback    XmCCallback       XtCallbackList  NULL            C
 XmNsaveUnder        XmCSaveUnder      Boolean         True            CSG
 XmNvisual           XmCVisual         Visual *        CopyFromParent  CSG


 Composite resource set

 ____________________________________________________________________________
 Name                 Class                Type           Default      Access
 ____________________________________________________________________________
 XmNchildren          XmCReadOnly          WidgetList     NULL         G
 XmNinsertPosition    XmCInsertPosition    XtOrderProc    NULL         CSG
 XmNnumChildren       XmCReadOnly          Cardinal       0            G


 Core resource set

 ____________________________________________________________________________
 Name                Class              Type            Default        Access
 ____________________________________________________________________________
 XmNaccelerators     XmCAccelerators    XtAccelerators  dynamic        CSG
 XmNancestor-        XmCSensitive       Boolean         dynamic        G
 Sensitive
 XmNbackground       XmCBackground      Pixel           dynamic        CSG
 XmNbackground-      XmCPixmap          Pixmap          XmUNSPE-       CSG
 Pixmap                                                 CIFIED_PIXMAP


 XmNborderColor      XmCBorderColor     Pixel           XtDefault-     CSG
                                                        Foreground
 XmNborderPixmap     XmCPixmap          Pixmap          XmUNSPEC-      CSG
                                                        IFIED_PIXMAP
 XmNborderWidth      XmCBorderWidth     Dimension       1              CSG
 XmNcolormap         XmCColormap        Colormap        dynamic        CG
 XmNdepth            XmCDepth           int             dynamic        CG
 XmNdestroyCallback  XmCCallback        XtCallbackList  NULL           C
 XmNheight           XmCHeight          Dimension       dynamic        CSG
 XmNinitial-         XmCInitial-        Boolean         True           C
 Resources-          Resources-
 Persistent          Persistent
 XmNmapped-          XmCMapped-         Boolean         True           CSG
 WhenManaged         WhenManaged
 XmNscreen           XmCScreen          Screen *        dynamic        CG
 XmNsensitive        XmCSensitive       Boolean         True           CSG
 XmNtranslations     XmCTranslations    XtTranslations  dynamic        CSG
 XmNwidth            XmCWidth           Dimension       dynamic        CSG
 XmNx                XmCPosition        Position        0              CSG
 XmNy                XmCPosition        Position        0              CSG


    Translations

    The XmMenuShell translations are listed below.  These translations may
    not directly correspond to a translation table.

       BSelect Press:      ClearTraversal()
       BSelect Release:    MenuShellPopdownDone()


    Action routines

    The XmMenuShell action routines are described below:

    ClearTraversal():
            Disables keyboard traversal for the menu, enables mouse traver-
            sal, and unposts any menus posted by this menu.

    MenuShellPopdownDone():
            Unposts the menu hierarchy and, when the shell's keyboard focus
            policy is XmEXPLICIT, restores focus to the widget that had the
            focus before the menu system was entered.

    MenuShellPopdownOne():
            In a toplevel Pulldown MenuPane from a MenuBar, unposts the menu,
            disarms the MenuBar CascadeButton and the MenuBar, and, when the
            shell's keyboard focus policy is XmEXPLICT, restores keyboard
            focus to the widget that had the focus before the MenuBar was
            entered.  In other Pulldown MenuPanes, unposts the menu.

            In a Popup MenuPane, unposts the menu, and, when the shell's key-
            board focus policy is XmEXPLICT, restores keyboard focus to the
            widget from which the menu was posted.

    Virtual bindings

    The bindings for virtual keys are vendor specific.  For information about
    bindings for virtual buttons and keys, see VirtualBindings(Xm).

 See also

    Composite(Xm), Core(Xm), OverrideShell(Xm),
    Shell(Xm), XmCreateMenuShell(Xm), XmCreatePopupMenu(Xm),
    XmCreatePulldownMenu(Xm) and XmRowColumn(Xm).


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026