'\" t .\" CascBA.sgm /main/11 1996/09/08 20:25:42 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 "XmCascadeButton" 3 .SH "NAME" \fBXmCascadeButton\fP \(em The CascadeButton widget class "XmCascadeButton" "widget class" "CascadeButton" .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP CascadeButton links two menu panes or a MenuBar to a menu pane\&. .PP It is used in menu systems and must have a RowColumn parent with its \fBXmNrowColumnType\fP resource set to \fBXmMENU_BAR\fP, \fBXmMENU_POPUP\fP or \fBXmMENU_PULLDOWN\fP\&. .PP It is the only widget that can have a Pulldown menu pane attached to it as a submenu\&. The submenu is displayed when this widget is activated within a MenuBar, a PopupMenu, or a PulldownMenu\&. Its visuals can include a label or pixmap and a cascading indicator when it is in a Popup or Pulldown menu pane; or it can include only a label or a pixmap when it is in a MenuBar\&. The positioning of the PulldownMenu with respect to the CascadeButton depends on the \fBXmNlayoutDirection\fP resource of the MenuShell\&. .PP The default behavior associated with a CascadeButton depends on the type of menu system in which it resides\&. By default, \fBBSelect\fP controls the behavior of the CascadeButton\&. In addition, \fBBMenu\fP controls the behavior of the CascadeButton if it resides in a PopupMenu system\&. The actual mouse button used is determined by its RowColumn parent\&. \fBBMenu\fP also performs the \fBBSelect\fP actions in all types of menu systems\&. .PP A CascadeButton\&'s visuals differ from most other button gadgets\&. When the button becomes armed, its visuals change from a 2-D to a 3-D look, and it displays the submenu that has been attached to it\&. If no submenu is attached, it simply changes its visuals\&. .PP When a CascadeButton within a Pulldown or Popup menu pane is armed as the result of the user moving the mouse pointer into the widget, it does not immediately display its submenu\&. Instead, it waits a short amount of time to see if the arming was temporary (that is, the user was simply passing through the widget), or whether the user really wanted the submenu posted\&. This time delay is configurable using \fBXmNmappingDelay\fP\&. .PP CascadeButton provides a single mechanism for activating the widget from the keyboard\&. This mechanism is referred to as a keyboard mnemonic\&. If a mnemonic has been specified for the widget, the user may activate the CascadeButton by simply typing the mnemonic while the CascadeButton is visible\&. If the CascadeButton is in a MenuBar and the MenuBar does not have the focus, the \fBMAlt\fP modifier must be pressed with the mnemonic\&. Mnemonics are typically used to interact with a menu using the keyboard interface\&. .PP If the Cascadebutton is in a Pulldown or Popup menu pane and there is a submenu attached, the \fBXmNmarginBottom\fP, \fBXmNmarginLeft\fP, \fBXmNmarginRight\fP, and \fBXmNmarginTop\fP resources may enlarge to accommodate \fBXmNcascadePixmap\fP\&. \fBXmNmarginWidth\fP defaults to 6 if this resource is in a MenuBar; otherwise, it takes Label\&'s default, which is 2\&. .PP CascadeButton uses the \fBXmQTmenuSystem\fP and \fBXmQTspecifyRenderTable\fP traits\&. .SS "Classes" .PP CascadeButton inherits behavior, resources, and traits from \fBCore\fP, \fBXmPrimitive\fP, and \fBXmLabel\fP classes\&. .PP The class pointer is \fBxmCascadeButtonWidgetClass\fP\&. .PP The class name is \fBXmCascadeButton\fP\&. .SS "New Resources" .PP 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. \fBXmCascadeButton Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNactivateCallbackXmCCallbackXtCallbackListNULLC _____ XmNcascadePixmapXmCPixmapPixmapdynamicCSG _____ XmNcascadingCallbackXmCCallbackXtCallbackListNULLC _____ XmNmappingDelayXmCMappingDelayint180 msCSG _____ XmNsubMenuIdXmCMenuWidgetWidgetNULLCSG _____ .TE .IP "\fBXmNactivateCallback\fP" 10 Specifies the list of callbacks that is called when the user activates the CascadeButton widget and there is no submenu attached to pop up\&. The activation occurs when a mouse button is released or when the mnemonic associated with the widget is typed\&. The specific mouse button depends on information in the RowColumn parent\&. The reason sent by the callback is \fBXmCR_ACTIVATE\fP\&. .IP "\fBXmNcascadePixmap\fP" 10 Specifies the cascade pixmap displayed on one end of the widget when a CascadeButton is used within a Popup or Pulldown menu pane and a submenu is attached\&. The Label class resources \fBXmNmarginBottom\fP, \fBXmNmarginLeft\fP, \fBXmNmarginRight\fP, and \fBXmNmarginTop\fP may be modified to ensure that room is left for the cascade pixmap\&. The default cascade pixmap is an arrow pointing to the side of the menu where the submenu will appear\&. The positioning of the cascade pixmap to either the left of right of the widget, and the direction of the arrow, depend on the \fBXmNlayoutDirection\fP resource of the MenuShell\&. .IP "\fBXmNcascadingCallback\fP" 10 Specifies the list of callbacks that is called just prior to the mapping of the submenu associated with CascadeButton\&. The reason sent by the callback is \fBXmCR_CASCADING\fP\&. .IP "\fBXmNmappingDelay\fP" 10 Specifies the amount of time, in milliseconds, between when a CascadeButton becomes armed and when it maps its submenu\&. This delay is used only when the widget is within a Popup or Pulldown menu pane\&. The value must not be negative\&. .IP "\fBXmNsubMenuId\fP" 10 Specifies the widget ID for the Pulldown menu pane to be associated with this CascadeButton\&. The specified menu pane is displayed when the CascadeButton becomes armed\&. The menu pane must have been created with the appropriate parentage depending on the type of menu used\&. See \fBXmCreateMenuBar\fP(3), \fBXmCreatePulldownMenu\fP(3), and \fBXmCreatePopupMenu\fP(3) for more information on the menu systems\&. .SS "Inherited Resources" .PP CascadeButton 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\&. .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmLabel Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNacceleratorXmCAcceleratorStringNULLN/A _____ XmNacceleratorTextXmCAcceleratorTextXmStringNULLN/A _____ XmNalignmentXmCAlignmentunsigned chardynamicCSG _____ XmNfontListXmCFontListXmFontListdynamicCSG _____ XmNlabelInsensitivePixmapXmCLabelInsensitivePixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNlabelPixmapXmCLabelPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNlabelStringXmCXmStringXmStringdynamicCSG _____ XmNlabelTypeXmCLabelTypeunsigned charXmSTRINGCSG _____ XmNmarginBottomXmCMarginBottomDimensiondynamicCSG _____ XmNmarginHeightXmCMarginHeightDimension2CSG _____ XmNmarginLeftXmCMarginLeftDimension0CSG _____ XmNmarginRightXmCMarginRightDimensiondynamicCSG _____ XmNmarginTopXmCMarginTopDimensiondynamicCSG _____ XmNmarginWidthXmCMarginWidthDimensiondynamicCSG _____ XmNmnemonicXmCMnemonicKeySymNULLCSG _____ XmNmnemonicCharSetXmCMnemonicCharSetStringXmFONTLIST_DEFAULT_TAGCSG _____ XmNrecomputeSizeXmCRecomputeSizeBooleanTrueCSG _____ XmNrenderTableXmCRenderTableXmRenderTabledynamicCSG _____ XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCSG _____ .TE .PP .TS tab() box; c s s s s l| l| l| l| l. \fBXmPrimitive Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP _____ XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG _____ XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG _____ XmNconvertCallbackXmCCallbackXtCallbackListNULLC _____ XmNforegroundXmCForegroundPixeldynamicCSG _____ XmNhelpCallbackXmCCallbackXtCallbackListNULLC _____ XmNhighlightColorXmCHighlightColorPixeldynamicCSG _____ XmNhighlightOnEnterXmCHighlightOnEnterBooleanFalseCSG _____ XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG _____ XmNhighlightThicknessXmCHighlightThicknessDimension0CSG _____ XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG _____ XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmNONECSG _____ XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC _____ XmNshadowThicknessXmCShadowThicknessDimension2CSG _____ XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG _____ XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG _____ XmNtraversalOnXmCTraversalOnBooleandynamicG _____ XmNunitTypeXmCUnitTypeunsigned chardynamicCSG _____ XmNuserDataXmCUserDataXtPointerNULLCSG _____ .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 "Callback Information" .PP A pointer to the following structure is passed to each callback: .PP .nf typedef struct { int \fIreason\fP; XEvent \fI* event\fP; } XmAnyCallbackStruct; .fi .IP "\fIreason\fP" 10 Indicates why the callback was invoked .IP "\fIevent\fP" 10 Points to the \fBXEvent\fP that triggered the callback or is NULL if this callback was not triggered due to an \fBXEvent\fP .SS "Translations" .PP \fBXmCascadeButton\fP includes translations from \fBXmPrimitive\fP\&. \fBXmCascadeButton\fP includes the menu traversal translations from \fBXmLabel\fP\&. .PP Note that altering translations in \fB#override\fP or \fB#augment\fP mode is undefined\&. .PP The following list describes the translations for a CascadeButton in a MenuBar\&. 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\fP\fBNormal\fP:" 10 MenuBarEnter() .IP "\fB\fP\fBNormal\fP:" 10 MenuBarLeave() .IP "\fB\fP:" 10 ProcessDrag() .IP "\fBc\fP:" 10 MenuButtonTakeFocusUp() .IP "\fBc\fP:" 10 MenuButtonTakeFocusUp() .IP "\fB\(apc\fP\fB\fP:" 10 MenuBarSelect() .IP "\fB\(apc\fP\fB\fP:" 10 DoSelect() .IP "\fB:\fP\fB\fP\fB\fP:" 10 KeySelect() .IP "\fB:\fP\fB\fP\fB\fP:" 10 KeySelect() .IP "\fB:\fP\fB\fP\fB\fP:" 10 Help() .IP "\fB:\fP\fB\fP\fB\fP:" 10 CleanupMenuBar() .IP "\fB\(aps\fP\fB\fP\fBReturn\fP:" 10 KeySelect() .IP "\fB\(aps\fP\fB\fP\fBspace\fP:" 10 KeySelect() .PP The following list describes the translations for a CascadeButton in a PullDown or Popup MenuPane\&. In a Popup menu system, \fB\fP also performs the \fB\fP actions\&. .IP "\fB\fP:" 10 DelayedArm() .IP "\fB\fP:" 10 CheckDisarm() .IP "\fB\fP:" 10 ProcessDrag() .IP "\fBc\fP:" 10 MenuButtonTakeFocus() .IP "\fBc\fP:" 10 MenuButtonTakeFocusUp() .IP "\fB\(apc\fP\fB\fP:" 10 StartDrag() .IP "\fB\(apc\fP\fB\fP:" 10 DoSelect() .IP "\fB:\fP\fB\fP\fB\fP:" 10 KeySelect() .IP "\fB:\fP\fB\fP\fB\fP:" 10 KeySelect() .IP "\fB:\fP\fB\fP\fB\fP:" 10 Help() .IP "\fB:\fP\fB\fP\fB\fP:" 10 CleanupMenuBar() .IP "\fB\(aps\fP\fB\fP\fBReturn\fP:" 10 KeySelect() .IP "\fB\(aps\fP\fB\fP\fBspace\fP:" 10 KeySelect() .SS "Action Routines" .PP The XmCascadeButton action routines are .IP "CleanupMenuBar():" 10 In a MenuBar, disarms the CascadeButton and the menu and, when the shell\&'s keyboard focus policy is \fBXmEXPLICIT\fP, restores keyboard focus to the widget that had the focus before the menu was entered\&. .IP "" 10 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 \fBXmEXPLICIT\fP, restores keyboard focus to the widget that had the focus before the MenuBar was entered\&. In other Pulldown MenuPanes, unposts the menu\&. .IP "" 10 In a Popup MenuPane, 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\&. .IP "DoSelect():" 10 Calls the callbacks in \fBXmNcascadingCallback\fP, posts the submenu attached to the CascadeButton and enables keyboard traversal within the menu\&. If the CascadeButton does not have a submenu attached, this action calls the callbacks in \fBXmNactivateCallback\fP, activates the CascadeButton, and unposts all posted menus in the cascade\&. .IP "Help():" 10 Unposts all menus in the menu hierarchy and, when the shell\&'s keyboard focus policy is \fBXmEXPLICIT\fP, restores keyboard focus to the widget that had the focus before the menu system was entered\&. Calls the callbacks for \fBXmNhelpCallback\fP if any exist\&. If there are no help callbacks for this widget, this action calls the help callbacks for the nearest ancestor that has them\&. .IP "KeySelect():" 10 Calls the callbacks in \fBXmNcascadingCallback\fP, and posts the submenu attached to the CascadeButton if keyboard traversal is enabled in the menu\&. If the CascadeButton does not have a submenu attached, this action calls the callbacks in \fBXmNactivateCallback\fP, activates the CascadeButton, and unposts all posted menus in the cascade\&. .IP "MenuBarSelect():" 10 Unposts any menus posted by the parent menu\&. Arms both the CascadeButton and the MenuBar, posts the associated submenu, and enables mouse traversal\&. If the menu is already active, this event disables keyboard traversal for the menu and returns the menu to mouse traversal mode\&. .IP "StartDrag():" 10 Arms the CascadeButton, posts the associated submenu, and enables mouse traversal\&. If the menu is already active, this event disables keyboard traversal for the menu and returns the menu to mouse traversal mode\&. .SS "Additional Behavior" .PP Posting a submenu calls the \fBXmNcascadingCallback\fP callbacks\&. This widget has the following additional behavior: .IP "\fB\fP:" 10 If keyboard traversal is enabled, does nothing\&. Otherwise, in a MenuBar that is armed, unposts any MenuPanes associated with another MenuBar entry, arms the CascadeButton, and posts the associated submenu\&. In other menus, arms the CascadeButton and posts the associated submenu after the delay specified by \fBXmNmappingDelay\fP\&. .IP "\fB\fP:" 10 If keyboard traversal is enabled does nothing\&. Otherwise, in a MenuBar that is armed, disarms the CascadeButton if the submenu associated with the CascadeButton is not currently posted or if there is no submenu associated with the CascadeButton\&. .IP "" 10 In other menus, if the pointer moves anywhere except into a submenu associated with the CascadeButton, the CascadeButton is disarmed and its submenu is unposted\&. .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 \fBCore\fP(3), \fBXmCascadeButtonHighlight\fP(3), \fBXmCreateCascadeButton\fP(3), \fBXmCreateMenuBar\fP(3), \fBXmCreatePulldownMenu\fP(3), \fBXmCreatePopupMenu\fP(3), \fBXmLabel\fP(3), \fBXmPrimitive\fP(3), \fBXmRowColumn\fP(3), \fBXmVaCreateCascadeButton\fP(3), \fBXmVaCreateManagedCascadeButton\fP(3)\&.