]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
John's controller patch
[lyx.git] / src / frontends / controllers / GUI.h
1 // -*- C++ -*-
2 /**
3  * \file GUI.h
4  * Copyright 2001 The LyX Team.
5  * See the file COPYING.
6  *
7  * \author Angus Leeming <a.leeming@ic.ac.uk>
8  */
9
10 #ifndef GUI_H
11 #define GUI_H
12
13 /** This class instantiates and makes available the GUI-specific
14     View for the Splash screen controller.
15  */
16 template <class GUIview>
17 class GUISplash : public ControlSplash {
18 public:
19         ///
20         GUISplash(Dialogs & d) : ControlSplash(d), view_(*this) {}
21         ///
22         virtual ViewSplash & view() { return view_; }
23
24 private:
25         ///
26         GUIview view_;
27 };
28
29
30 /** This class instantiates and makes available the GUI-specific
31     ButtonController and View.
32  */
33 template <class Controller, class GUIview, class Policy, class GUIbc>
34 class GUI : public Controller {
35 public:
36         ///
37         GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
38         ///
39         virtual ButtonControllerBase & bc() { return bc_; }
40         ///
41         virtual ViewBase & view() { return view_; }
42
43 private:
44         ///
45         ButtonController<Policy, GUIbc> bc_;
46         ///
47         GUIview view_;
48 };
49
50 /// Forward declaration of ButtonPolicies
51 class OkCancelPolicy;
52 class OkCancelReadOnlyPolicy;
53 class NoRepeatedApplyReadOnlyPolicy;
54
55 /** Specialization for About LyX dialog
56  */
57 class ControlAboutlyx;
58
59 template <class GUIview, class GUIbc>
60 class GUIAboutlyx :
61         public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
62 public:
63         ///
64         GUIAboutlyx(LyXView & lv, Dialogs & d)
65                 : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
66 };
67
68 /** Specialization for Bibitem dialog
69  */
70 class ControlBibitem;
71
72 template <class GUIview, class GUIbc>
73 class GUIBibitem :
74         public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
75 public:
76         ///
77         GUIBibitem(LyXView & lv, Dialogs & d)
78                 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
79 };
80
81
82 /** Specialization for Bibtex dialog
83  */
84 class ControlBibtex;
85
86 template <class GUIview, class GUIbc>
87 class GUIBibtex :
88         public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
89 public:
90         ///
91         GUIBibtex(LyXView & lv, Dialogs & d)
92                 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
93 };
94
95
96 /** Specialization for Character dialog
97  */
98 class ControlCharacter;
99
100 template <class GUIview, class GUIbc>
101 class GUICharacter : public GUI<ControlCharacter, GUIview,
102                                 OkApplyCancelReadOnlyPolicy, GUIbc>
103 {
104 public:
105         ///
106         GUICharacter(LyXView & lv, Dialogs & d)
107                 : GUI<ControlCharacter, GUIview,
108                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
109 };
110
111
112 /** Specialization for Citation dialog
113  */
114 class ControlCitation;
115
116 template <class GUIview, class GUIbc>
117 class GUICitation : public GUI<ControlCitation, GUIview,
118                                NoRepeatedApplyReadOnlyPolicy, GUIbc>
119 {
120 public:
121         ///
122         GUICitation(LyXView & lv, Dialogs & d)
123                 : GUI<ControlCitation, GUIview,
124                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
125 };
126
127
128 /** Specialization for Error dialog
129  */
130 class ControlError;
131
132 template <class GUIview, class GUIbc>
133 class GUIError :
134         public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
135 public:
136         ///
137         GUIError(LyXView & lv, Dialogs & d)
138                 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
139 };
140
141
142 /** Specialization for ERT dialog
143  */
144 class ControlERT;
145
146 template <class GUIview, class GUIbc>
147 class GUIERT :
148         public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
149 public:
150         ///
151         GUIERT(LyXView & lv, Dialogs & d)
152                 : GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
153 };
154
155
156 /** Specialization for External dialog
157  */
158 class ControlExternal;
159
160 template <class GUIview, class GUIbc>
161 class GUIExternal :
162         public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
163 public:
164         ///
165         GUIExternal(LyXView & lv, Dialogs & d)
166                 : GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
167 };
168
169
170 /** Specialization for Graphics dialog
171  */
172 class ControlGraphics;
173
174 template <class GUIview, class GUIbc>
175 class GUIGraphics :
176         public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
177 public:
178         ///
179         GUIGraphics(LyXView & lv, Dialogs & d)
180                 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
181 };
182
183
184 /** Specialization for Include dialog
185  */
186 class ControlInclude;
187
188 template <class GUIview, class GUIbc>
189 class GUIInclude :
190         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
191 public:
192         ///
193         GUIInclude(LyXView & lv, Dialogs & d)
194                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
195 };
196
197
198 /** Specialization for Index dialog
199  */
200 class ControlIndex;
201
202 template <class GUIview, class GUIbc>
203 class GUIIndex :
204         public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
205 public:
206         ///
207         GUIIndex(LyXView & lv, Dialogs & d)
208                 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
209 };
210
211
212 /** Specialization for Log dialog
213  */
214 class ControlLog;
215
216 template <class GUIview, class GUIbc>
217 class GUILog :
218         public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
219 public:
220         ///
221         GUILog(LyXView & lv, Dialogs & d)
222                 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
223 };
224
225
226 /** Specialization for Minipage dialog
227  */
228 class ControlMinipage;
229
230 template <class GUIview, class GUIbc>
231 class GUIMinipage :
232         public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
233 public:
234         ///
235         GUIMinipage(LyXView & lv, Dialogs & d)
236                 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
237 };
238
239
240 /** Specialization for Float dialog
241  */
242 class ControlFloat;
243
244 template <class GUIview, class GUIbc>
245 class GUIFloat :
246         public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
247 public:
248         ///
249         GUIFloat(LyXView & lv, Dialogs & d)
250                 : GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
251 };
252
253
254 /** Specialization for Preamble dialog
255  */
256 class ControlPreamble;
257
258 template <class GUIview, class GUIbc>
259 class GUIPreamble :
260         public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
261 public:
262         ///
263         GUIPreamble(LyXView & lv, Dialogs & d)
264                 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
265 };
266
267
268 /** Specialization for Print dialog
269  */
270 class ControlPrint;
271
272 template <class GUIview, class GUIbc>
273 class GUIPrint :
274         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
275 public:
276         ///
277         GUIPrint(LyXView & lv, Dialogs & d)
278                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
279 };
280
281
282 /** Specialization for Ref dialog
283  */
284 class ControlRef;
285
286 template <class GUIview, class GUIbc>
287 class GUIRef :
288         public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
289 public:
290         ///
291         GUIRef(LyXView & lv, Dialogs & d)
292                 : GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
293 };
294
295
296 /** Specialization for Search dialog
297  */
298 class ControlSearch;
299
300 template <class GUIview, class GUIbc>
301 class GUISearch :
302         public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
303 public:
304         ///
305         GUISearch(LyXView & lv, Dialogs & d)
306                 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
307 };
308
309 /** Specialization for Spellchecker dialog
310  */
311 class ControlSpellchecker;
312
313 template <class GUIview, class GUIbc>
314 class GUISpellchecker :
315         public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
316 public:
317         ///
318         GUISpellchecker(LyXView & lv, Dialogs & d)
319                 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
320 };
321
322 /** Specialization for Toc dialog
323  */
324 class ControlToc;
325
326 template <class GUIview, class GUIbc>
327 class GUIToc :
328         public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
329 public:
330         ///
331         GUIToc(LyXView & lv, Dialogs & d)
332                 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
333 };
334
335
336 /** Specialization for TabularCreate dialog
337  */
338 class ControlTabularCreate;
339
340 template <class GUIview, class GUIbc>
341 class GUITabularCreate :
342         public GUI<ControlTabularCreate, GUIview,
343                    OkApplyCancelReadOnlyPolicy, GUIbc> {
344 public:
345         ///
346         GUITabularCreate(LyXView & lv, Dialogs & d)
347                 : GUI<ControlTabularCreate, GUIview,
348                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
349 };
350
351
352 /** Specialization for Thesaurus dialog
353  */
354 class ControlThesaurus;
355
356 template <class GUIview, class GUIbc>
357 class GUIThesaurus :
358         public GUI<ControlThesaurus, GUIview,
359                    OkApplyCancelReadOnlyPolicy, GUIbc> {
360 public:
361         ///
362         GUIThesaurus(LyXView & lv, Dialogs & d)
363                 : GUI<ControlThesaurus, GUIview,
364                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
365 };
366
367  
368 /** Specialization for Url dialog
369  */
370 class ControlUrl;
371
372 template <class GUIview, class GUIbc>
373 class GUIUrl :
374         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
375 public:
376         ///
377         GUIUrl(LyXView & lv, Dialogs & d)
378             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
379 };
380
381
382 /** Specialization for VCLog dialog
383  */
384 class ControlVCLog;
385
386 template <class GUIview, class GUIbc>
387 class GUIVCLog :
388         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
389 public:
390         ///
391         GUIVCLog(LyXView & lv, Dialogs & d)
392             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
393 };
394
395
396 #endif // GUI_H