2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: stdErrDialog.c /main/4 1995/11/02 14:06:41 rswiston $ */
24 /*********************************************************************
25 * (c) Copyright 1993, 1994 Hewlett-Packard Company
26 * (c) Copyright 1993, 1994 International Business Machines Corp.
27 * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
28 * (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
30 **********************************************************************/
31 /*******************************************************************************
34 *******************************************************************************/
38 #include <Xm/DialogS.h>
39 #include <Xm/MenuShell.h>
40 #include <Xm/MwmUtil.h>
42 #include "externals.h"
44 #include <Xm/MessageB.h>
46 /*******************************************************************************
47 Includes, Defines, and Global variables from the Declarations Editor:
48 *******************************************************************************/
52 /*******************************************************************************
53 Forward declarations of functions that are defined later in this file.
54 *******************************************************************************/
56 Widget create_stdErrDialog();
58 /*******************************************************************************
59 The following are callback functions.
60 *******************************************************************************/
63 okCallback_stdErrDialog(
66 XtPointer callbackArg )
71 /*******************************************************************************
72 The 'build_' function creates all the widgets
73 using the resource values specified in the Property Editor.
74 *******************************************************************************/
77 build_stdErrDialog( void )
79 Widget stdErrDialog_shell;
80 XmString tmpXmStr, tmpXmStr2;
85 stdErrDialog_shell = XtVaCreatePopupShell( "stdErrDialog_shell",
86 xmDialogShellWidgetClass, mainWindow,
87 XmNtitle, GETSTR(8,2, "Icon Editor - Error"),
90 tmpXmStr = GETXMSTR(8,4, "Continue");
91 tmpXmStr2= GETXMSTR(8,2, "Icon Editor - Error");
92 stdErrDialog = XtVaCreateWidget( "stdErrDialog",
93 xmMessageBoxWidgetClass, stdErrDialog_shell,
94 XmNokLabelString, tmpXmStr,
95 XmNdialogTitle, tmpXmStr2,
96 XmNdialogType, XmDIALOG_ERROR,
98 XmStringFree(tmpXmStr);
99 XmStringFree(tmpXmStr2);
101 XtAddCallback( stdErrDialog, XmNokCallback, okCallback_stdErrDialog, NULL);
104 XtSetArg (args[n], XmNuseAsyncGeometry, True); n++;
105 XtSetArg (args[n], XmNmwmInputMode,MWM_INPUT_PRIMARY_APPLICATION_MODAL);n++;
106 XtSetValues (stdErrDialog_shell, args, n);
108 return ( stdErrDialog );
112 /*******************************************************************************
113 The following is the 'Interface function' which is the
114 external entry point for creating this interface.
115 This function should be called from your application or from
117 *******************************************************************************/
120 create_stdErrDialog( void )
124 rtrn = build_stdErrDialog();
131 w1 = XmMessageBoxGetChild(w0, XmDIALOG_CANCEL_BUTTON);
132 w2 = XmMessageBoxGetChild(w0, XmDIALOG_HELP_BUTTON);
139 /*******************************************************************************
141 *******************************************************************************/