'\" 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" 3 .SH "NAME" \fBXmMessageBox\fP \(em The MessageBox widget class "XmMessageBox" "widget class" "MessageBox" .SH "SYNOPSIS" .PP .nf #include .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\fP\fB\fP:" 10 Calls the activate callbacks for the cancel button if it is sensitive\&. .IP "\fB\fP\fB\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\fP:" 10 Calls the callbacks for \fBXmNokCallback\fP\&. .IP "\fB\fP:" 10 Calls the callbacks for \fBXmNcancelCallback\fP\&. .IP "\fB\fP:" 10 Calls the callbacks for \fBXmNhelpCallback\fP\&. .IP "\fB\fP:" 10 Calls the callbacks for \fBXmNfocusCallback\fP\&. .IP "\fB\fP:" 10 Calls the callbacks for \fBXmNmapCallback\fP if the parent is a DialogShell\&. .IP "\fB\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)\&.