dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / AttachCmds.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /* $XConsortium: AttachCmds.h /main/3 1995/11/06 16:04:23 rswiston $ */
24 #include <Xm/Xm.h>
25 #include "UIComponent.h"
26 #include "Cmd.h"
27 #include "AttachArea.h"
28 #include "DialogManager.h"
29
30 #ifndef ATTACHADDCMD_H
31 #define ATTACHADDCMD_H
32
33 typedef enum { OK, ERR, CONFIRM } SaveFileState;
34
35 class AttachAddCmd : public Cmd {
36     
37 private:
38
39     Widget _clipWindow;
40     Widget _parent;
41     void cancel( XtPointer );   // Called when the Cancel button is pressed
42     void ok( Widget, XtPointer );// Called when the OK button is pressed
43     void add_file(char *);
44     AttachArea *_attachArea;
45
46     static void okCallback( Widget, XtPointer, XtPointer );
47     static void cancelCallback( Widget, XtPointer, XtPointer );
48
49   protected:
50     
51     virtual void doit();   
52     virtual void undoit(); 
53
54   public:
55     
56     AttachAddCmd ( AttachArea *, Widget, Widget, char *, int );
57
58     virtual const char *const className () { return "AttachAddCmd"; }
59 };
60 #endif
61
62 #ifndef ATTACHFETCHCMD_H
63 #define ATTACHFETCHCMD_H
64
65 class AttachFetchCmd : public Cmd {
66     
67 private:
68
69     Widget _clipWindow;
70     AttachArea *_attachArea;
71
72   protected:
73     
74     virtual void doit();   
75     virtual void undoit(); 
76
77   public:
78     
79     AttachFetchCmd ( AttachArea *, char *, int );
80
81     virtual const char *const className () { return "AttachFetchCmd"; }
82 };
83 #endif
84
85
86 #ifndef ATTACHDELETECMD_H
87 #define ATTACHDELETECMD_H
88
89 class AttachDeleteCmd : public Cmd {
90     
91 private:
92
93     AttachArea *_attachArea;
94
95   protected:
96     
97     virtual void doit();   
98     virtual void undoit(); 
99
100   public:
101     
102     AttachDeleteCmd ( AttachArea *, char *, int );
103
104     virtual const char *const className () { return "AttachDeleteCmd"; }
105 };
106 #endif
107
108
109 #ifndef ATTACHOPENCMD_H
110 #define ATTACHOPENCMD_H
111
112 class AttachOpenCmd : public Cmd {
113     
114 private:
115
116     Widget _clipWindow;
117     void cancel( XtPointer );   // Called when the Cancel button is pressed
118     void ok( XtPointer );       // Called when the OK button is pressed
119
120     static void okCallback( Widget, XtPointer, XtPointer );
121     static void cancelCallback( Widget, XtPointer, XtPointer );
122     AttachArea *_attachArea;
123
124   protected:
125     
126     virtual void doit();   
127     virtual void undoit(); 
128
129   public:
130     
131     AttachOpenCmd ( AttachArea *, char *, int );
132
133     virtual const char *const className () { return "AttachOpenCmd"; }
134 };
135 #endif
136
137
138 #ifndef ATTACHRENAMECMD_H
139 #define ATTACHRENAMECMD_H
140
141 class AttachRenameCmd : public Cmd {
142     
143 private:
144
145     AttachArea *_attachArea;
146     void cancel( XtPointer );   // Called when the Cancel button is pressed
147     static void cancelCallback( Widget, XtPointer, XtPointer );
148     void ok( XtPointer );       // Called when the OK button is pressed
149     static void okCallback( Widget, XtPointer, XtPointer );
150
151   protected:
152     
153     virtual void doit();   
154     virtual void undoit(); 
155
156   public:
157     
158     AttachRenameCmd ( AttachArea *, Widget, char *, int );
159
160     virtual const char *const className () { return "AttachRenameCmd"; }
161 };
162 #endif
163
164 #ifndef ATTACHDESCRIPTIONCMD_H
165 #define ATTACHDESCRIPTIONCMD_H
166
167 class AttachDescriptionCmd : public Cmd {
168     
169 private:
170
171     AttachArea *_attachArea;
172     void cancel( XtPointer );   // Called when the Cancel button is pressed
173     static void cancelCallback( Widget, XtPointer, XtPointer );
174     void ok( XtPointer );       // Called when the OK button is pressed
175     static void okCallback( Widget, XtPointer, XtPointer );
176
177   protected:
178     
179     virtual void doit();   
180     virtual void undoit(); 
181
182   public:
183     
184     AttachDescriptionCmd ( AttachArea *, Widget, char *, int );
185
186     virtual const char *const className () { return "AttachDescriptionCmd"; }
187 };
188 #endif
189
190
191 #ifndef ATTACHSAVEASCMD_H
192 #define ATTACHSAVEASCMD_H
193
194 class AttachSaveAsCmd : public Cmd {
195     
196 private:
197
198     Widget _parent;
199     Widget _clipWindow;
200     void cancel( XtPointer );   // Called when the Cancel button is pressed
201     void ok( XtPointer );       // Called when the OK button is pressed
202     AttachArea *_attachArea;
203
204     static void okCallback( Widget, XtPointer, XtPointer );
205     static void cancelCallback( Widget, XtPointer, XtPointer );
206
207   protected:
208     
209     virtual void doit();   
210     virtual void undoit(); 
211
212   public:
213     
214     AttachSaveAsCmd ( AttachArea *, Widget, Widget, char *, int );
215
216     virtual const char *const className () { return "AttachSaveAsCmd"; }
217 };
218 #endif
219
220
221 #ifndef ATTACHSELECTALLCMD_H
222 #define ATTACHSELECTALLCMD_H
223
224 class AttachSelectAllCmd : public Cmd {
225     
226 private:
227
228     AttachArea *_attachArea;
229
230   protected:
231     
232     virtual void doit();   
233     virtual void undoit(); 
234
235   public:
236     
237     AttachSelectAllCmd ( AttachArea *, char *, int );
238
239     virtual const char *const className () { return "AttachSelectAllCmd"; }
240 };
241 #endif
242
243
244 #ifndef ATTACHUNDELETECMD_H
245 #define ATTACHUNDELETECMD_H
246
247 class AttachUndeleteCmd : public Cmd {
248     
249 private:
250
251     AttachArea *_attachArea;
252
253   protected:
254     
255     virtual void doit();   
256     virtual void undoit(); 
257
258   public:
259     
260     AttachUndeleteCmd ( AttachArea *, char *, int );
261
262     virtual const char *const className () { return "AttachUndeleteCmd"; }
263 };
264 #endif
265
266
267 #ifndef ATTACHUNSELECTALLCMD_H
268 #define ATTACHUNSELECTALLCMD_H
269
270 class AttachUnselectAllCmd : public Cmd {
271     
272 private:
273
274     AttachArea *_attachArea;
275
276   protected:
277     
278     virtual void doit();   
279     virtual void undoit(); 
280
281   public:
282     
283     AttachUnselectAllCmd ( AttachArea *, char *, int );
284
285     virtual const char *const className () { return "AttachUnselectAllCmd"; }
286 };
287 #endif
288
289 #ifndef ATTACHINFOCMD_H
290 #define ATTACHINFOCMD_H
291
292 class AttachInfoCmd : public Cmd {
293     
294 private:
295
296     AttachArea *_attachArea;
297     Widget      _info_dialog;
298     DialogManager *_attachInfoDialogManager;
299
300   protected:
301     
302     virtual void doit();   
303     virtual void undoit(); 
304
305   public:
306     
307     AttachInfoCmd ( AttachArea *, char *, int );
308     ~AttachInfoCmd();
309
310     virtual const char *const className () { return "AttachInfoCmd"; }
311 };
312 #endif