Blob Blame History Raw
'\" t
...\" MenuSh.sgm /main/9 1996/09/08 20:54:09 rws $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "XmMenuShell" "library call"
.SH "NAME"
\fBXmMenuShell\fP \(em The MenuShell widget class
.iX "XmMenuShell"
.iX "widget class" "MenuShell"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/MenuShell\&.h>
.fi
.SH "DESCRIPTION"
.PP
The MenuShell widget is a custom OverrideShell widget\&. An OverrideShell
widget bypasses \fBmwm\fP when displaying itself\&. It is designed
specifically to contain Popup or Pulldown menu panes\&.
.PP
Most application writers never encounter this widget if they use the
menu-system convenience functions,
\fBXmCreatePopupMenu\fP or \fBXmCreatePulldown Menu\fP,
to create a Popup or Pulldown menu pane\&.
The convenience functions automatically create a MenuShell widget as the
parent of the menu pane\&. 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\&.
.IP "   \(bu" 6
If the MenuShell is for the top-level Popup menu pane, the MenuShell\&'s
parent must be the widget from which the Popup menu pane is popped up\&.
.IP "   \(bu" 6
If the MenuShell is for a menu pane that is pulled down from a Popup or
another Pulldown menu pane, the MenuShell\&'s parent must be the Popup or
Pulldown menu pane\&.
.IP "   \(bu" 6
If the MenuShell is for a menu pane that is pulled down from a MenuBar,
the MenuShell\&'s parent must be the MenuBar\&.
.IP "   \(bu" 6
If the MenuShell is for a Pulldown menu pane in an OptionMenu, the
MenuShell\&'s parent must be the OptionMenu\&'s parent\&.
.PP
Setting \fBXmNheight\fP, \fBXmNwidth\fP, or \fBXmNborderWidth\fP 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\&.
.PP
For the managed child of a MenuShell, regardless of the value of
the shell\&'s \fBXmNallowShellResize\fP, setting \fBXmNx\fP or \fBXmNy\fP
sets the corresponding resource of the parent but does not change the
child\&'s position relative to the parent\&.
\fBXtGetValues\fP for the child\&'s \fBXmNx\fP or \fBXmNy\fP 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 0 (zero)
minus the value of \fBXmNborderWidth\fP\&.
.PP
MenuShell uses the \fBXmQTmenuSystem\fP trait and holds the
\fBXmQTspecifyRenderTable\fP trait\&.
.SS "Classes"
.PP
MenuShell inherits behavior, resources, and traits from \fBCore\fP,
\fBComposite\fP, \fBShell\fP, and
\fBOverrideShell\fP\&.
.PP
The class pointer is \fBxmMenuShellWidgetClass\fP\&.
.PP
The class name is \fBXmMenuShell\fP\&.
.SS "New Resources"
.PP
MenuShell overrides the \fBXmNallowShellResize\fP resource in Shell\&.
The following 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 \fB\&.Xdefaults\fP file, remove the \fBXmN\fP or
\fBXmC\fP prefix and use the remaining letters\&. To specify one of the defined
values for a resource in a \fB\&.Xdefaults\fP file, remove the \fBXm\fP 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 \fBXtSetValues\fP (S),
retrieved by using \fBXtGetValues\fP (G), or is not applicable (N/A)\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmMenuShell Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbuttonFontListXmCButtonFontListXmFontListdynamicCSG
_____
XmNbuttonRenderTableXmCButtonRenderTableXmRenderTableNULLCSG
_____
XmNdefaultFontListXmCDefaultFontListXmFontListdynamicCG
_____
XmNlabelFontListXmCLabelFontListXmFontListdynamicCSG
_____
XmNlabelRenderTableXmCLabelRenderTableXmRenderTableNULLCSG
_____
XmNlayoutDirectionXmCLayoutDirectionXmDirectionXmLEFT_TO_RIGHTCG
_____
XmNanimateXmCAnimateBooleanFalseCG
_____
.TE
.IP "\fBXmNbuttonFontList\fP" 10
Specifies the font list used for button descendants\&. See the
\fBXmNbuttonRenderTable\fP resource\&.
.IP "\fBXmNbuttonRenderTable\fP" 10
Specifies the render table used for MenuShell\&'s button descendants\&.
If this value is NULL at initialization and if the value of
\fBXmNdefaultFontList\fP is not NULL, \fBXmNbuttonRenderTable\fP
is initialized to the value of \fBXmNdefaultFontList\fP\&. If
the value of \fBXmNdefaultFontList\fP is NULL, \fBXmNbuttonRenderTable\fP
is initialized by looking up the parent hierarchy of the widget for
an ancestor that holds the \fBXmQTspecifyRenderTable\fP trait\&.
If such an ancestor is found,
\fBXmNbuttonRenderTable\fP is initialized to the
\fBXmBUTTON_RENDER_TABLE\fP value
of the ancestor widget\&. If no such ancestor is found, the default
is implementation dependent\&.
Refer to
\fBXmRenderTable\fP(3) for more information on the creation and structure
of a render table\&.
.IP "\fBXmNdefaultFontList\fP" 10
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 \fBXmNbuttonFontList\fP
and \fBXmNlabelFontList\fP\&.
.IP "\fBXmNlabelFontList\fP" 10
Specifies the font list used for label descendants\&. See the
\fBXmNlabelRenderTable\fP resource\&.
.IP "\fBXmNlabelRenderTable\fP" 10
Specifies the render table used for MenuShell\&'s label descendants
(Labels and LabelGadgets)\&. If this value is NULL at initialization
and if the value of \fBXmNdefaultFontList\fP is not NULL,
\fBXmNlabelRenderTable\fP is initialized to the value of
\fBXmNdefaultFontList\fP\&. If the value of \fBXmNdefaultFontList\fP is
NULL, the parent hierarchy of the widget is searched
for an ancestor that holds the \fBXmQTspecifyRenderTable\fP trait\&.
If such
an ancestor is found, \fBXmNlabelRenderTable\fP is initialized to the
\fBXmLABEL_RENDER_TABLE\fP value of the ancestor widget\&. If no such ancestor
is found, the default is implementation dependent\&. Refer to
\fBXmRenderTable\fP(3) for more information on the creation and structure
of a render table\&.
.IP "\fBXmNlayoutDirection\fP" 10
Specifies the direction in which the subwidgets, children of a
widget, or other visual components are to be laid out\&. This policy
will apply as the default layout policy for all descendants of this
MenuShell\&.

.IP "\fBXmNanimate\fP" 10
Controls whether menus will post in an animated fashion.

.SS "Inherited Resources"
.PP
MenuShell inherits behavior and resources from the
superclasses described in the following tables\&.
For a complete description of each resource, refer to the
reference page for that superclass\&.
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 \fB\&.Xdefaults\fP file, remove the \fBXmN\fP or
\fBXmC\fP prefix and use the remaining letters\&. To specify one of the defined
values for a resource in a \fB\&.Xdefaults\fP file, remove the \fBXm\fP 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 \fBXtSetValues\fP (S),
retrieved by using \fBXtGetValues\fP (G),
or is not applicable (N/A)\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBShell Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNallowShellResizeXmCAllowShellResizeBooleanTrueG
_____
XmNcreatePopupChildProcXmCCreatePopupChildProcXtCreatePopupChildProcNULLCSG
_____
XmNgeometryXmCGeometryStringNULLCSG
_____
XmNoverrideRedirectXmCOverrideRedirectBooleanTrueCSG
_____
XmNpopdownCallbackXmCCallbackXtCallbackListNULLC
_____
XmNpopupCallbackXmCCallbackXtCallbackListNULLC
_____
XmNsaveUnderXmCSaveUnderBooleanTrueCSG
_____
XmNvisualXmCVisualVisual *CopyFromParentCSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBComposite Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNchildrenXmCReadOnlyWidgetListNULLG
_____
XmNinsertPositionXmCInsertPositionXtOrderProcNULLCSG
_____
XmNnumChildrenXmCReadOnlyCardinal0G
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBCore Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicCSG
_____
XmNancestorSensitiveXmCSensitiveBooleandynamicG
_____
XmNbackgroundXmCBackgroundPixeldynamicCSG
_____
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG
_____
XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderWidthXmCBorderWidthDimension0CSG
_____
XmNcolormapXmCColormapColormapdynamicCG
_____
XmNdepthXmCDepthintdynamicCG
_____
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
_____
XmNheightXmCHeightDimensiondynamicCSG
_____
XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC
_____
XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG
_____
XmNscreenXmCScreenScreen *dynamicCG
_____
XmNsensitiveXmCSensitiveBooleanTrueCSG
_____
XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG
_____
XmNwidthXmCWidthDimensiondynamicCSG
_____
XmNxXmCPositionPosition0CSG
_____
XmNyXmCPositionPosition0CSG
_____
.TE
.SS "Translations"
.PP
The XmMenuShell translations are described in the following list\&.
.PP
The following key names are listed in the
X standard key event translation table syntax\&.
This format is the one used by Motif to
specify the widget actions corresponding to a given key\&.
A brief overview of the format is provided under
\fBVirtualBindings\fP(3)\&.
For a complete description of the format, please refer to the
X Toolkit Instrinsics Documentation\&.
.IP "\fB<BtnDown>\fP:" 10
ClearTraversal()
.IP "\fB<BtnUp>\fP:" 10
MenuShellPopdownDone()
.SS "Action Routines"
.PP
The \fBXmMenuShell\fP action routines are
.IP "ClearTraversal():" 10
Disables keyboard traversal for the menu, enables mouse traversal, and
unposts any menus posted by this menu\&.
.IP "MenuShellPopdownDone():" 10
Unposts the menu hierarchy and, when the shell\&'s keyboard focus policy is
\fBXmEXPLICIT\fP,
restores focus to the widget that had
the focus before the menu system was entered\&.
.IP "MenuShellPopdownOne():" 10
In a top-level Pulldown MenuPane from a MenuBar, this action unposts the menu,
disarms the MenuBar CascadeButton and the MenuBar, and,
when the shell\&'s keyboard focus policy is
\fBXmEXPLICIT\fP,
restores keyboard
focus to the widget that had the focus before the MenuBar was
entered\&.
In other Pulldown MenuPanes, this action unposts the menu\&.
.IP "" 10
In a Popup MenuPane, this action unposts the menu, and,
when the shell\&'s keyboard focus policy is
\fBXmEXPLICIT\fP,
restores keyboard focus to the
widget from which the menu was posted\&.
.SS "Virtual Bindings"
.PP
The bindings for virtual keys are vendor specific\&.
For information about bindings for virtual buttons and keys, see \fBVirtualBindings\fP(3)\&.
.SH "RELATED"
.PP
\fBComposite\fP(3), \fBCore\fP(3), \fBOverrideShell\fP(3), \fBShell\fP(3),
\fBXmCreateMenuShell\fP(3),
\fBXmCreatePopupMenu\fP(3), \fBXmCreatePulldownMenu\fP(3), and
\fBXmRowColumn\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:27