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