File: Dialogs.h

package info (click to toggle)
gridengine 6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 51,532 kB
  • ctags: 51,172
  • sloc: ansic: 418,155; java: 37,080; sh: 22,593; jsp: 7,699; makefile: 5,292; csh: 4,244; xml: 2,901; cpp: 2,086; perl: 1,895; tcl: 1,188; lisp: 669; ruby: 642; yacc: 393; lex: 266
file content (314 lines) | stat: -rw-r--r-- 10,326 bytes parent folder | download | duplicates (3)
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
/* 
 * Motif Tools Library, Version 3.1
 * $Id$
 * 
 * Written by David Flanagan.
 * Copyright (c) 1992-2001 by David Flanagan.
 * All Rights Reserved.  See the file COPYRIGHT for details.
 * This is open source software.  See the file LICENSE for details.
 * There is no warranty for this software.  See NO_WARRANTY for details.
 *
 * $Log$
 * Revision 1.1.1.1  2001/07/18 11:06:02  root
 * Initial checkin.
 *
 * Revision 1.2  2001/06/12 16:25:28  andre
 * *** empty log message ***
 *
 *
 */

#ifndef _XmtDialogs_h
#define _XmtDialogs_h    

#include <stdio.h>

typedef enum {
    XmtCancelButton,
    XmtOkButton,
    XmtHelpButton,
    XmtApplyButton,
    XmtResetButton,
    XmtDoneButton,
    XmtStopButton,
    XmtYesButton,	
    XmtNoButton
} XmtButtonType;

/*
 * These are the names of some of the dialogs we create
 */
#define XmtMESSAGE_DIALOG_NAME "xmtMessageDialog"
#define XmtMESSAGE_DIALOG_SHELL_NAME "xmtMessageDialogShell"
#define XmtWORKING_DIALOG_NAME "xmtWorkingDialog"
#define XmtWORKING_DIALOG_SHELL_NAME "xmtWorkingDialogShell"
#define XmtSTRING_DIALOG_NAME "xmtStringDialog"
#define XmtSTRING_DIALOG_SHELL_NAME "xmtStringDialogShell"
#define XmtBOOLEAN_DIALOG_NAME "xmtBooleanDialog"
#define XmtBOOLEAN_DIALOG_SHELL_NAME "xmtBooleanDialogShell"
#define XmtFILE_DIALOG_NAME "xmtFileDialog"
#define XmtFILE_DIALOG_SHELL_NAME "xmtFileDialogShell"
#define XmtITEM_DIALOG_NAME "xmtItemDialog"
#define XmtITEM_DIALOG_SHELL_NAME "xmtItemDialogShell"

/*
 * And here are some other strings used by the dialogs
 */
#define XmtMESSAGE_DIALOG_TITLE_DEFAULT "Message"
#define XmtERROR_DIALOG_TITLE_DEFAULT "Error"
#define XmtWARNING_DIALOG_TITLE_DEFAULT "Warning"
#define XmtINFO_DIALOG_TITLE_DEFAULT "Help"
#define XmtBOOLEAN_DIALOG_YES_DEFAULT "Yes"
#define XmtBOOLEAN_DIALOG_NO_DEFAULT "No"
#define XmtBOOLEAN_DIALOG_CANCEL_DEFAULT "Cancel"
#define XmtHELP_BUTTON_LABEL_DEFAULT "Help"
#define XmtFILE_DIALOG_PROMPT_DEFAULT "Selection"  /* The Motif default */
#define XmtSTRING_DIALOG_TITLE_DEFAULT "Enter a String"
#define XmtINT_DIALOG_TITLE_DEFAULT "Enter an Integer"
#define XmtDOUBLE_DIALOG_TITLE_DEFAULT "Enter a Number"
#define XmtBOOLEAN_DIALOG_TITLE_DEFAULT "Question"
#define XmtFILE_DIALOG_TITLE_DEFAULT "Select a File"
#define XmtITEM_DIALOG_TITLE_DEFAULT "Select an Item"
#define XmtWORKING_DIALOG_TITLE_DEFAULT "Working"
#define XmtWORKING_DIALOG_SCALE_LABEL_DEFAULT "% Complete:"
#define XmtWORKING_DIALOG_BUTTON_LABEL_DEFAULT "Stop"

/*
 * Class names under which we look up resources for instantiations
 * of cached dialogs.
 */
