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_;
67 /** Specialization for About LyX dialog
69 template <class GUIview, class GUIbc>
71 public GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc> {
74 GUIAboutlyx(LyXView & lv, Dialogs & d)
75 : GUI<ControlAboutlyx, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
78 /** Specialization for Bibitem dialog
80 template <class GUIview, class GUIbc>
82 public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
85 GUIBibitem(LyXView & lv, Dialogs & d)
86 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
90 /** Specialization for Bibtex dialog
92 template <class GUIview, class GUIbc>
94 public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
97 GUIBibtex(LyXView & lv, Dialogs & d)
98 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
102 /** Specialization for Character dialog
104 template <class GUIview, class GUIbc>
105 class GUICharacter : public GUI<ControlCharacter, GUIview,
106 OkApplyCancelReadOnlyPolicy, GUIbc>
110 GUICharacter(LyXView & lv, Dialogs & d)
111 : GUI<ControlCharacter, GUIview,
112 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
116 /** Specialization for Citation dialog
118 template <class GUIview, class GUIbc>
119 class GUICitation : public GUI<ControlCitation, GUIview,
120 NoRepeatedApplyReadOnlyPolicy, GUIbc>
124 GUICitation(LyXView & lv, Dialogs & d)
125 : GUI<ControlCitation, GUIview,
126 NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
130 /** Specialization for Error dialog
132 template <class GUIview, class GUIbc>
134 public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
137 GUIError(LyXView & lv, Dialogs & d)
138 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
142 /** Specialization for ERT dialog
144 template <class GUIview, class GUIbc>
146 public GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
149 GUIERT(LyXView & lv, Dialogs & d)
150 : GUI<ControlERT, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
154 /** Specialization for External dialog
156 template <class GUIview, class GUIbc>
158 public GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc> {
161 GUIExternal(LyXView & lv, Dialogs & d)
162 : GUI<ControlExternal, GUIview, OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
166 /** Specialization for Forks dialog
168 template <class GUIview, class GUIbc>
170 public GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc> {
173 GUIForks(LyXView & lv, Dialogs & d)
174 : GUI<ControlForks, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
177 /** Specialization for Graphics dialog
179 template <class GUIview, class GUIbc>
181 public GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
184 GUIGraphics(LyXView & lv, Dialogs & d)
185 : GUI<ControlGraphics, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
189 /** Specialization for Include dialog
191 template <class GUIview, class GUIbc>
193 public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
196 GUIInclude(LyXView & lv, Dialogs & d)
197 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
201 /** Specialization for Index dialog
203 template <class GUIview, class GUIbc>
205 public GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
208 GUIIndex(LyXView & lv, Dialogs & d)
209 : GUI<ControlIndex, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
213 /** Specialization for Log dialog
215 template <class GUIview, class GUIbc>
217 public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
220 GUILog(LyXView & lv, Dialogs & d)
221 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
225 /** Specialization for Minipage dialog
227 template <class GUIview, class GUIbc>
229 public GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
232 GUIMinipage(LyXView & lv, Dialogs & d)
233 : GUI<ControlMinipage, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
237 /** Specialization for Float dialog
239 template <class GUIview, class GUIbc>
241 public GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
244 GUIFloat(LyXView & lv, Dialogs & d)
245 : GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
249 /** Specialization for Preamble dialog
251 template <class GUIview, class GUIbc>
253 public GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
256 GUIPreamble(LyXView & lv, Dialogs & d)
257 : GUI<ControlPreamble, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
261 /** Specialization for Print dialog
263 template <class GUIview, class GUIbc>
265 public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
268 GUIPrint(LyXView & lv, Dialogs & d)
269 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
273 /** Specialization for Ref dialog
275 template <class GUIview, class GUIbc>
277 public GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
280 GUIRef(LyXView & lv, Dialogs & d)
281 : GUI<ControlRef, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
285 /** Specialization for Search dialog
287 template <class GUIview, class GUIbc>
289 public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
292 GUISearch(LyXView & lv, Dialogs & d)
293 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
297 /** Specialization for Sendto dialog
299 template <class GUIview, class GUIbc>
301 public GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc> {
304 GUISendto(LyXView & lv, Dialogs & d)
305 : GUI<ControlSendto, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
309 /** Specialization for ShowFile dialog
311 template <class GUIview, class GUIbc>
313 public GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc> {
316 GUIShowFile(LyXView & lv, Dialogs & d)
317 : GUI<ControlShowFile, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
320 /** Specialization for Spellchecker dialog
322 template <class GUIview, class GUIbc>
323 class GUISpellchecker :
324 public GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
327 GUISpellchecker(LyXView & lv, Dialogs & d)
328 : GUI<ControlSpellchecker, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
331 /** Specialization for Toc dialog
333 template <class GUIview, class GUIbc>
335 public GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc> {
338 GUIToc(LyXView & lv, Dialogs & d)
339 : GUI<ControlToc, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
343 /** Specialization for TabularCreate dialog
345 template <class GUIview, class GUIbc>
346 class GUITabularCreate :
347 public GUI<ControlTabularCreate, GUIview,
348 OkApplyCancelReadOnlyPolicy, GUIbc> {
351 GUITabularCreate(LyXView & lv, Dialogs & d)
352 : GUI<ControlTabularCreate, GUIview,
353 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
357 /** Specialization for Texinfo dialog
359 template <class GUIview, class GUIbc>
361 public GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc> {
364 GUITexinfo(LyXView & lv, Dialogs & d)
365 : GUI<ControlTexinfo, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
368 /** Specialization for Thesaurus dialog
370 template <class GUIview, class GUIbc>
372 public GUI<ControlThesaurus, GUIview,
373 OkApplyCancelReadOnlyPolicy, GUIbc> {
376 GUIThesaurus(LyXView & lv, Dialogs & d)
377 : GUI<ControlThesaurus, GUIview,
378 OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
382 /** Specialization for Url dialog
384 template <class GUIview, class GUIbc>
386 public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
389 GUIUrl(LyXView & lv, Dialogs & d)
390 : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
394 /** Specialization for VCLog dialog
396 template <class GUIview, class GUIbc>
398 public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
401 GUIVCLog(LyXView & lv, Dialogs & d)
402 : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}