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 "ControlGraphics.h"
26 #include "insets/insetgraphicsParams.h"
27 #include "ControlInclude.h"
28 #include "ControlIndex.h"
29 #include "ControlLog.h"
30 #include "ControlMinipage.h"
31 #include "ControlPreamble.h"
32 #include "ControlPrint.h"
33 #include "ControlRef.h"
34 #include "ControlSearch.h"
35 #include "ControlShowFile.h"
36 #include "ControlSpellchecker.h"
37 #include "ControlTabularCreate.h"
38 #include "ControlTexinfo.h"
39 #include "ControlThesaurus.h"
40 #include "ControlToc.h"
41 #include "ControlUrl.h"
42 #include "ControlVCLog.h"
45 /** This class instantiates and makes available the GUI-specific
46 ButtonController and View.
48 template <class Controller, class GUIview, class Policy, class GUIbc>
49 class GUI : public Controller {
52 GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
54 virtual ButtonControllerBase & bc() { return bc_; }
56 virtual ViewBase & view() { return view_; }
60 ButtonController<Policy, GUIbc> bc_;
65 /** Specialization for About LyX dialog
67 template <class GUIview, class GUIbc>
69 public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
72 GUIAboutlyx(LyXView & lv, Dialogs & d)
73 : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
76 /** Specialization for Bibitem dialog
78 template <class GUIview, class GUIbc>
80 public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
83 GUIBibitem(LyXView & lv, Dialogs & d)
84 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
88 /** Specialization for Bibtex dialog
90 template <class GUIview, class GUIbc>
92 public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
95 GUIBibtex(LyXView & lv, Dialogs & d)
96 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
100 /** Specialization for Character dialog
102 template <class GUIview, class GUIbc>
103 class GUICharacter : public GUI<ControlCharacter, GUIview,
104 OkApplyCancelReadOnlyPolicy, GUIbc>
108 GUICharacter(LyXView & lv, Dialogs & d)
109 : GUI<ControlCharacter, GUIview,
110 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
114 /** Specialization for Citation dialog
116 template <class GUIview, class GUIbc>
117 class GUICitation : public GUI<ControlCitation, GUIview,
118 NoRepeatedApplyReadOnlyPolicy, GUIbc>
122 GUICitation(LyXView & lv, Dialogs & d)
123 : GUI<ControlCitation, GUIview,
124 NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
128 /** Specialization for Error dialog
130 template <class GUIview, class GUIbc>
132 public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
135 GUIError(LyXView & lv, Dialogs & d)
136 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
140 /** Specialization for ERT dialog
142 template <class GUIview, class GUIbc>
144 public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
147 GUIERT(LyXView & lv, Dialogs & d)
148 : GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
152 /** Specialization for External dialog
154 template <class GUIview, class GUIbc>
156 public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
159 GUIExternal(LyXView & lv, Dialogs & d)
160 : GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
164 /** Specialization for Graphics dialog
166 template <class GUIview, class GUIbc>
168 public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
171 GUIGraphics(LyXView & lv, Dialogs & d)
172 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
176 /** Specialization for Include dialog
178 template <class GUIview, class GUIbc>
180 public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
183 GUIInclude(LyXView & lv, Dialogs & d)
184 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
188 /** Specialization for Index dialog
190 template <class GUIview, class GUIbc>
192 public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
195 GUIIndex(LyXView & lv, Dialogs & d)
196 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
200 /** Specialization for Log dialog
202 template <class GUIview, class GUIbc>
204 public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
207 GUILog(LyXView & lv, Dialogs & d)
208 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
212 /** Specialization for Minipage dialog
214 template <class GUIview, class GUIbc>
216 public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
219 GUIMinipage(LyXView & lv, Dialogs & d)
220 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
224 /** Specialization for Float dialog
226 template <class GUIview, class GUIbc>
228 public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
231 GUIFloat(LyXView & lv, Dialogs & d)
232 : GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
236 /** Specialization for Preamble dialog
238 template <class GUIview, class GUIbc>
240 public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
243 GUIPreamble(LyXView & lv, Dialogs & d)
244 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
248 /** Specialization for Print dialog
250 template <class GUIview, class GUIbc>
252 public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
255 GUIPrint(LyXView & lv, Dialogs & d)
256 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
260 /** Specialization for Ref dialog
262 template <class GUIview, class GUIbc>
264 public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
267 GUIRef(LyXView & lv, Dialogs & d)
268 : GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
272 /** Specialization for Search dialog
274 template <class GUIview, class GUIbc>
276 public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
279 GUISearch(LyXView & lv, Dialogs & d)
280 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
283 /** Specialization for ShowFile dialog
285 template <class GUIview, class GUIbc>
287 public GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc> {
290 GUIShowFile(LyXView & lv, Dialogs & d)
291 : GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
294 /** Specialization for Spellchecker dialog
296 template <class GUIview, class GUIbc>
297 class GUISpellchecker :
298 public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
301 GUISpellchecker(LyXView & lv, Dialogs & d)
302 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
305 /** Specialization for Toc dialog
307 template <class GUIview, class GUIbc>
309 public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
312 GUIToc(LyXView & lv, Dialogs & d)
313 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
317 /** Specialization for TabularCreate dialog
319 template <class GUIview, class GUIbc>
320 class GUITabularCreate :
321 public GUI<ControlTabularCreate, GUIview,
322 OkApplyCancelReadOnlyPolicy, GUIbc> {
325 GUITabularCreate(LyXView & lv, Dialogs & d)
326 : GUI<ControlTabularCreate, GUIview,
327 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
331 /** Specialization for Texinfo dialog
333 template <class GUIview, class GUIbc>
335 public GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc> {
338 GUITexinfo(LyXView & lv, Dialogs & d)
339 : GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
342 /** Specialization for Thesaurus dialog
344 template <class GUIview, class GUIbc>
346 public GUI<ControlThesaurus, GUIview,
347 OkApplyCancelReadOnlyPolicy, GUIbc> {
350 GUIThesaurus(LyXView & lv, Dialogs & d)
351 : GUI<ControlThesaurus, GUIview,
352 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
356 /** Specialization for Url dialog
358 template <class GUIview, class GUIbc>
360 public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
363 GUIUrl(LyXView & lv, Dialogs & d)
364 : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
368 /** Specialization for VCLog dialog
370 template <class GUIview, class GUIbc>
372 public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
375 GUIVCLog(LyXView & lv, Dialogs & d)
376 : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}