#include <Xm/MenuShell.h>
Most application writers never encounter this widget if they use the menu-system convenience functions, XmCreatePopupMenu or XmCreatePulldownMenu, 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 programmer 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 system being built.
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.
The class pointer is xmMenuShellWidgetClass.
The class name is XmMenuShell.
XmMenuShell resource set
Name | Class | Type | Default | Access |
---|---|---|---|---|
XmNbuttonFontList | XmCButtonFontList | XmFontList | dynamic | CSG |
XmNdefaultFontList | XmCDefaultFontList | XmFontList | dynamic | CG |
XmNlabelFontList | XmCLabelFontList | XmFontList | dynamic | CSG |
--------------------------------------------------------------------------- | Name | Class | Type | Default | Access| |-------------------|--------------------|------------|-----------|--------| | XmNbuttonFontList | XmCButtonFontList | XmFontList| dynamic | CSG | |-------------------|--------------------|------------|-----------|--------| | XmNdefaultFontList| XmCDefaultFontList| XmFontList| dynamic | CG | |-------------------|--------------------|------------|-----------|--------| | XmNlabelFontList | XmCLabelFontList | XmFontList| dynamic | CSG | |-------------------|--------------------|------------|-----------|--------|
Shell resource set
Name | Class | Type | Default | Access |
---|---|---|---|---|
XmNallowShellResize | XmCAllowShellResize | Boolean | True | G |
XmNcreatePopupChildProc | XmCCreatePopupChildProc | XtCreatePopupChildProc | NULL | CSG |
XmNgeometry | XmCGeometry | String | NULL | CSG |
XmNoverrideRedirect | XmCOverrideRedirect | Boolean | True | CSG |
XmNpopdownCallback | XmCCallback | XtCallbackList | NULL | C |
XmNpopupCallback | XmCCallback | XtCallbackList | NULL | C |
XmNsaveUnder | XmCSaveUnder | Boolean | True | CSG |
XmNvisual | XmCVisual | Visual | CopyFromParent | CSG |
------------------------------------------------------------------------------------------------------ | Name | Class | Type | Default | Access| |------------------------|-------------------------|------------------------|----------------|--------| | XmNallowShellResize | XmCAllowShellResize | Boolean | True | G | |------------------------|-------------------------|------------------------|----------------|--------| | XmNcreatePopupChildProc| XmCCreatePopupChildProc| XtCreatePopupChildProc| NULL | CSG | |------------------------|-------------------------|------------------------|----------------|--------| | XmNgeometry | XmCGeometry | String | NULL | CSG | |------------------------|-------------------------|------------------------|----------------|--------| | XmNoverrideRedirect | XmCOverrideRedirect | Boolean | True | CSG | |------------------------|-------------------------|------------------------|----------------|--------| | 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 |
-------------------------------------------------------------------------- | 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 |
XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G |
XmNbackground | XmCBackground | Pixel | dynamic | CSG |
XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG |
XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
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 |
XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean | True | C |
XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG |
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 |
---------------------------------------------------------------------------------------------------------------- | Name | Class | Type | Default | Access| |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNaccelerators | XmCAccelerators | XtAccelerators| dynamic | CSG | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNbackground | XmCBackground | Pixel | dynamic | CSG | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP| CSG | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP| CSG | |------------------------------|-------------------------------|----------------|----------------------|--------| | 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 | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNinitialResourcesPersistent| XmCInitialResourcesPersistent| Boolean | True | C | |------------------------------|-------------------------------|----------------|----------------------|--------| | XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG | |------------------------------|-------------------------------|----------------|----------------------|--------| | 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 | |------------------------------|-------------------------------|----------------|----------------------|--------|
BSelect Press: ClearTraversal() BSelect Release: MenuShellPopdownDone()
In a Popup MenuPane, unposts the menu, and, when the shell's keyboard focus policy is XmEXPLICT, restores keyboard focus to the widget from which the menu was posted.