Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Composite(3Xm)

Core(3Xm)

OverrideShell(3Xm)

Shell(3Xm)

XmCreateMenuShell(3Xm)

XmCreatePopupMenu(3Xm)

XmCreatePulldown(3Xm)

XmRowColumn(3Xm)

XmMenuShell(3Xm)  —  UNIX Programmer’s Manual

NAME

XmMenuShell — the MenuShell widget class. 

SYNOPSIS

#include <Xm/MenuShell.h>

DESCRIPTION

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

Most application writers will 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, then it is the application programmer’s responsibility to create the required MenuShell.  In this case, it is important to note that the parent of the MenuShell depends on the type of menu system being built. 

•If the MenuShell is for the top-level Popup MenuPane, the MenuShell must be created as a child of 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 must be created as a child of the Popup or Pulldown MenuPane’s parent MenuShell. 

•If the MenuShell is for a MenuPane that is pulled down from a MenuBar, then the MenuShell must be created as a child of the MenuBar. 

•If the MenuShell is for a Pulldown MenuPane in an OptionMenu, the MenuShell must have the same parent as the OptionMenu. 

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 defines no new resources, but overrides the XmNallowShellResize resource in Shell. 

Inherited Resources

MenuShell inherits behavior and resources from the following superclasses.  For a complete description of these resources, 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 upper case, 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). 

Shell Resource Set
Name Class Type Default Access
XmNallowShellResize XmCAllowShellResize Boolean True G
XmNancestorSensitive XmCSensitive Boolean ShellAncestorSensitive G
XmNcreatePopupChildProc XmCCreatePopupChildProc XmCreatePopupChildProc NULL CSG
XmNdepth XmCDepth int ShellDepth CSG
XmNgeometry XmCGeometry caddr_t NULL CSG
XmNoverrideRedirect XmCOverrideRedirect Boolean True CSG
XmNpopdownCallback XmCCallback caddr_t NULL C
XmNpopupCallback XmCCallback caddr_t NULL C
XmNsaveUnder XmCSaveUnder Boolean True CSG

Composite Resource Set
Name Class Type Default Access
XmNinsertPosition XmCInsertPosition XmRFunction NULL CSG

Core Resource Set
Name Class Type Default Access
XmNaccelerators XmCAccelerators XtTranslations NULL CSG
XmNancestorSensitive XmCSensitive Boolean ShellAncestorSensitive CSG
XmNbackground XmCBackground Pixel White CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel Black CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 1 CSG
XmNcolormap XmCColormap Colormap ShellColormap CG
XmNdepth XmCDepth int ShellDepth CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension 0 CSG
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Pointer XtCopyScreen CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations NULL CSG
XmNwidth XmCWidth Dimension 0 CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG

Behavior

The specific mouse button that is used depends upon the resources XmNrowColumnType and XmNwhichButton in the menu’s top level RowColumn widget. 

Default PopupMenu System

<Btn3Down>:
If this event has not already been processed by another menu component, then this action disables keyboard traversal for the menus and returns the user to drag mode.

<Btn3Up>:
If this event has not already been processed by another menu component, then all visible MenuPanes are unposted.

<Key>Escape:
If this event has not already been processed by another menu component, then all visible MenuPanes are unposted.

Default PulldownMenu System or OptionMenu System

<Btn1Down>:
If this event has not already been processed by another menu component, then this action disables keyboard traversal for the menus and returns the user to drag mode.

<Btn1Up>:
If this event has not already been processed by another menu component, then all visible MenuPanes are unposted.

<Key>Escape:
If this event has not already been processed by another menu component, then all visible MenuPanes are unposted.

Default Translations

The default translations for MenuShell are:
<BtnDown>:ClearTraversal()
<Key>Escape:MenuShellPopdownDone()
<BtnUp>:MenuShellPopdownDone()

RELATED INFORMATION

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

7th Edition

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