4 * Copyright 2001 The LyX Team.
5 * See the file COPYING.
7 * \author Angus Leeming <a.leeming@ic.ac.uk>
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 "ControlSendto.h"
37 #include "ControlShowFile.h"
38 #include "ControlSpellchecker.h"
39 #include "ControlTabularCreate.h"
40 #include "ControlTexinfo.h"
41 #include "ControlThesaurus.h"
42 #include "ControlToc.h"
43 #include "ControlUrl.h"
44 #include "ControlVCLog.h"
47 /** This class instantiates and makes available the GUI-specific
48 ButtonController and View.
50 template <class Controller, class GUIview, class Policy, class GUIbc>
51 class GUI : public Controller {
54 GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
56 virtual ButtonControllerBase & bc() { return bc_; }
58 virtual ViewBase & view() { return view_; }
62 ButtonController<Policy, GUIbc> bc_;
68 /** Specialization for About LyX dialog
70 template <class GUIview, class GUIbc>
72 public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
75 GUIAboutlyx(LyXView & lv, Dialogs & d)
76 : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
79 /** Specialization for Bibitem dialog
81 template <class GUIview, class GUIbc>
83 public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
86 GUIBibitem(LyXView & lv, Dialogs & d)
87 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
91 /** Specialization for Bibtex dialog
93 template <class GUIview, class GUIbc>
95 public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
98 GUIBibtex(LyXView & lv, Dialogs & d)
99 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
103 /** Specialization for Character dialog
105 template <class GUIview, class GUIbc>
106 class GUICharacter : public GUI<ControlCharacter, GUIview,
107 OkApplyCancelReadOnlyPolicy, GUIbc>
111 GUICharacter(LyXView & lv, Dialogs & d)
112 : GUI<ControlCharacter, GUIview,
113 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
117 /** Specialization for Citation dialog
119 template <class GUIview, class GUIbc>
120 class GUICitation : public GUI<ControlCitation, GUIview,
121 NoRepeatedApplyReadOnlyPolicy, GUIbc>
125 GUICitation(LyXView & lv, Dialogs & d)
126 : GUI<ControlCitation, GUIview,
127 NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
131 /** Specialization for Error dialog
133 template <class GUIview, class GUIbc>
135 public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
138 GUIError(LyXView & lv, Dialogs & d)
139 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
143 /** Specialization for ERT dialog
145 template <class GUIview, class GUIbc>
147 public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
150 GUIERT(LyXView & lv, Dialogs & d)
151 : GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
155 /** Specialization for External dialog
157 template <class GUIview, class GUIbc>
159 public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
162 GUIExternal(LyXView & lv, Dialogs & d)
163 : GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
167 /** Specialization for Forks dialog
169 template <class GUIview, class GUIbc>
171 public GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc> {
174 GUIForks(LyXView & lv, Dialogs & d)
175 : GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
178 /** Specialization for Graphics dialog
180 template <class GUIview, class GUIbc>
182 public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
185 GUIGraphics(LyXView & lv, Dialogs & d)
186 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
190 /** Specialization for Include dialog
192 template <class GUIview, class GUIbc>
194 public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
197 GUIInclude(LyXView & lv, Dialogs & d)
198 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
202 /** Specialization for Index dialog
204 template <class GUIview, class GUIbc>
206 public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
209 GUIIndex(LyXView & lv, Dialogs & d)
210 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
214 /** Specialization for Log dialog
216 template <class GUIview, class GUIbc>
218 public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
221 GUILog(LyXView & lv, Dialogs & d)
222 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
226 /** Specialization for Minipage dialog
228 template <class GUIview, class GUIbc>
230 public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
233 GUIMinipage(LyXView & lv, Dialogs & d)
234 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
238 /** Specialization for Float dialog
240 template <class GUIview, class GUIbc>
242 public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
245 GUIFloat(LyXView & lv, Dialogs & d)
246 : GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
250 /** Specialization for Preamble dialog
252 template <class GUIview, class GUIbc>
254 public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
257 GUIPreamble(LyXView & lv, Dialogs & d)
258 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
262 /** Specialization for Print dialog
264 template <class GUIview, class GUIbc>
266 public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
269 GUIPrint(LyXView & lv, Dialogs & d)
270 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
274 /** Specialization for Ref dialog
276 template <class GUIview, class GUIbc>
278 public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
281 GUIRef(LyXView & lv, Dialogs & d)
282 : GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
286 /** Specialization for Search dialog
288 template <class GUIview, class GUIbc>
290 public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
293 GUISearch(LyXView & lv, Dialogs & d)
294 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
298 /** Specialization for Sendto dialog
300 template <class GUIview, class GUIbc>
302 public GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc> {
305 GUISendto(LyXView & lv, Dialogs & d)
306 : GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
310 /** Specialization for ShowFile dialog
312 template <class GUIview, class GUIbc>
314 public GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc> {
317 GUIShowFile(LyXView & lv, Dialogs & d)
318 : GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
321 /** Specialization for Spellchecker dialog
323 template <class GUIview, class GUIbc>
324 class GUISpellchecker :
325 public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
328 GUISpellchecker(LyXView & lv, Dialogs & d)
329 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
332 /** Specialization for Toc dialog
334 template <class GUIview, class GUIbc>
336 public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
339 GUIToc(LyXView & lv, Dialogs & d)
340 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
344 /** Specialization for TabularCreate dialog
346 template <class GUIview, class GUIbc>
347 class GUITabularCreate :
348 public GUI<ControlTabularCreate, GUIview,
349 OkApplyCancelReadOnlyPolicy, GUIbc> {
352 GUITabularCreate(LyXView & lv, Dialogs & d)
353 : GUI<ControlTabularCreate, GUIview,
354 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
358 /** Specialization for Texinfo dialog
360 template <class GUIview, class GUIbc>
362 public GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc> {
365 GUITexinfo(LyXView & lv, Dialogs & d)
366 : GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
369 /** Specialization for Thesaurus dialog
371 template <class GUIview, class GUIbc>
373 public GUI<ControlThesaurus, GUIview,
374 OkApplyCancelReadOnlyPolicy, GUIbc> {
377 GUIThesaurus(LyXView & lv, Dialogs & d)
378 : GUI<ControlThesaurus, GUIview,
379 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
383 /** Specialization for Url dialog
385 template <class GUIview, class GUIbc>
387 public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
390 GUIUrl(LyXView & lv, Dialogs & d)
391 : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
395 /** Specialization for VCLog dialog
397 template <class GUIview, class GUIbc>
399 public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
402 GUIVCLog(LyXView & lv, Dialogs & d)
403 : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}