~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qmon/Xmt310/Xmt/Dialogs.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Motif Tools Library, Version 3.1
 
3
 * $Id$
 
4
 * 
 
5
 * Written by David Flanagan.
 
6
 * Copyright (c) 1992-2001 by David Flanagan.
 
7
 * All Rights Reserved.  See the file COPYRIGHT for details.
 
8
 * This is open source software.  See the file LICENSE for details.
 
9
 * There is no warranty for this software.  See NO_WARRANTY for details.
 
10
 *
 
11
 * $Log$
 
12
 * Revision 1.1.1.1  2001/07/18 11:06:02  root
 
13
 * Initial checkin.
 
14
 *
 
15
 * Revision 1.2  2001/06/12 16:25:28  andre
 
16
 * *** empty log message ***
 
17
 *
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef _XmtDialogs_h
 
22
#define _XmtDialogs_h    
 
23
 
 
24
#include <stdio.h>
 
25
 
 
26
typedef enum {
 
27
    XmtCancelButton,
 
28
    XmtOkButton,
 
29
    XmtHelpButton,
 
30
    XmtApplyButton,
 
31
    XmtResetButton,
 
32
    XmtDoneButton,
 
33
    XmtStopButton,
 
34
    XmtYesButton,       
 
35
    XmtNoButton
 
36
} XmtButtonType;
 
37
 
 
38
/*
 
39
 * These are the names of some of the dialogs we create
 
40
 */
 
41
#define XmtMESSAGE_DIALOG_NAME "xmtMessageDialog"
 
42
#define XmtMESSAGE_DIALOG_SHELL_NAME "xmtMessageDialogShell"
 
43
#define XmtWORKING_DIALOG_NAME "xmtWorkingDialog"
 
44
#define XmtWORKING_DIALOG_SHELL_NAME "xmtWorkingDialogShell"
 
45
#define XmtSTRING_DIALOG_NAME "xmtStringDialog"
 
46
#define XmtSTRING_DIALOG_SHELL_NAME "xmtStringDialogShell"
 
47
#define XmtBOOLEAN_DIALOG_NAME "xmtBooleanDialog"
 
48
#define XmtBOOLEAN_DIALOG_SHELL_NAME "xmtBooleanDialogShell"
 
49
#define XmtFILE_DIALOG_NAME "xmtFileDialog"
 
50
#define XmtFILE_DIALOG_SHELL_NAME "xmtFileDialogShell"
 
51
#define XmtITEM_DIALOG_NAME "xmtItemDialog"
 
52
#define XmtITEM_DIALOG_SHELL_NAME "xmtItemDialogShell"
 
53
 
 
54
/*
 
55
 * And here are some other strings used by the dialogs
 
56
 */
 
57
#define XmtMESSAGE_DIALOG_TITLE_DEFAULT "Message"
 
58
#define XmtERROR_DIALOG_TITLE_DEFAULT "Error"
 
59
#define XmtWARNING_DIALOG_TITLE_DEFAULT "Warning"
 
60
#define XmtINFO_DIALOG_TITLE_DEFAULT "Help"
 
61
#define XmtBOOLEAN_DIALOG_YES_DEFAULT "Yes"
 
62
#define XmtBOOLEAN_DIALOG_NO_DEFAULT "No"
 
63
#define XmtBOOLEAN_DIALOG_CANCEL_DEFAULT "Cancel"
 
64
#define XmtHELP_BUTTON_LABEL_DEFAULT "Help"
 
65
#define XmtFILE_DIALOG_PROMPT_DEFAULT "Selection"  /* The Motif default */
 
66
#define XmtSTRING_DIALOG_TITLE_DEFAULT "Enter a String"
 
67
#define XmtINT_DIALOG_TITLE_DEFAULT "Enter an Integer"
 
68
#define XmtDOUBLE_DIALOG_TITLE_DEFAULT "Enter a Number"
 
69
#define XmtBOOLEAN_DIALOG_TITLE_DEFAULT "Question"
 
70
#define XmtFILE_DIALOG_TITLE_DEFAULT "Select a File"
 
71
#define XmtITEM_DIALOG_TITLE_DEFAULT "Select an Item"
 
