1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
|
'\" t
...\" CascBB.sgm /main/11 1996/09/08 20:25:59 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 "XmCascadeButtonGadget" "library call"
.SH "NAME"
\fBXmCascadeButtonGadget\fP \(em The CascadeButtonGadget widget class
.iX "XmCascadeButtonGadget"
.iX "widget class" "CascadeButtonGadget"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/CascadeBG\&.h>
.fi
.SH "DESCRIPTION"
.PP
CascadeButtonGadget links two menu panes, a MenuBar to a menu pane, or an
OptionMenu 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, \fBXmMENU_PULLDOWN\fP, or \fBXmMENU_OPTION\fP\&.
.PP
It is the only gadget that can have a Pulldown menu pane attached to it as
a submenu\&. The submenu is displayed when this gadget is activated within
a PopupMenu, a PulldownMenu, or an OptionMenu\&. 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 an OptionMenu\&.
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 CascadeButtonGadget depends on the type
of menu system in which it resides\&.
By default, \fBBSelect\fP controls the behavior of the CascadeButtonGadget\&.
In addition, \fBBMenu\fP controls the behavior of the CascadeButtonGadget 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 CascadeButtonGadget\&'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 CascadeButtonGadget
within a Pulldown or Popup menu pane is armed as the result of the user
moving the mouse pointer into the gadget, it does not immediately display its
submenu\&. Instead, it waits a short time to see if the arming
was temporary (that is, the user was simply passing through the gadget), or
the user really wanted the submenu posted\&. This delay is
configurable using \fBXmNmappingDelay\fP\&.
.PP
CascadeButtonGadget provides a single mechanism for
activating the gadget from the keyboard\&. This mechanism is referred to as
a keyboard mnemonic\&.
If a mnemonic has been
specified for the gadget, the user may activate it
by simply typing the mnemonic while the CascadeButtonGadget is visible\&.
If the CascadeButtonGadget is in a MenuBar and the MenuBar does not have
focus, the \fBMAlt\fP modifier must be
pressed with the mnemonic\&.
Mnemonics are typically used to interact with a menu
using the keyboard\&.
.PP
If a CascadeButtonGadget 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 LabelGadget\&'s default, which
is 2\&.
.PP
CascadeButtonGadget uses the \fBXmQTmenuSystem\fP and
\fBXmQTspecifyRenderTable\fP traits\&.
.SS "Classes"
.PP
CascadeButtonGadget inherits behavior, resources, and traits
from the \fBObject\fP, \fBRectObj\fP, \fBXmGadget\fP,
and \fBXmLabelGadget\fP classes\&.
.PP
The class pointer is \fBxmCascadeButtonGadgetClass\fP\&.
.PP
The class name is \fBXmCascadeButtonGadget\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.
\fBXmCascadeButtonGadget\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 CascadeButtonGadget,
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 gadget 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 gadget when
a CascadeButtonGadget is used within a Popup or Pulldown menu pane
and a submenu is attached\&.
The LabelGadget 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 in menus other than option menus is an arrow
pointing to the side of the menu where the submenu will appear\&.
The default for the CascadeButtonGadget in an option menu is
\fBXmUNSPECIFIED_PIXMAP\fP\&.
.IP "" 10
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 the
CascadeButtonGadget\&. The reason sent by the callback is \fBXmCR_CASCADING\fP\&.
.IP "\fBXmNmappingDelay\fP" 10
Specifies the amount of time, in milliseconds, between when a
CascadeButtonGadget
becomes armed and when it maps its submenu\&. This delay is used only when the
gadget 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 CascadeButtonGadget\&. The specified menu pane is
displayed when the CascadeButtonGadget becomes armed\&. The menu pane must
have been created with the appropriate parentage depending on the type
of menu used\&. See \fBXmCreatePulldownMenu\fP(3),
\fBXmCreatePopupMenu\fP(3), and \fBXmCreateOptionMenu\fP(3) for
more information on the menu systems\&.
.SS "Inherited Resources"
.PP
CascadeButtonGadget 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.
\fBXmLabelGadget 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
_____
XmNmnemonicCharSetXmCMnemonicCharSetStringdynamicCSG
_____
XmNrecomputeSizeXmCRecomputeSizeBooleanTrueCSG
_____
XmNrenderTableXmCRenderTableXmRenderTabledynamicCSG
_____
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmGadget Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbackgroundXmCBackgroundPixeldynamicCSG
_____
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
_____
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapdynamicCSG
_____
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
_____
XmNforegroundXmCForegroundPixeldynamicCSG
_____
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
_____
XmNhighlightOnEnterXmCHighlightOnEnterBooleanFalseCSG
_____
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
_____
XmNhighlightThicknessXmCHighlightThicknessDimension0CSG
_____
XmNlayoutDirectionXmNCLayoutDirectionXmDirectiondynamicCG
_____
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmNONECSG
_____
XmNshadowThicknessXmCShadowThicknessDimension2CSG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBRectObj Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNancestorSensitiveXmCSensitiveBooleandynamicG
_____
XmNborderWidthXmCBorderWidthDimension0N/A
_____
XmNheightXmCHeightDimensiondynamicCSG
_____
XmNsensitiveXmCSensitiveBooleanTrueCSG
_____
XmNwidthXmCWidthDimensiondynamicCSG
_____
XmNxXmCPositionPosition0CSG
_____
XmNyXmCPositionPosition0CSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBObject Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
_____
.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 by an \fBXEvent\fP
.SS "Behavior"
.PP
\fBXmCascadeButtonGadget\fP includes behavior from \fBXmGadget\fP\&.
\fBXmCascadeButton\fP includes the menu traversal behavior from \fBXmLabel\fP\&.
Additional \fBXmCascadeButtonGadget\fP behavior is described in
the following list (in a Popup
menu system, \fB<Btn3>\fP also performs the \fB<Btn1>\fP actions)\&.
.IP "\fB<Btn1Down>\fP:" 10
Unposts any menus posted by the parent menu\&.
Arms the CascadeButtonGadget,
posts the associated submenu,
enables mouse traversal,
and, in a MenuBar, arms the MenuBar\&.
If the menu is already active, this event
disables keyboard traversal for the menu and returns
the menu to mouse traversal mode\&.
.IP "\fB<Btn1Up>\fP:" 10
Calls the callbacks in \fBXmNcascadingCallback\fP,
posts the submenu attached to the CascadeButtonGadget and
enables keyboard traversal within the menu\&.
If the CascadeButtonGadget does not have a submenu attached,
this action calls the callbacks in \fBXmNactivateCallback\fP,
activates the CascadeButtonGadget, and unposts
all posted menus in the cascade\&.
.IP "\fB<Key>\fP\fB<osfActivate>\fP:" 10
Calls the callbacks in \fBXmNcascadingCallback\fP,
and
posts the submenu attached to the CascadeButtonGadget if keyboard
traversal is enabled in the menu\&.
If the CascadeButtonGadget does not have a submenu attached,
this action calls the callbacks in \fBXmNactivateCallback\fP,
activates the CascadeButtonGadget, and unposts
all posted menus in the cascade\&.
This action applies only to gadgets in MenuBars, PulldownMenus, and
PopupMenus\&. For a CascadeButtonGadget in an OptionMenu, if the parent
is a manager, this action passes the event to the parent\&.
.IP "\fB<Key>\fP\fB<osfSelect>\fP:" 10
Calls the callbacks in \fBXmNcascadingCallback\fP,
and
posts the submenu attached to the CascadeButtonGadget if keyboard
traversal is enabled in the menu\&.
If the CascadeButtonGadget does not have a submenu attached,
this action calls the callbacks in \fBXmNactivateCallback\fP,
activates the CascadeButtonGadget, and unposts all posted
menus in the cascade\&.
.IP "\fB<Key>\fP\fB<osfHelp>\fP:" 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 "\fB<Key>\fP\fB<osfCancel>\fP:" 10
In a MenuBar, disarms the CascadeButtonGadget 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\&.
For a CascadeButtonGadget in an OptionMenu, if the parent is a manager, this
action passes the event to the parent\&.
.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 restores keyboard focus to the
widget from which the menu was posted\&.
.IP "\fB<Enter>\fP:" 10
If keyboard traversal is enabled does nothing\&.
Otherwise, in a MenuBar,
unposts any MenuPanes associated with another MenuBar entry,
arms the CascadeButtonGadget, and posts the associated submenu\&.
In other menus,
arms the CascadeButtonGadget and posts the associated submenu after
the delay specified by \fBXmNmappingDelay\fP\&.
.IP "\fB<Leave>\fP:" 10
If keyboard traversal is enabled does nothing\&.
Otherwise, in a MenuBar,
disarms the CascadeButtonGadget
if the submenu associated with the CascadeButtonGadget is not currently
posted or if there is no submenu associated with the CascadeButtonGadget\&.
.IP "" 10
In other menus, if the pointer moves anywhere except into a submenu
associated with the CascadeButtonGadget, the CascadeButtonGadget 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
\fBObject\fP(3), \fBRectObj\fP(3),
\fBXmCascadeButtonHighlight\fP(3),
\fBXmCreateCascadeButtonGadget\fP(3),
\fBXmCreatePulldownMenu\fP(3),
\fBXmCreatePopupMenu\fP(3),
\fBXmCreateOptionMenu\fP(3),
\fBXmGadget\fP(3), \fBXmLabelGadget\fP(3),
\fBXmRowColumn\fP(3),
\fBXmVaCreateCascadeButtonGadget\fP(3), and
\fBXmVaCreateManagedCascadeButtonGadget\fP(3)\&.
|