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 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
|
'\" t
...\" MsgBA.sgm /main/11 1996/09/26 14:54:34 cdedoc $
.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 "XmMessageBox" "library call"
.SH "NAME"
\fBXmMessageBox\fP \(em The MessageBox widget class
.iX "XmMessageBox"
.iX "widget class" "MessageBox"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/MessageB\&.h>
.fi
.SH "DESCRIPTION"
.PP
MessageBox is a dialog class used for creating simple message dialogs\&.
Convenience dialogs based on MessageBox are provided for several common
interaction tasks, which include giving information, asking questions, and
reporting errors\&.
.PP
A MessageBox dialog is typically transient in nature, displayed for the
duration of a single interaction\&.
MessageBox is a subclass of BulletinBoard and
depends on it for much of its general dialog behavior\&.
.PP
The default value for \fBXmNinitialFocus\fP
is the value of \fBXmNdefaultButton\fP\&.
.PP
A typical MessageBox contains a message symbol, a message, and up to
three standard default PushButtons: \fBOK, Cancel\fP, and \fBHelp\fP\&.
It is laid out with the symbol and message on top and the
PushButtons on the bottom\&. The \fBHelp\fP button is positioned to the side
of the other push buttons\&.
You can localize the default symbols and button labels for MessageBox
convenience dialogs\&.
.PP
The user can specify resources in a resource file for the gadgets
created automatically that contain the MessageBox symbol pixmap
and separator\&. The gadget names are \fBSymbol\fP and \fBSeparator\fP\&.
.PP
A MessageBox can also be customized by creating and managing new
children that are added to the MessageBox children created
automatically by the convenience dialogs\&.
In the case of
TemplateDialog, only the separator child is created by default\&.
If the callback, string, or pixmap symbol resources are specified,
the appropriate child will be created\&.
.PP
Additional children are laid out in the following manner:
.IP " \(bu" 6
The first MenuBar child is placed at the top of the window\&.
The \fBXmQTmenuSystem\fP trait is used to check that it is the first
MenuBar child\&.
.IP " \(bu" 6
All widgets or gadgets
are placed after the \fBOK\fP button in the order of their creation
(this order is checked using the \fBXmQTactivatable\fP trait)\&.
.IP " \(bu" 6
A child that is not in the above categories is placed above
the row of buttons\&. If a message label exists, the child is placed below
the label\&. If a message pixmap exists, but a message label is absent, the
child is placed on the same row as the pixmap\&. The child behaves as a
work area and grows or shrinks to fill the space above the
row of buttons\&. The layout of multiple work area children is
undefined\&.
.PP
At initialization, MessageBox looks for the following bitmap files:
.IP " \(bu" 6
\fBxm_error\fP
.IP " \(bu" 6
\fBxm_information\fP
.IP " \(bu" 6
\fBxm_question\fP
.IP " \(bu" 6
\fBxm_working\fP
.IP " \(bu" 6
\fBxm_warning\fP
.PP
See \fBXmGetPixmap\fP(3) for a list of the paths that are searched for
these files\&.
.PP
MessageBox uses the \fBXmQTactivatable\fP and \fBXmQTmenuSystem\fP traits\&.
.SS "Descendants"
.PP
MessageBox automatically creates the descendants shown in the
following table\&.
An application can use \fBXtNameToWidget\fP to gain access
to the named descendant\&. In addition, a user or an application
can use the named descendant when specifying resource values\&.
.TS
tab() box;
l| l| l.
\fBNamed Descendant\fP\fBClass\fP\fBIdentity\fP
___
=
___
\fBCancel\fP\fBXmPushButtonGadget\fPCancel button
___
\fBHelp\fP\fBXmPushButtonGadget\fPHelp button
___
\fBMessage\fP\fBXmLabelGadget\fPdisplayed message
___
\fBOK\fP\fBXmPushButtonGadget\fPOK button
___
\fBSeparator\fP\fBXmSeparatorGadget\fPT{
dividing line between message and buttons
T}
___
\fBSymbol\fP\fBXmLabelGadget\fPicon symbolizing message type
___
.TE
.SS "Classes"
.PP
MessageBox inherits behavior, resources, and traits from \fBCore\fP,
\fBComposite\fP, \fBConstraint\fP,
\fBXmManager\fP, and \fBXmBulletinBoard\fP\&.
.PP
The class pointer is \fBxmMessageBoxWidgetClass\fP\&.
.PP
The class name is \fBXmMessageBox\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.
\fBXmMessageBox Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNcancelCallbackXmCCallbackXtCallbackListNULLC
_____
XmNcancelLabelStringXmCCancelLabelStringXmStringdynamicCSG
_____
XmNdefaultButtonTypeXmCDefaultButtonTypeunsigned charXmDIALOG_OK_BUTTONCSG
_____
XmNdialogTypeXmCDialogTypeunsigned charXmDIALOG_MESSAGECSG
_____
XmNhelpLabelStringXmCHelpLabelStringXmStringdynamicCSG
_____
XmNmessageAlignmentXmCAlignmentunsigned charXmALIGNMENT_BEGINNINGCSG
_____
XmNmessageStringXmCMessageStringXmString""CSG
_____
XmNminimizeButtonsXmCMinimizeButtonsBooleanFalseCSG
_____
XmNokCallbackXmCCallbackXtCallbackListNULLC
_____
XmNokLabelStringXmCOkLabelStringXmStringdynamicCSG
_____
XmNsymbolPixmapXmCPixmapPixmapdynamicCSG
_____
.TE
.IP "\fBXmNcancelCallback\fP" 10
Specifies the list of callbacks that is called when
the user clicks on the cancel button\&.
The reason sent by the callback is \fBXmCR_CANCEL\fP\&.
.IP "\fBXmNcancelLabelString\fP" 10
Specifies the string label for the cancel button\&.
The default for this resource depends on the locale\&.
In the C locale the default is \fBCancel\fP\&.
.IP "" 10
Now that some default localized label strings are provided through
message catalogs for the children of composite widgets, the
\fBlabelString\fP resources
cannot be set on the child through default resource files\&.
Instead, the resource provided at the parent level must be used\&.
.IP "\fBXmNdefaultButtonType\fP" 10
Specifies the default PushButton\&.
A value of \fBXmDIALOG_NONE\fP means that there should be no default
PushButton\&.
The following types are valid:
.RS
.IP " \(bu" 6
\fBXmDIALOG_CANCEL_BUTTON\fP
.IP " \(bu" 6
\fBXmDIALOG_OK_BUTTON\fP
.IP " \(bu" 6
\fBXmDIALOG_HELP_BUTTON\fP
.IP " \(bu" 6
\fBXmDIALOG_NONE\fP
.RE
.IP "\fBXmNdialogType\fP" 10
Specifies the type of MessageBox dialog, which determines
the default message symbol\&.
The following are the possible values for this resource:
.RS
.IP "\fBXmDIALOG_ERROR\fP" 10
Indicates an ErrorDialog\&.
.IP "\fBXmDIALOG_INFORMATION\fP" 10
Indicates an InformationDialog\&.
.IP "\fBXmDIALOG_MESSAGE\fP" 10
Indicates a MessageDialog\&.
This is the default MessageBox dialog type\&.
It does not have an associated message symbol\&.
.IP "\fBXmDIALOG_QUESTION\fP" 10
Indicates a QuestionDialog\&.
.IP "\fBXmDIALOG_TEMPLATE\fP" 10
Indicates a TemplateDialog\&.
The TemplateDialog contains only a separator child\&. It does not
have an associated message symbol\&.
.IP "\fBXmDIALOG_WARNING\fP" 10
Indicates a WarningDialog\&.
.IP "\fBXmDIALOG_WORKING\fP" 10
Indicates a WorkingDialog\&.
.RE
.IP "" 10
If this resource is changed with \fBXtSetValues\fP, the symbol bitmap is
modified to the new \fBXmNdialogType\fP bitmap unless
\fBXmNsymbolPixmap\fP is also being set in the call to
\fBXtSetValues\fP\&.
If the dialog type does not have an associated message symbol, then no
bitmap will be displayed\&.
.IP "\fBXmNhelpLabelString\fP" 10
Specifies the string label for the help button\&.
The default for this resource depends on the locale\&.
In the C locale the default is \fBHelp\fP\&.
.IP "" 10
Now that some default localized label strings are provided through
message catalogs for the children of composite widgets, the
\fBlabelString\fP resources
cannot be set on the child through default resource files\&.
Instead, the resource provided at the parent level must be used\&.
.IP "\fBXmNmessageAlignment\fP" 10
Controls the alignment of the message Label\&.
Possible values include the following:
.RS
.IP " \(bu" 6
\fBXmALIGNMENT_BEGINNING\fP (default)
.IP " \(bu" 6
\fBXmALIGNMENT_CENTER\fP
.IP " \(bu" 6
\fBXmALIGNMENT_END\fP
.RE
.IP "" 10
See the description of \fBXmNalignment\fP in the \fBXmLabel\fP
reference page for an explanation of these values\&.
.IP "\fBXmNmessageString\fP" 10
Specifies the string to be used as the message\&.
.IP "\fBXmNminimizeButtons\fP" 10
Sets the buttons to the width of the widest button and height of the
tallest button if False\&. If this resource is True,
button width and height are
set to the preferred size of each button\&.
.IP "\fBXmNokCallback\fP" 10
Specifies the list of callbacks that is called when
the user clicks on the OK button\&.
The reason sent by the callback is \fBXmCR_OK\fP\&.
.IP "\fBXmNokLabelString\fP" 10
Specifies the string label for the OK button\&.
The default for this resource depends on the locale\&.
In the C locale the default is \fBOK\fP\&.
.IP "" 10
Now that some default localized label strings are provided through
message catalogs for the children of composite widgets, the
\fBlabelString\fP resources
cannot be set on the child through default resource files\&.
Instead, the resource provided at the parent level must be used\&.
.IP "\fBXmNsymbolPixmap\fP" 10
Specifies the pixmap label to be used as the message symbol\&.
.SS "Inherited Resources"
.PP
MessageBox 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.
\fBXmBulletinBoard Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNallowOverlapXmCAllowOverlapBooleanTrueCSG
_____
XmNautoUnmanageXmCAutoUnmanageBooleanTrueCG
_____
XmNbuttonFontListXmCButtonFontListXmFontListdynamicCSG
_____
XmNbuttonRenderTableXmCButtonRenderTableXmRenderTabledynamicCSG
_____
XmNcancelButtonXmCWidgetWidgetCancel buttonSG
_____
XmNdefaultButtonXmCWidgetWidgetdynamicSG
_____
XmNdefaultPositionXmCDefaultPositionBooleanTrueCSG
_____
XmNdialogStyleXmCDialogStyleunsigned chardynamicCSG
_____
XmNdialogTitleXmCDialogTitleXmStringNULLCSG
_____
XmNfocusCallbackXmCCallbackXtCallbackListNULLC
_____
XmNlabelFontListXmCLabelFontListXmFontListdynamicCSG
_____
XmNlabelRenderTableXmCLabelRenderTableXmRenderTabledynamicCSG
_____
XmNmapCallbackXmCCallbackXtCallbackListNULLC
_____
XmNmarginHeightXmCMarginHeightDimension10CSG
_____
XmNmarginWidthXmCMarginWidthDimension10CSG
_____
XmNnoResizeXmCNoResizeBooleanFalseCSG
_____
XmNresizePolicyXmCResizePolicyunsigned charXmRESIZE_ANYCSG
_____
XmNshadowTypeXmCShadowTypeunsigned charXmSHADOW_OUTCSG
_____
XmNtextFontListXmCTextFontListXmFontListdynamicCSG
_____
XmNtextRenderTableXmCTextRenderTableXmRenderTabledynamicCSG
_____
XmNtextTranslationsXmCTranslationsXtTranslationsNULLC
_____
XmNunmapCallbackXmCCallbackXtCallbackListNULLC
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmManager Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
_____
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNforegroundXmCForegroundPixeldynamicCSG
_____
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
_____
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
_____
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
_____
XmNinitialFocusXmCInitialFocusWidgetdynamicCSG
_____
XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG
_____
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmTAB_GROUPCSG
_____
XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC
_____
XmNshadowThicknessXmCShadowThicknessDimensiondynamicCSG
_____
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
.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
_____
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicN/A
_____
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 *\fIevent\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
.SS "Translations"
.PP
\fBXmMessageBox\fP includes the translations from \fBXmManager\fP\&.
.SS "Additional Behavior"
.PP
The \fBXmMessageBox\fP widget has the following additional behavior:
.IP "\fB<Key>\fP\fB<osfCancel>\fP:" 10
Calls the activate callbacks for the cancel button if it is sensitive\&.
.IP "\fB<Key>\fP\fB<osfActivate>\fP:" 10
Calls the activate callbacks for the button with the keyboard focus\&.
If no button has the keyboard focus, calls the activate callbacks
for the default button if it is sensitive\&.
.IP "\fB<Ok\ Button\ Activated>\fP:" 10
Calls the callbacks for \fBXmNokCallback\fP\&.
.IP "\fB<Cancel\ Button\ Activated>\fP:" 10
Calls the callbacks for \fBXmNcancelCallback\fP\&.
.IP "\fB<Help\ Button\ Activated>\fP:" 10
Calls the callbacks for \fBXmNhelpCallback\fP\&.
.IP "\fB<FocusIn>\fP:" 10
Calls the callbacks for \fBXmNfocusCallback\fP\&.
.IP "\fB<Map>\fP:" 10
Calls the callbacks for \fBXmNmapCallback\fP if the parent is a
DialogShell\&.
.IP "\fB<Unmap>\fP:" 10
Calls the callbacks for \fBXmNunmapCallback\fP if the parent is a
DialogShell\&.
.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),
\fBConstraint\fP(3),
\fBCore\fP(3),
\fBXmBulletinBoard\fP(3),
\fBXmCreateErrorDialog\fP(3),
\fBXmCreateInformationDialog\fP(3),
\fBXmCreateMessageBox\fP(3),
\fBXmCreateMessageDialog\fP(3),
\fBXmCreateQuestionDialog\fP(3),
\fBXmCreateTemplateDialog\fP(3),
\fBXmCreateWarningDialog\fP(3),
\fBXmCreateWorkingDialog\fP(3),
\fBXmManager\fP(3),
\fBXmMessageBoxGetChild\fP(3),
\fBXmVaCreateMessageBox\fP(3), and
\fBXmVaCreateManagedMessageBox\fP(3)\&.
|