]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
86518f6500b0a35ccc6e1937fe7f97bfaf1abfee
[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 External dialog
143  */
144 class ControlExternal;
145
146 template <class GUIview, class GUIbc>
147 class GUIExternal :
148         public GUI<ControlExternal, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
149 public:
150         ///
151         GUIExternal(LyXView & lv, Dialogs & d)
152                 : GUI<ControlExternal, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
153 };
154
155
156 /** Specialization for Graphics dialog
157  */
158 class ControlGraphics;
159
160 template <class GUIview, class GUIbc>
161 class GUIGraphics :
162         public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
163 public:
164         ///
165         GUIGraphics(LyXView & lv, Dialogs & d)
166                 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
167 };
168
169
170 /** Specialization for Include dialog
171  */
172 class ControlInclude;
173
174 template <class GUIview, class GUIbc>
175 class GUIInclude :
176         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
177 public:
178         ///
179         GUIInclude(LyXView & lv, Dialogs & d)
180                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
181 };
182
183
184 /** Specialization for Index dialog
185  */
186 class ControlIndex;
187
188 template <class GUIview, class GUIbc>
189 class GUIIndex :
190         public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
191 public:
192         ///
193         GUIIndex(LyXView & lv, Dialogs & d)
194                 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
195 };
196
197
198 /** Specialization for Log dialog
199  */
200 class ControlLog;
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 class ControlMinipage;
215
216 template <class GUIview, class GUIbc>
217 class GUIMinipage :
218         public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
219 public:
220         ///
221         GUIMinipage(LyXView & lv, Dialogs & d)
222                 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
223 };
224
225
226 /** Specialization for Preamble dialog
227  */
228 class ControlPreamble;
229
230 template <class GUIview, class GUIbc>
231 class GUIPreamble :
232         public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
233 public:
234         ///
235         GUIPreamble(LyXView & lv, Dialogs & d)
236                 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
237 };
238
239
240 /** Specialization for Print dialog
241  */
242 class ControlPrint;
243
244 template <class GUIview, class GUIbc>
245 class GUIPrint :
246         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
247 public:
248         ///
249         GUIPrint(LyXView & lv, Dialogs & d)
250                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
251 };
252
253
254 /** Specialization for Ref dialog
255  */
256 class ControlRef;
257
258 template <class GUIview, class GUIbc>
259 class GUIRef :
260         public GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc> {
261 public:
262         ///
263         GUIRef(LyXView & lv, Dialogs & d)
264                 : GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc>(lv, d) {}
265 };
266
267
268 /** Specialization for Search dialog
269  */
270 class ControlSearch;
271
272 template <class GUIview, class GUIbc>
273 class GUISearch :
274         public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
275 public:
276         ///
277         GUISearch(LyXView & lv, Dialogs & d)
278                 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
279 };
280
281 /** Specialization for Spellchecker dialog
282  */
283 class ControlSpellchecker;
284
285 template <class GUIview, class GUIbc>
286 class GUISpellchecker :
287         public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
288 public:
289         ///
290         GUISpellchecker(LyXView & lv, Dialogs & d)
291                 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
292 };
293
294 /** Specialization for Toc dialog
295  */
296 class ControlToc;
297
298 template <class GUIview, class GUIbc>
299 class GUIToc :
300         public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
301 public:
302         ///
303         GUIToc(LyXView & lv, Dialogs & d)
304                 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
305 };
306
307
308 /** Specialization for TabularCreate dialog
309  */
310 class ControlTabularCreate;
311
312 template <class GUIview, class GUIbc>
313 class GUITabularCreate :
314         public GUI<ControlTabularCreate, GUIview,
315                    OkApplyCancelReadOnlyPolicy, GUIbc> {
316 public:
317         ///
318         GUITabularCreate(LyXView & lv, Dialogs & d)
319                 : GUI<ControlTabularCreate, GUIview,
320                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
321 };
322
323
324 /** Specialization for TabularCreate dialog
325  */
326 class ControlThesaurus;
327
328 template <class GUIview, class GUIbc>
329 class GUIThesaurus :
330         public GUI<ControlThesaurus, GUIview,
331                    OkApplyCancelReadOnlyPolicy, GUIbc> {
332 public:
333         ///
334         GUIThesaurus(LyXView & lv, Dialogs & d)
335                 : GUI<ControlThesaurus, GUIview,
336                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
337 };
338
339  
340 /** Specialization for Url dialog
341  */
342 class ControlUrl;
343
344 template <class GUIview, class GUIbc>
345 class GUIUrl :
346         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
347 public:
348         ///
349         GUIUrl(LyXView & lv, Dialogs & d)
350             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
351 };
352
353
354 /** Specialization for VCLog dialog
355  */
356 class ControlVCLog;
357
358 template <class GUIview, class GUIbc>
359 class GUIVCLog :
360         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
361 public:
362         ///
363         GUIVCLog(LyXView & lv, Dialogs & d)
364             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
365 };
366
367
368 #endif // GUI_H