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