]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
Edwin's spellchecker GUII patch with some fixes to it.
[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
56 /** Specialization for Bibitem dialog
57  */
58 class ControlBibitem;
59
60 template <class GUIview, class GUIbc>
61 class GUIBibitem :
62         public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
63 public:
64         ///
65         GUIBibitem(LyXView & lv, Dialogs & d)
66                 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
67 };
68
69
70 /** Specialization for Bibtex dialog
71  */
72 class ControlBibtex;
73
74 template <class GUIview, class GUIbc>
75 class GUIBibtex :
76         public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
77 public:
78         ///
79         GUIBibtex(LyXView & lv, Dialogs & d)
80                 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
81 };
82
83
84 /** Specialization for Character dialog
85  */
86 class ControlCharacter;
87
88 template <class GUIview, class GUIbc>
89 class GUICharacter : public GUI<ControlCharacter, GUIview,
90                                 OkApplyCancelReadOnlyPolicy, GUIbc>
91 {
92 public:
93         ///
94         GUICharacter(LyXView & lv, Dialogs & d)
95                 : GUI<ControlCharacter, GUIview,
96                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
97 };
98
99
100 /** Specialization for Citation dialog
101  */
102 class ControlCitation;
103
104 template <class GUIview, class GUIbc>
105 class GUICitation : public GUI<ControlCitation, GUIview,
106                                NoRepeatedApplyReadOnlyPolicy, GUIbc>
107 {
108 public:
109         ///
110         GUICitation(LyXView & lv, Dialogs & d)
111                 : GUI<ControlCitation, GUIview,
112                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
113 };
114
115
116 /** Specialization for Copyright dialog
117  */
118 class ControlCopyright;
119
120 template <class GUIview, class GUIbc>
121 class GUICopyright :
122         public GUI<ControlCopyright, GUIview, OkCancelPolicy, GUIbc> {
123 public:
124         ///
125         GUICopyright(LyXView & lv, Dialogs & d)
126                 : GUI<ControlCopyright, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
127 };
128
129
130 /** Specialization for Credits dialog
131  */
132 class ControlCredits;
133
134 template <class GUIview, class GUIbc>
135 class GUICredits :
136         public GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc> {
137 public:
138         ///
139         GUICredits(LyXView & lv, Dialogs & d)
140                 : GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
141 };
142
143
144 /** Specialization for Error dialog
145  */
146 class ControlError;
147
148 template <class GUIview, class GUIbc>
149 class GUIError :
150         public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
151 public:
152         ///
153         GUIError(LyXView & lv, Dialogs & d)
154                 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
155 };
156
157
158 /** Specialization for External dialog
159  */
160 class ControlExternal;
161
162 template <class GUIview, class GUIbc>
163 class GUIExternal :
164         public GUI<ControlExternal, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
165 public:
166         ///
167         GUIExternal(LyXView & lv, Dialogs & d)
168                 : GUI<ControlExternal, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
169 };
170
171
172 /** Specialization for Graphics dialog
173  */
174 class ControlGraphics;
175
176 template <class GUIview, class GUIbc>
177 class GUIGraphics :
178         public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
179 public:
180         ///
181         GUIGraphics(LyXView & lv, Dialogs & d)
182                 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
183 };
184
185
186 /** Specialization for Include dialog
187  */
188 class ControlInclude;
189
190 template <class GUIview, class GUIbc>
191 class GUIInclude :
192         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
193 public:
194         ///
195         GUIInclude(LyXView & lv, Dialogs & d)
196                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
197 };
198
199
200 /** Specialization for Index dialog
201  */
202 class ControlIndex;
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 class ControlLog;
217
218 template <class GUIview, class GUIbc>
219 class GUILog :
220         public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
221 public:
222         ///
223         GUILog(LyXView & lv, Dialogs & d)
224                 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
225 };
226
227
228 /** Specialization for Minipage dialog
229  */
230 class ControlMinipage;
231
232 template <class GUIview, class GUIbc>
233 class GUIMinipage :
234         public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
235 public:
236         ///
237         GUIMinipage(LyXView & lv, Dialogs & d)
238                 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
239 };
240
241
242 /** Specialization for Preamble dialog
243  */
244 class ControlPreamble;
245
246 template <class GUIview, class GUIbc>
247 class GUIPreamble :
248         public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
249 public:
250         ///
251         GUIPreamble(LyXView & lv, Dialogs & d)
252                 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
253 };
254
255
256 /** Specialization for Print dialog
257  */
258 class ControlPrint;
259
260 template <class GUIview, class GUIbc>
261 class GUIPrint :
262         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
263 public:
264         ///
265         GUIPrint(LyXView & lv, Dialogs & d)
266                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
267 };
268
269
270 /** Specialization for Ref dialog
271  */
272 class ControlRef;
273
274 template <class GUIview, class GUIbc>
275 class GUIRef :
276         public GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc> {
277 public:
278         ///
279         GUIRef(LyXView & lv, Dialogs & d)
280                 : GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc>(lv, d) {}
281 };
282
283
284 /** Specialization for Search dialog
285  */
286 class ControlSearch;
287
288 template <class GUIview, class GUIbc>
289 class GUISearch :
290         public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
291 public:
292         ///
293         GUISearch(LyXView & lv, Dialogs & d)
294                 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
295 };
296
297 /** Specialization for Spellchecker dialog
298  */
299 class ControlSpellchecker;
300
301 template <class GUIview, class GUIbc>
302 class GUISpellchecker :
303         public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
304 public:
305         ///
306         GUISpellchecker(LyXView & lv, Dialogs & d)
307                 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
308 };
309
310 /** Specialization for Toc dialog
311  */
312 class ControlToc;
313
314 template <class GUIview, class GUIbc>
315 class GUIToc :
316         public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
317 public:
318         ///
319         GUIToc(LyXView & lv, Dialogs & d)
320                 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
321 };
322
323
324 /** Specialization for TabularCreate dialog
325  */
326 class ControlTabularCreate;
327
328 template <class GUIview, class GUIbc>
329 class GUITabularCreate :
330         public GUI<ControlTabularCreate, GUIview,
331                    OkApplyCancelReadOnlyPolicy, GUIbc> {
332 public:
333         ///
334         GUITabularCreate(LyXView & lv, Dialogs & d)
335                 : GUI<ControlTabularCreate, 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