]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
Edwin's Para MVC. Sorry for the delay !
[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 #include "ButtonController.h"
14 #include "ButtonPolicies.h"
15 #include "ControlAboutlyx.h"
16 #include "ControlBibitem.h"
17 #include "ControlBibtex.h"
18 #include "ControlCharacter.h"
19 #include "ControlCitation.h"
20 #include "ControlError.h"
21 #include "ControlERT.h"
22 #include "ControlExternal.h"
23 #include "ControlFloat.h"
24 #include "ControlForks.h"
25 #include "ControlGraphics.h"
26 #include "insets/insetgraphicsParams.h"
27 #include "ControlInclude.h"
28 #include "ControlIndex.h"
29 #include "ControlLog.h"
30 #include "ControlMinipage.h"
31 #include "ControlParagraph.h"
32 #include "ControlPreamble.h"
33 #include "ControlPrint.h"
34 #include "ControlRef.h"
35 #include "ControlSearch.h"
36 #include "ControlSendto.h"
37 #include "ControlShowFile.h"
38 #include "ControlSpellchecker.h"
39 #include "ControlTabularCreate.h"
40 #include "ControlTexinfo.h"
41 #include "ControlThesaurus.h"
42 #include "ControlToc.h"
43 #include "ControlUrl.h"
44 #include "ControlVCLog.h"
45
46
47 /** This class instantiates and makes available the GUI-specific
48     ButtonController and View.
49  */
50 template <class Controller, class GUIview, class Policy, class GUIbc>
51 class GUI : public Controller {
52 public:
53         ///
54         GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
55         ///
56         virtual ButtonControllerBase & bc() { return bc_; }
57         ///
58         virtual ViewBase & view() { return view_; }
59
60 private:
61         ///
62         ButtonController<Policy, GUIbc> bc_;
63         ///
64         GUIview view_;
65 };
66
67 #if 0
68 /** Specialization for About LyX dialog
69  */
70 template <class GUIview, class GUIbc>
71 class GUIAboutlyx :
72         public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
73 public:
74         ///
75         GUIAboutlyx(LyXView & lv, Dialogs & d)
76                 : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
77 };
78
79 /** Specialization for Bibitem dialog
80  */
81 template <class GUIview, class GUIbc>
82 class GUIBibitem :
83         public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
84 public:
85         ///
86         GUIBibitem(LyXView & lv, Dialogs & d)
87                 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
88 };
89
90
91 /** Specialization for Bibtex dialog
92  */
93 template <class GUIview, class GUIbc>
94 class GUIBibtex :
95         public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
96 public:
97         ///
98         GUIBibtex(LyXView & lv, Dialogs & d)
99                 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
100 };
101
102
103 /** Specialization for Character dialog
104  */
105 template <class GUIview, class GUIbc>
106 class GUICharacter : public GUI<ControlCharacter, GUIview,
107                                 OkApplyCancelReadOnlyPolicy, GUIbc>
108 {
109 public:
110         ///
111         GUICharacter(LyXView & lv, Dialogs & d)
112                 : GUI<ControlCharacter, GUIview,
113                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
114 };
115
116
117 /** Specialization for Citation dialog
118  */
119 template <class GUIview, class GUIbc>
120 class GUICitation : public GUI<ControlCitation, GUIview,
121                                NoRepeatedApplyReadOnlyPolicy, GUIbc>
122 {
123 public:
124         ///
125         GUICitation(LyXView & lv, Dialogs & d)
126                 : GUI<ControlCitation, GUIview,
127                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
128 };
129
130
131 /** Specialization for Error dialog
132  */
133 template <class GUIview, class GUIbc>
134 class GUIError :
135         public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
136 public:
137         ///
138         GUIError(LyXView & lv, Dialogs & d)
139                 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
140 };
141
142
143 /** Specialization for ERT dialog
144  */
145 template <class GUIview, class GUIbc>
146 class GUIERT :
147         public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
148 public:
149         ///
150         GUIERT(LyXView & lv, Dialogs & d)
151                 : GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
152 };
153
154
155 /** Specialization for External dialog
156  */
157 template <class GUIview, class GUIbc>
158 class GUIExternal :
159         public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
160 public:
161         ///
162         GUIExternal(LyXView & lv, Dialogs & d)
163                 : GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
164 };
165
166
167 /** Specialization for Forks dialog
168  */
169 template <class GUIview, class GUIbc>
170 class GUIForks :
171         public GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc> {
172 public:
173         ///
174         GUIForks(LyXView & lv, Dialogs & d)
175                 : GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
176 };
177
178 /** Specialization for Graphics dialog
179  */
180 template <class GUIview, class GUIbc>
181 class GUIGraphics :
182         public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
183 public:
184         ///
185         GUIGraphics(LyXView & lv, Dialogs & d)
186                 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
187 };
188
189
190 /** Specialization for Include dialog
191  */
192 template <class GUIview, class GUIbc>
193 class GUIInclude :
194         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
195 public:
196         ///
197         GUIInclude(LyXView & lv, Dialogs & d)
198                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
199 };
200
201
202 /** Specialization for Index dialog
203  */
204 template <class GUIview, class GUIbc>
205 class GUIIndex :
206         public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
207 public:
208         ///
209         GUIIndex(LyXView & lv, Dialogs & d)
210                 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
211 };
212
213
214 /** Specialization for Log dialog
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 template <class GUIview, class GUIbc>
229 class GUIMinipage :
230         public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
231 public:
232         ///
233         GUIMinipage(LyXView & lv, Dialogs & d)
234                 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
235 };
236
237
238 /** Specialization for Float dialog
239  */
240 template <class GUIview, class GUIbc>
241 class GUIFloat :
242         public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
243 public:
244         ///
245         GUIFloat(LyXView & lv, Dialogs & d)
246                 : GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
247 };
248
249 /** Specialization for Paragraph dialog
250  */
251 template <class GUIview, class GUIbc>
252 class GUIParagraph : public GUI<ControlParagraph, GUIview,
253                                 OkApplyCancelReadOnlyPolicy, GUIbc>
254 {
255 public:
256         ///
257         GUIParagraph(LyXView & lv, Dialogs & d)
258                 : GUI<ControlParagraph, GUIview,
259                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
260 };
261
262 /** Specialization for Preamble dialog
263  */
264 template <class GUIview, class GUIbc>
265 class GUIPreamble :
266         public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
267 public:
268         ///
269         GUIPreamble(LyXView & lv, Dialogs & d)
270                 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
271 };
272
273
274 /** Specialization for Print dialog
275  */
276 template <class GUIview, class GUIbc>
277 class GUIPrint :
278         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
279 public:
280         ///
281         GUIPrint(LyXView & lv, Dialogs & d)
282                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
283 };
284
285
286 /** Specialization for Ref dialog
287  */
288 template <class GUIview, class GUIbc>
289 class GUIRef :
290         public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
291 public:
292         ///
293         GUIRef(LyXView & lv, Dialogs & d)
294                 : GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
295 };
296
297
298 /** Specialization for Search dialog
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
310 /** Specialization for Sendto dialog
311  */
312 template <class GUIview, class GUIbc>
313 class GUISendto :
314         public GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc> {
315 public:
316         ///
317         GUISendto(LyXView & lv, Dialogs & d)
318                 : GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
319 };
320
321
322 /** Specialization for ShowFile dialog
323  */
324 template <class GUIview, class GUIbc>
325 class GUIShowFile :
326         public GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc> {
327 public:
328         ///
329         GUIShowFile(LyXView & lv, Dialogs & d)
330                 : GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
331 };
332
333 /** Specialization for Spellchecker dialog
334  */
335 template <class GUIview, class GUIbc>
336 class GUISpellchecker :
337         public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
338 public:
339         ///
340         GUISpellchecker(LyXView & lv, Dialogs & d)
341                 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
342 };
343
344 /** Specialization for Toc dialog
345  */
346 template <class GUIview, class GUIbc>
347 class GUIToc :
348         public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
349 public:
350         ///
351         GUIToc(LyXView & lv, Dialogs & d)
352                 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
353 };
354
355
356 /** Specialization for TabularCreate dialog
357  */
358 template <class GUIview, class GUIbc>
359 class GUITabularCreate :
360         public GUI<ControlTabularCreate, GUIview,
361                    OkApplyCancelReadOnlyPolicy, GUIbc> {
362 public:
363         ///
364         GUITabularCreate(LyXView & lv, Dialogs & d)
365                 : GUI<ControlTabularCreate, GUIview,
366                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
367 };
368
369
370 /** Specialization for Texinfo dialog
371  */
372 template <class GUIview, class GUIbc>
373 class GUITexinfo :
374         public GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc> {
375 public:
376         ///
377         GUITexinfo(LyXView & lv, Dialogs & d)
378                 : GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
379 };
380
381 /** Specialization for Thesaurus dialog
382  */
383 template <class GUIview, class GUIbc>
384 class GUIThesaurus :
385         public GUI<ControlThesaurus, GUIview,
386                    OkApplyCancelReadOnlyPolicy, GUIbc> {
387 public:
388         ///
389         GUIThesaurus(LyXView & lv, Dialogs & d)
390                 : GUI<ControlThesaurus, GUIview,
391                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
392 };
393
394
395 /** Specialization for Url dialog
396  */
397 template <class GUIview, class GUIbc>
398 class GUIUrl :
399         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
400 public:
401         ///
402         GUIUrl(LyXView & lv, Dialogs & d)
403             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
404 };
405
406
407 /** Specialization for VCLog dialog
408  */
409 template <class GUIview, class GUIbc>
410 class GUIVCLog :
411         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
412 public:
413         ///
414         GUIVCLog(LyXView & lv, Dialogs & d)
415             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
416 };
417
418 #endif
419
420 #endif // GUI_H