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 libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
26 * $TOG: DtMailGenDialog.hh /main/7 1998/02/04 18:38:09 mgreess $
28 * RESTRICTED CONFIDENTIAL INFORMATION:
30 * The information in this document is subject to special
31 * restrictions in a confidential disclosure agreement between
32 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
33 * document outside HP, IBM, Sun, USL, SCO, or Univel without
34 * Sun's specific written approval. This document and all copies
35 * and derivative works thereof must be returned or destroyed at
38 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
43 //////////////////////////////////////////////////////////
44 // DtMailGenDialog.hh: A generic dialog based on MessageBox
45 //////////////////////////////////////////////////////////
46 #ifndef DTMAILGENDIALOG_HH
47 #define DTMAILGENDIALOG_HH
51 #include "UIComponent.h"
52 #include "DtMailDialogCallbackData.hh"
54 class DtMailGenDialog : public UIComponent {
66 void cleanup ( Widget, DtMailDialogCallbackData* );
70 void forceUpdate( Widget );
72 static void okCallback(Widget, XtPointer, XtPointer);
73 static void cancelCallback(Widget, XtPointer, XtPointer);
74 static void helpCallback(Widget, XtPointer, XtPointer);
75 static void otherCallback(Widget, XtPointer, XtPointer);
77 static void verifyCallback(Widget, XtPointer, XtPointer);
78 void verify(XmTextVerifyPtr cbs);
80 void setDialog(char * title, char * text, unsigned char type);
84 DtMailGenDialog(char*,Widget, int style=XmDIALOG_PRIMARY_APPLICATION_MODAL);
85 ~DtMailGenDialog() { if (NULL != _clearText) free(_clearText); };
87 char *getTextFieldValue(void);
89 void setToTextFieldDialog(char *, char *, int shroud = FALSE);
90 void setToQuestionDialog(char *, char *);
92 void setToInfoDialog(char *, char *);
93 #endif /* DEAD_WOOD */
94 void setToErrorDialog(char *, char *);
95 void setToWarningDialog(char *, char *);
96 void setToAboutDialog(void);
99 void *clientData = NULL,
100 DialogCallback ok = NULL,
101 DialogCallback cancel = NULL,
102 DialogCallback other = NULL,
103 DialogCallback help = NULL,
104 char *helpId = NULL);
105 virtual int post_and_return(char *);
106 virtual int post_and_return(char *, char *);
107 virtual int post_and_return(char *, char *, char *);
108 virtual int post_and_return(char *, char *, char *, char *);