72
#define XmtWORKING_DIALOG_TITLE_DEFAULT "Working"
 
73
#define XmtWORKING_DIALOG_SCALE_LABEL_DEFAULT "% Complete:"
 
74
#define XmtWORKING_DIALOG_BUTTON_LABEL_DEFAULT "Stop"
 
75
 
 
76
/*
 
77
 * Class names under which we look up resources for instantiations
 
78
 * of cached dialogs.
 
79
 */
 
80
#define XmtCMessageDialog "XmtMessageDialog"
 
81
#define XmtCWarningDialog "XmtWarningDialog"
 
82
#define XmtCErrorDialog   "XmtErrorDialog"
 
83
#define XmtCInformationDialog "XmtInformationDialog"
 
84
#define XmtCWorkingDialog "XmtWorkingDialog"
 
85
#define XmtCStringDialog "XmtStringDialog"
 
86
#define XmtCBooleanDialog "XmtBooleanDialog"
 
87
#define XmtCIntDialog "XmtIntDialog"
 
88
#define XmtCDoubleDialog "XmtDoubleDialog"
 
89
#define XmtCFileDialog "XmtFileDialog"
 
90
#define XmtCItemDialog "XmtItemDialog"
 
91
 
 
92
/*
 
93
 * Names and classes for the resources we look up for
 
94
 * each instantiation of a cached dialog.  Different
 
95
 * dialog types look up different resources.
 
96
 */
 
97
#ifndef XmtNmessage
 
98
#define XmtNmessage "message"
 
99
#endif
 
100
#ifndef XmtCMessage
 
101
#define XmtCMessage "Message"
 
102
#endif
 
103
#ifndef XmtNtitle
 
104
#define XmtNtitle "title"
 
105
#endif
 
106
#ifndef XmtCTitle
 
107
#define XmtCTitle "Title"
 
108
#endif
 
109
#ifndef XmtNyesLabel
 
110
#define XmtNyesLabel "yesLabel"
 
111
#endif
 
112
#ifndef XmtCYesLabel
 
113
#define XmtCYesLabel "YesLabel"
 
114
#endif
 
115
#ifndef XmtNnoLabel
 
116
#define XmtNnoLabel "noLabel"
 
117
#endif
 
118
#ifndef XmtCNoLabel
 
119
#define XmtCNoLabel "NoLabel"
 
120
#endif
 
121
#ifndef XmtNcancelLabel
 
122
#define XmtNcancelLabel "cancelLabel"
 
123
#endif
 
124
#ifndef XmtCCancelLabel
 
125
#define XmtCCancelLabel "CancelLabel"
 
126
#endif
 
127
#ifndef XmtNhelpText
 
128
#define XmtNhelpText "helpText"
 
129
#endif
 
130
#ifndef XmtCHelpText
 
131
#define XmtCHelpText "HelpText"
 
132
#endif
 
133
#ifndef XmtNicon
 
134
#define XmtNicon "icon"
 
135
#endif
 
136
#ifndef XmtCIcon
 
137
#define XmtCIcon "Icon"
 
138
#endif
 
139
#ifndef XmtNdefaultButton
 
140
#define XmtNdefaultButton "defaultButton"
 
141
#endif
 
142
#ifndef XmtCDefaultButton
 
143
#define XmtCDefaultButton "DefaultButton"
 
144
#endif
 
145
#ifndef XmtNiconType
 
146
#define XmtNiconType "iconType"
 
147
#endif
 
148
#ifndef XmtCIconType
 
149
#define XmtCIconType "IconType"
 
150
#endif
 
151
#ifndef XmtNmin
 
152
#define XmtNmin "min"
 
153
#endif
 
154
#ifndef XmtCMin
 
155
#define XmtCMin "Min"
 
156
#endif
 
157
#ifndef XmtNmax
 
158
#define XmtNmax "max"
 
159
#endif
 
160
#ifndef XmtCMax
 
161
#define XmtCMax "Max"
 
162
#endif
 
163
#ifndef XmtNdirectory
 
164
#define XmtNdirectory "directory"
 
165
#endif
 
166
#ifndef XmtCDirectory
 
167
#define XmtCDirectory "Directory"
 