#define XmtCMessageDialog "XmtMessageDialog"
#define XmtCWarningDialog "XmtWarningDialog"
#define XmtCErrorDialog   "XmtErrorDialog"
#define XmtCInformationDialog "XmtInformationDialog"
#define XmtCWorkingDialog "XmtWorkingDialog"
#define XmtCStringDialog "XmtStringDialog"
#define XmtCBooleanDialog "XmtBooleanDialog"
#define XmtCIntDialog "XmtIntDialog"
#define XmtCDoubleDialog "XmtDoubleDialog"
#define XmtCFileDialog "XmtFileDialog"
#define XmtCItemDialog "XmtItemDialog"

/*
 * Names and classes for the resources we look up for
 * each instantiation of a cached dialog.  Different
 * dialog types look up different resources.
 */
#ifndef XmtNmessage
#define XmtNmessage "message"
#endif
#ifndef XmtCMessage
#define XmtCMessage "Message"
#endif
#ifndef XmtNtitle
#define XmtNtitle "title"
#endif
#ifndef XmtCTitle
#define XmtCTitle "Title"
#endif
#ifndef XmtNyesLabel
#define XmtNyesLabel "yesLabel"
#endif
#ifndef XmtCYesLabel
#define XmtCYesLabel "YesLabel"
#endif
#ifndef XmtNnoLabel
#define XmtNnoLabel "noLabel"
#endif
#ifndef XmtCNoLabel
#define XmtCNoLabel "NoLabel"
#endif
#ifndef XmtNcancelLabel
#define XmtNcancelLabel "cancelLabel"
#endif
#ifndef XmtCCancelLabel
#define XmtCCancelLabel "CancelLabel"
#endif
#ifndef XmtNhelpText
#define XmtNhelpText "helpText"
#endif
#ifndef XmtCHelpText
#define XmtCHelpText "HelpText"
#endif
#ifndef XmtNicon
#define XmtNicon "icon"
#endif
#ifndef XmtCIcon
#define XmtCIcon "Icon"
#endif
#ifndef XmtNdefaultButton
#define XmtNdefaultButton "defaultButton"
#endif
#ifndef XmtCDefaultButton
#define XmtCDefaultButton "DefaultButton"
#endif
#ifndef XmtNiconType
#define XmtNiconType "iconType"
#endif
#ifndef XmtCIconType
#define XmtCIconType "IconType"
#endif
#ifndef XmtNmin
#define XmtNmin "min"
#endif
#ifndef XmtCMin
#define XmtCMin "Min"
#endif
#ifndef XmtNmax
#define XmtNmax "max"
#endif
#ifndef XmtCMax
#define XmtCMax "Max"
#endif
#ifndef XmtNdirectory
#define XmtNdirectory "directory"
#endif
#ifndef XmtCDirectory
#define XmtCDirectory "Directory"
#endif
#ifndef XmtNpattern
#define XmtNpattern "pattern"
#endif
#ifndef XmtCPattern
#define XmtCPattern "Pattern"
#endif
#ifndef XmtNlistTitle
#define XmtNlistTitle "listTitle"
#endif
#ifndef XmtCListTitle
#define XmtCListTitle "ListTitle"
#endif
#ifndef XmtNitems
#define XmtNitems "items"
#endif
#ifndef XmtCItems
#define XmtCItems "Items"
#endif
#ifndef XmtNvisibleItems
#define XmtNvisibleItems "visibleItems"
#endif
#ifndef XmtCVisibleItems
#define XmtCVisibleItems "VisibleItems"
#endif

/* names of dialogs used by other Xmt dialog routines */
#define XmtBAD_INT_DIALOG     "xmtBadIntDialog"
#define XmtBAD_DOUBLE_DIALOG  "xmtBadDoubleDialog"
#define XmtTOO_SMALL_DIALOG   "xmtTooSmallDialog"
#define XmtTOO_BIG_DIALOG     "xmtTooBigDialog"
#define XmtCANT_OPEN_DIALOG   "xmtCantOpenDialog"
#define XmtNO_MATCH_DIALOG    "xmtNoMatchDialog"    

/* error messages displayed in dialogs by Xmt routines */
#define XmtBAD_INT_MESSAGE     "Please enter an integer."
#define XmtBAD_DOUBLE_MESSAGE  "Please enter a number."
#define XmtTOO_SMALL_MESSAGE   "Please enter a larger number."
#define XmtTOO_BIG_MESSAGE     "Please enter a smaller number."
#define XmtNO_MATCH_MESSAGE    "Please select an item that appears\n\
on the list."

_XFUNCPROTOBEGIN
#if NeedFunctionPrototypes
extern void XmtDisplayWarning(Widget, StringConst, StringConst);
extern void XmtDisplayError(Widget, StringConst, StringConst);
extern void XmtDisplayInformation(Widget,StringConst,StringConst, StringConst);
extern void XmtDisplayMessageVaList(Widget, StringConst, StringConst,
				    StringConst, StringConst, StringConst,
				    Pixmap, int, int, va_list);
