]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
controller-view split for TOC popup.
[lyx.git] / src / frontends / controllers / GUI.h
1 /**
2  * \file GUI.h
3  * Copyright 2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author Angus Leeming <a.leeming@ic.ac.uk>
7  */
8
9 #ifndef GUI_H
10 #define GUI_H
11
12 /** This class instantiates and makes available the GUI-specific
13     View for the Splash screen controller.
14  */
15 template <class GUIview>
16 class GUISplash : public ControlSplash {
17 public:
18         ///
19         GUISplash(Dialogs & d) : ControlSplash(d), view_(*this) {}
20         ///
21         virtual ViewSplash & view() { return view_; }
22
23 private:
24         ///
25         GUIview view_;
26 };
27
28
29 /** This class instantiates and makes available the GUI-specific
30     ButtonController and View.
31  */
32 template <class Controller, class GUIview, class Policy, class GUIbc>
33 class GUI : public Controller {
34 public:
35         ///
36         GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
37         ///
38         virtual ButtonControllerBase & bc() { return bc_; }
39         ///
40         virtual ViewBase & view() { return view_; }
41
42 private:
43         ///
44         ButtonController<Policy, GUIbc> bc_;
45         ///
46         GUIview view_;
47 };
48
49 /// Forward declaration of ButtonPolicies
50 class OkCancelPolicy;
51 class OkCancelReadOnlyPolicy;
52 class NoRepeatedApplyReadOnlyPolicy;
53
54
55 /** Specialization for Bibitem dialog
56  */
57 class ControlBibitem;
58
59 template <class GUIview, class GUIbc>
60 class GUIBibitem :
61         public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
62 public:
63         ///
64         GUIBibitem(LyXView & lv, Dialogs & d)
65                 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
66 };
67
68
69 /** Specialization for Bibtex dialog
70  */
71 class ControlBibtex;
72
73 template <class GUIview, class GUIbc>
74 class GUIBibtex :
75         public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
76 public:
77         ///
78         GUIBibtex(LyXView & lv, Dialogs & d)
79                 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
80 };
81
82
83 /** Specialization for Character dialog
84  */
85 class ControlCharacter;
86
87 template <class GUIview, class GUIbc>
88 class GUICharacter : public GUI<ControlCharacter, GUIview,
89                                 NoRepeatedApplyReadOnlyPolicy, GUIbc>
90 {
91 public:
92         ///
93         GUICharacter(LyXView & lv, Dialogs & d)
94                 : GUI<ControlCharacter, GUIview,
95                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
96 };
97
98
99 /** Specialization for Citation dialog
100  */
101 class ControlCitation;
102
103 template <class GUIview, class GUIbc>
104 class GUICitation : public GUI<ControlCitation, GUIview,
105                                NoRepeatedApplyReadOnlyPolicy, GUIbc>
106 {
107 public:
108         ///
109         GUICitation(LyXView & lv, Dialogs & d)
110                 : GUI<ControlCitation, GUIview,
111                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
112 };
113
114
115 /** Specialization for Copyright dialog
116  */
117 class ControlCopyright;
118
119 template <class GUIview, class GUIbc>
120 class GUICopyright :
121         public GUI<ControlCopyright, GUIview, OkCancelPolicy, GUIbc> {
122 public:
123         ///
124         GUICopyright(LyXView & lv, Dialogs & d)
125                 : GUI<ControlCopyright, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
126 };
127
128
129 /** Specialization for Credits dialog
130  */
131 class ControlCredits;
132
133 template <class GUIview, class GUIbc>
134 class GUICredits :
135         public GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc> {
136 public:
137         ///
138         GUICredits(LyXView & lv, Dialogs & d)
139                 : GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
140 };
141
142
143 /** Specialization for Error dialog
144  */
145 class ControlError;
146
147 template <class GUIview, class GUIbc>
148 class GUIError :
149         public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
150 public:
151         ///
152         GUIError(LyXView & lv, Dialogs & d)
153                 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
154 };
155
156
157 /** Specialization for External dialog
158  */
159 class ControlExternal;
160
161 template <class GUIview, class GUIbc>
162 class GUIExternal :
163         public GUI<ControlExternal, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
164 public:
165         ///
166         GUIExternal(LyXView & lv, Dialogs & d)
167                 : GUI<ControlExternal, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
168 };
169
170
171 /** Specialization for Graphics dialog
172  */
173 class ControlGraphics;
174
175 template <class GUIview, class GUIbc>
176 class GUIGraphics :
177         public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
178 public:
179         ///
180         GUIGraphics(LyXView & lv, Dialogs & d)
181                 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
182 };
183
184
185 /** Specialization for Include dialog
186  */
187 class ControlInclude;
188
189 template <class GUIview, class GUIbc>
190 class GUIInclude :
191         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
192 public:
193         ///
194         GUIInclude(LyXView & lv, Dialogs & d)
195                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
196 };
197
198
199 /** Specialization for Index dialog
200  */
201 class ControlIndex;
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 class ControlLog;
216
217 template <class GUIview, class GUIbc>
218 class GUILog :
219         public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
220 public:
221         ///
222         GUILog(LyXView & lv, Dialogs & d)
223                 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
224 };
225
226
227 /** Specialization for Minipage dialog
228  */
229 class ControlMinipage;
230
231 template <class GUIview, class GUIbc>
232 class GUIMinipage :
233         public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
234 public:
235         ///
236         GUIMinipage(LyXView & lv, Dialogs & d)
237                 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
238 };
239
240
241 /** Specialization for Preamble dialog
242  */
243 class ControlPreamble;
244
245 template <class GUIview, class GUIbc>
246 class GUIPreamble :
247         public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
248 public:
249         ///
250         GUIPreamble(LyXView & lv, Dialogs & d)
251                 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
252 };
253
254
255 /** Specialization for Print dialog
256  */
257 class ControlPrint;
258
259 template <class GUIview, class GUIbc>
260 class GUIPrint :
261         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
262 public:
263         ///
264         GUIPrint(LyXView & lv, Dialogs & d)
265                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
266 };
267
268
269 /** Specialization for Ref dialog
270  */
271 class ControlRef;
272
273 template <class GUIview, class GUIbc>
274 class GUIRef :
275         public GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc> {
276 public:
277         ///
278         GUIRef(LyXView & lv, Dialogs & d)
279                 : GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc>(lv, d) {}
280 };
281
282
283 /** Specialization for Search dialog
284  */
285 class ControlSearch;
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 Toc dialog
298  */
299 class ControlToc;
300
301 template <class GUIview, class GUIbc>
302 class GUIToc :
303         public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
304 public:
305         ///
306         GUIToc(LyXView & lv, Dialogs & d)
307                 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
308 };
309
310
311 /** Specialization for TabularCreate dialog
312  */
313 class ControlTabularCreate;
314
315 template <class GUIview, class GUIbc>
316 class GUITabularCreate :
317         public GUI<ControlTabularCreate, GUIview,
318                    OkApplyCancelReadOnlyPolicy, GUIbc> {
319 public:
320         ///
321         GUITabularCreate(LyXView & lv, Dialogs & d)
322                 : GUI<ControlTabularCreate, GUIview,
323                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
324 };
325
326
327 /** Specialization for Url dialog
328  */
329 class ControlUrl;
330
331 template <class GUIview, class GUIbc>
332 class GUIUrl :
333         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
334 public:
335         ///
336         GUIUrl(LyXView & lv, Dialogs & d)
337             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
338 };
339
340
341 /** Specialization for VCLog dialog
342  */
343 class ControlVCLog;
344
345 template <class GUIview, class GUIbc>
346 class GUIVCLog :
347         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
348 public:
349         ///
350         GUIVCLog(LyXView & lv, Dialogs & d)
351             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
352 };
353
354
355 #endif // GUI_H