168
#endif
 
169
#ifndef XmtNpattern
 
170
#define XmtNpattern "pattern"
 
171
#endif
 
172
#ifndef XmtCPattern
 
173
#define XmtCPattern "Pattern"
 
174
#endif
 
175
#ifndef XmtNlistTitle
 
176
#define XmtNlistTitle "listTitle"
 
177
#endif
 
178
#ifndef XmtCListTitle
 
179
#define XmtCListTitle "ListTitle"
 
180
#endif
 
181
#ifndef XmtNitems
 
182
#define XmtNitems "items"
 
183
#endif
 
184
#ifndef XmtCItems
 
185
#define XmtCItems "Items"
 
186
#endif
 
187
#ifndef XmtNvisibleItems
 
188
#define XmtNvisibleItems "visibleItems"
 
189
#endif
 
190
#ifndef XmtCVisibleItems
 
191
#define XmtCVisibleItems "VisibleItems"
 
192
#endif
 
193
 
 
194
/* names of dialogs used by other Xmt dialog routines */
 
195
#define XmtBAD_INT_DIALOG     "xmtBadIntDialog"
 
196
#define XmtBAD_DOUBLE_DIALOG  "xmtBadDoubleDialog"
 
197
#define XmtTOO_SMALL_DIALOG   "xmtTooSmallDialog"
 
198
#define XmtTOO_BIG_DIALOG     "xmtTooBigDialog"
 
199
#define XmtCANT_OPEN_DIALOG   "xmtCantOpenDialog"
 
200
#define XmtNO_MATCH_DIALOG    "xmtNoMatchDialog"    
 
201
 
 
202
/* error messages displayed in dialogs by Xmt routines */
 
203
#define XmtBAD_INT_MESSAGE     "Please enter an integer."
 
204
#define XmtBAD_DOUBLE_MESSAGE  "Please enter a number."
 
205
#define XmtTOO_SMALL_MESSAGE   "Please enter a larger number."
 
206
#define XmtTOO_BIG_MESSAGE     "Please enter a smaller number."
 
207
#define XmtNO_MATCH_MESSAGE    "Please select an item that appears\n\
 
208
on the list."
 
209
 
 
210
_XFUNCPROTOBEGIN
 
211
#if NeedFunctionPrototypes
 
212
extern void XmtDisplayWarning(Widget, StringConst, StringConst);
 
213
extern void XmtDisplayError(Widget, StringConst, StringConst);
 
214
extern void XmtDisplayInformation(Widget,StringConst,StringConst, StringConst);
 
215
extern void XmtDisplayMessageVaList(Widget, StringConst, StringConst,
 
216
                                    StringConst, StringConst, StringConst,
 
217
                                    Pixmap, int, int, va_list);
 
218
extern void XmtDisplayMessageAndWaitVaList(Widget, StringConst, StringConst,
 
219
                                           StringConst, StringConst,
 
220
                                           StringConst, Pixmap,
 
221
                                           int, int, va_list);
 
222
extern Widget XmtDisplayWorkingDialog(Widget, StringConst,
 
223
                               StringConst, StringConst, StringConst, int, int,
 
224
                               XmtWideBoolean, XmtWideBoolean);
 
225
extern void XmtHideWorkingDialog(Widget);
 
226
extern Boolean XmtAskForString(Widget, StringConst, StringConst, String, int,
 
227
                               StringConst);
 
228
extern Boolean XmtAskForInteger(Widget, StringConst, StringConst,
 
229
                                int *, int, int, StringConst);
 
230
extern Boolean XmtAskForDouble(Widget, StringConst, StringConst, double *,
 
231
                               double, double, StringConst);
 
232
extern Boolean XmtAskForBoolean(Widget, StringConst, StringConst,
 
233
                                StringConst, StringConst, StringConst,
 
234
                                XmtButtonType, int, XmtWideBoolean, Boolean *,
 
235
                                StringConst);
 
236
extern Boolean XmtDisplayErrorAndAsk(Widget, StringConst,
 
237
                                     StringConst, StringConst, StringConst,
 
238
                                     XmtButtonType, StringConst);
 