extern void XmtDisplayMessageAndWaitVaList(Widget, StringConst, StringConst,
				           StringConst, StringConst,
					   StringConst, Pixmap,
					   int, int, va_list);
extern Widget XmtDisplayWorkingDialog(Widget, StringConst,
			       StringConst, StringConst, StringConst, int, int,
			       XmtWideBoolean, XmtWideBoolean);
extern void XmtHideWorkingDialog(Widget);
extern Boolean XmtAskForString(Widget, StringConst, StringConst, String, int,
			       StringConst);
extern Boolean XmtAskForInteger(Widget, StringConst, StringConst,
				int *, int, int, StringConst);
extern Boolean XmtAskForDouble(Widget, StringConst, StringConst, double *,
			       double, double, StringConst);
extern Boolean XmtAskForBoolean(Widget, StringConst, StringConst,
				StringConst, StringConst, StringConst,
				XmtButtonType, int, XmtWideBoolean, Boolean *,
				StringConst);
extern Boolean XmtDisplayErrorAndAsk(Widget, StringConst,
				     StringConst, StringConst, StringConst,
				     XmtButtonType, StringConst);
extern Boolean XmtDisplayWarningAndAsk(Widget, StringConst,
				       StringConst, StringConst, StringConst,
				       XmtButtonType, StringConst);
extern Boolean XmtAskForFilename(Widget, StringConst,
				 StringConst, StringConst, StringConst,
				 String, int, String, int, String, int,
				 StringConst);
extern Boolean XmtAskForFile(Widget, StringConst,
			     StringConst, StringConst, StringConst,
			     FILE **, StringConst,
			     String, int, String, int, String, int,
			     StringConst);
extern Boolean XmtAskForItem(Widget, StringConst, StringConst, StringConst,
			     String *, int, XmtWideBoolean,
			     String, int, StringConst);
extern Boolean XmtAskForItemNumber(Widget, StringConst,
				   StringConst, StringConst,
				   String *, int, int *, StringConst);
extern void XmtDialogPosition(Widget, Widget);
#else
extern void XmtDisplayWarning();
extern void XmtDisplayError();
extern void XmtDisplayInformation();
extern void XmtDisplayMessageVaList();
extern void XmtDisplayMessageAndWaitVaList();
extern Widget XmtDisplayWorkingDialog();
extern void XmtHideWorkingDialog();
extern Boolean XmtAskForString();
extern Boolean XmtAskForInteger();
extern Boolean XmtAskForDouble();
extern Boolean XmtAskForBoolean();
extern Boolean XmtDisplayErrorAndAsk();
extern Boolean XmtDisplayWarningAndAsk();
extern Boolean XmtAskForFilename();
extern Boolean XmtAskForFile();
extern Boolean XmtAskForItem();
extern Boolean XmtAskForItemNumber();
extern void XmtDialogPosition();
#endif

#if NeedVarargsPrototypes
extern void XmtDisplayMessage(Widget, StringConst, StringConst,
			      StringConst, StringConst, StringConst, Pixmap,
			      int, int, ...)
                              gcc_printf_func(4,10);
extern void XmtDisplayWarningMsg(Widget, StringConst, StringConst,
				 StringConst, StringConst, ...)
                                 gcc_printf_func(3,6);
extern void XmtDisplayErrorMsg(Widget, StringConst, StringConst,
			       StringConst, StringConst, ...)
                               gcc_printf_func(3,6);
extern void XmtDisplayInformationMsg(Widget, StringConst, StringConst,
				     StringConst, StringConst, ...)
                                     gcc_printf_func(3,6);
extern void XmtDisplayMessageAndWait(Widget, StringConst, StringConst,
				     StringConst, StringConst, StringConst,
				     Pixmap, int, int, ...)
                                     gcc_printf_func(4,10);
extern void XmtDisplayWarningMsgAndWait(Widget, StringConst, StringConst,
					StringConst, StringConst, ...)
                                        gcc_printf_func(3,6);
extern void XmtDisplayErrorMsgAndWait(Widget, StringConst, StringConst,
				      StringConst, StringConst, ...)
                                      gcc_printf_func(3,6);
#else
extern void XmtDisplayMessage();
extern void XmtDisplayWarningMsg();
extern void XmtDisplayErrorMsg();
extern void XmtDisplayInformationMsg();
extern void XmtDisplayMessageAndWait();
extern void XmtDisplayWarningMsgAndWait();
extern void XmtDisplayErrorMsgAndWait();
#endif
_XFUNCPROTOEND

#endif  /* _XmtDialogs_h */