]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
ws cleanup
[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 "ButtonController.tmpl"
15 #include "ButtonPolicies.h"
16 #include "ControlAboutlyx.h"
17 #include "ControlBibitem.h"
18 #include "ControlBibtex.h"
19 #include "ControlCharacter.h"
20 #include "ControlCitation.h"
21 #include "ControlError.h"
22 #include "ControlERT.h"
23 #include "ControlExternal.h"
24 #include "ControlFloat.h"
25 #include "ControlForks.h"
26 #include "ControlGraphics.h"
27 #include "insets/insetgraphicsParams.h"
28 #include "ControlInclude.h"
29 #include "ControlIndex.h"
30 #include "ControlLog.h"
31 #include "ControlMinipage.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 /** Specialization for About LyX dialog
68  */
69 template <class GUIview, class GUIbc>
70 class GUIAboutlyx :
71         public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
72 public:
73         ///
74         GUIAboutlyx(LyXView & lv, Dialogs & d)
75                 : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
76 };
77
78 /** Specialization for Bibitem dialog
79  */
80 template <class GUIview, class GUIbc>
81 class GUIBibitem :
82         public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
83 public:
84         ///
85         GUIBibitem(LyXView & lv, Dialogs & d)
86                 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
87 };
88
89
90 /** Specialization for Bibtex dialog
91  */
92 template <class GUIview, class GUIbc>
93 class GUIBibtex :
94         public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
95 public:
96         ///
97         GUIBibtex(LyXView & lv, Dialogs & d)
98                 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
99 };
100
101
102 /** Specialization for Character dialog
103  */
104 template <class GUIview, class GUIbc>
105 class GUICharacter : public GUI<ControlCharacter, GUIview,
106                                 OkApplyCancelReadOnlyPolicy, GUIbc>
107 {
108 public:
109         ///
110         GUICharacter(LyXView & lv, Dialogs & d)
111                 : GUI<ControlCharacter, GUIview,
112                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
113 };
114
115
116 /** Specialization for Citation dialog
117  */
118 template <class GUIview, class GUIbc>
119 class GUICitation : public GUI<ControlCitation, GUIview,
120                                NoRepeatedApplyReadOnlyPolicy, GUIbc>
121 {
122 public:
123         ///
124         GUICitation(LyXView & lv, Dialogs & d)
125                 : GUI<ControlCitation, GUIview,
126                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
127 };
128
129
130 /** Specialization for Error dialog
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 template <class GUIview, class GUIbc>
145 class GUIERT :
146         public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
147 public:
148         ///
149         GUIERT(LyXView & lv, Dialogs & d)
150                 : GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
151 };
152
153
154 /** Specialization for External dialog
155  */
156 template <class GUIview, class GUIbc>
157 class GUIExternal :
158         public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
159 public:
160         ///
161         GUIExternal(LyXView & lv, Dialogs & d)
162                 : GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
163 };
164
165
166 /** Specialization for Forks dialog
167  */
168 template <class GUIview, class GUIbc>
169 class GUIForks :
170         public GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc> {
171 public:
172         ///
173         GUIForks(LyXView & lv, Dialogs & d)
174                 : GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
175 };
176
177 /** Specialization for Graphics dialog
178  */
179 template <class GUIview, class GUIbc>
180 class GUIGraphics :
181         public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
182 public:
183         ///
184         GUIGraphics(LyXView & lv, Dialogs & d)
185                 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
186 };
187
188
189 /** Specialization for Include dialog
190  */
191 template <class GUIview, class GUIbc>
192 class GUIInclude :
193         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
194 public:
195         ///
196         GUIInclude(LyXView & lv, Dialogs & d)
197                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
198 };
199
200
201 /** Specialization for Index dialog
202  */
203 template <class GUIview, class GUIbc>
204 class GUIIndex :
205         public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
206 public:
207         ///
208         GUIIndex(LyXView & lv, Dialogs & d)
209                 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
210 };
211
212
213 /** Specialization for Log dialog
214  */
215 template <class GUIview, class GUIbc>
216 class GUILog :
217         public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
218 public:
219         ///
220         GUILog(LyXView & lv, Dialogs & d)
221                 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
222 };
223
224
225 /** Specialization for Minipage dialog
226  */
227 template <class GUIview, class GUIbc>
228 class GUIMinipage :
229         public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
230 public:
231         ///
232         GUIMinipage(LyXView & lv, Dialogs & d)
233                 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
234 };
235
236
237 /** Specialization for Float dialog
238  */
239 template <class GUIview, class GUIbc>
240 class GUIFloat :
241         public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
242 public:
243         ///
244         GUIFloat(LyXView & lv, Dialogs & d)
245                 : GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
246 };
247
248
249 /** Specialization for Preamble dialog
250  */
251 template <class GUIview, class GUIbc>
252 class GUIPreamble :
253         public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
254 public:
255         ///
256         GUIPreamble(LyXView & lv, Dialogs & d)
257                 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
258 };
259
260
261 /** Specialization for Print dialog
262  */
263 template <class GUIview, class GUIbc>
264 class GUIPrint :
265         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
266 public:
267         ///
268         GUIPrint(LyXView & lv, Dialogs & d)
269                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
270 };
271
272
273 /** Specialization for Ref dialog
274  */
275 template <class GUIview, class GUIbc>
276 class GUIRef :
277         public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
278 public:
279         ///
280         GUIRef(LyXView & lv, Dialogs & d)
281                 : GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
282 };
283
284
285 /** Specialization for Search dialog
286  */
287 template <class GUIview, class GUIbc>
288 class GUISearch :
289         public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
290 public:
291         ///
292         GUISearch(LyXView & lv, Dialogs & d)
293                 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
294 };
295
296
297 /** Specialization for Sendto dialog
298  */
299 template <class GUIview, class GUIbc>
300 class GUISendto :
301         public GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc> {
302 public:
303         ///
304         GUISendto(LyXView & lv, Dialogs & d)
305                 : GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
306 };
307
308
309 /** Specialization for ShowFile dialog
310  */
311 template <class GUIview, class GUIbc>
312 class GUIShowFile :
313         public GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc> {
314 public:
315         ///
316         GUIShowFile(LyXView & lv, Dialogs & d)
317                 : GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
318 };
319
320 /** Specialization for Spellchecker dialog
321  */
322 template <class GUIview, class GUIbc>
323 class GUISpellchecker :
324         public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
325 public:
326         ///
327         GUISpellchecker(LyXView & lv, Dialogs & d)
328                 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
329 };
330
331 /** Specialization for Toc dialog
332  */
333 template <class GUIview, class GUIbc>
334 class GUIToc :
335         public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
336 public:
337         ///
338         GUIToc(LyXView & lv, Dialogs & d)
339                 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
340 };
341
342
343 /** Specialization for TabularCreate dialog
344  */
345 template <class GUIview, class GUIbc>
346 class GUITabularCreate :
347         public GUI<ControlTabularCreate, GUIview,
348                    OkApplyCancelReadOnlyPolicy, GUIbc> {
349 public:
350         ///
351         GUITabularCreate(LyXView & lv, Dialogs & d)
352                 : GUI<ControlTabularCreate, GUIview,
353                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
354 };
355
356
357 /** Specialization for Texinfo dialog
358  */
359 template <class GUIview, class GUIbc>
360 class GUITexinfo :
361         public GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc> {
362 public:
363         ///
364         GUITexinfo(LyXView & lv, Dialogs & d)
365                 : GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
366 };
367
368 /** Specialization for Thesaurus dialog
369  */
370 template <class GUIview, class GUIbc>
371 class GUIThesaurus :
372         public GUI<ControlThesaurus, GUIview,
373                    OkApplyCancelReadOnlyPolicy, GUIbc> {
374 public:
375         ///
376         GUIThesaurus(LyXView & lv, Dialogs & d)
377                 : GUI<ControlThesaurus, GUIview,
378                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
379 };
380
381
382 /** Specialization for Url dialog
383  */
384 template <class GUIview, class GUIbc>
385 class GUIUrl :
386         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
387 public:
388         ///
389         GUIUrl(LyXView & lv, Dialogs & d)
390             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
391 };
392
393
394 /** Specialization for VCLog dialog
395  */
396 template <class GUIview, class GUIbc>
397 class GUIVCLog :
398         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
399 public:
400         ///
401         GUIVCLog(LyXView & lv, Dialogs & d)
402             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
403 };
404
405
406 #endif // GUI_H