239
extern Boolean XmtDisplayWarningAndAsk(Widget, StringConst,
 
240
                                       StringConst, StringConst, StringConst,
 
241
                                       XmtButtonType, StringConst);
 
242
extern Boolean XmtAskForFilename(Widget, StringConst,
 
243
                                 StringConst, StringConst, StringConst,
 
244
                                 String, int, String, int, String, int,
 
245
                                 StringConst);
 
246
extern Boolean XmtAskForFile(Widget, StringConst,
 
247
                             StringConst, StringConst, StringConst,
 
248
                             FILE **, StringConst,
 
249
                             String, int, String, int, String, int,
 
250
                             StringConst);
 
251
extern Boolean XmtAskForItem(Widget, StringConst, StringConst, StringConst,
 
252
                             String *, int, XmtWideBoolean,
 
253
                             String, int, StringConst);
 
254
extern Boolean XmtAskForItemNumber(Widget, StringConst,
 
255
                                   StringConst, StringConst,
 
256
                                   String *, int, int *, StringConst);
 
257
extern void XmtDialogPosition(Widget, Widget);
 
258
#else
 
259
extern void XmtDisplayWarning();
 
260
extern void XmtDisplayError();
 
261
extern void XmtDisplayInformation();
 
262
extern void XmtDisplayMessageVaList();
 
263
extern void XmtDisplayMessageAndWaitVaList();
 
264
extern Widget XmtDisplayWorkingDialog();
 
265
extern void XmtHideWorkingDialog();
 
266
extern Boolean XmtAskForString();
 
267
extern Boolean XmtAskForInteger();
 
268
extern Boolean XmtAskForDouble();
 
269
extern Boolean XmtAskForBoolean();
 
270
extern Boolean XmtDisplayErrorAndAsk();
 
271
extern Boolean XmtDisplayWarningAndAsk();
 
272
extern Boolean XmtAskForFilename();
 
273
extern Boolean XmtAskForFile();
 
274
extern Boolean XmtAskForItem();
 
275
extern Boolean XmtAskForItemNumber();
 
276
extern void XmtDialogPosition();
 
277
#endif
 
278
 
 
279
#if NeedVarargsPrototypes
 
280
extern void XmtDisplayMessage(Widget, StringConst, StringConst,
 
281
                              StringConst, StringConst, StringConst, Pixmap,
 
282
                              int, int, ...)
 
283
                              gcc_printf_func(4,10);
 
284
extern void XmtDisplayWarningMsg(Widget, StringConst, StringConst,
 
285
                                 StringConst, StringConst, ...)
 
286
                                 gcc_printf_func(3,6);
 
287
extern void XmtDisplayErrorMsg(Widget, StringConst, StringConst,
 
288
                               StringConst, StringConst, ...)
 
289
                               gcc_printf_func(3,6);
 
290
extern void XmtDisplayInformationMsg(Widget, StringConst, StringConst,
 
291
                                     StringConst, StringConst, ...)
 
292
                                     gcc_printf_func(3,6);
 
293
extern void XmtDisplayMessageAndWait(Widget, StringConst, StringConst,
 
294
                                     StringConst, StringConst, StringConst,
 
295
                                     Pixmap, int, int, ...)
 
296
                                     gcc_printf_func(4,10);
 
297
extern void XmtDisplayWarningMsgAndWait(Widget, StringConst, StringConst,
 
298
                                        StringConst, StringConst, ...)
 
299
                                        gcc_printf_func(3,6);
 
300
extern void XmtDisplayErrorMsgAndWait(Widget, StringConst, StringConst,
 
301
                                      StringConst, StringConst, ...)
 
302
                                      gcc_printf_func(3,6);
 
303
#else
 
304
extern void XmtDisplayMessage();
 
305
extern void XmtDisplayWarningMsg();
 
306
extern void XmtDisplayErrorMsg();
 
307
extern void XmtDisplayInformationMsg();
 
308
extern void XmtDisplayMessageAndWait();
 
309
extern void XmtDisplayWarningMsgAndWait();
 
310
extern void XmtDisplayErrorMsgAndWait();
 
311
#endif
 
312
_XFUNCPROTOEND
 
313
 
 
314
#endif  /* _XmtDialogs_h */