]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
fbe6a4ddf2ac3d0b4470f0364139beb571ab069a
[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 Credits dialog
116  */
117 class ControlCredits;
118
119 template <class GUIview, class GUIbc>
120 class GUICredits :
121         public GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc> {
122 public:
123         ///
124         GUICredits(LyXView & lv, Dialogs & d)
125                 : GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
126 };
127
128
129 /** Specialization for Error dialog
130  */
131 class ControlError;
132
133 template <class GUIview, class GUIbc>
134 class GUIError :
135         public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
136 public:
137         ///
138         GUIError(LyXView & lv, Dialogs & d)
139                 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
140 };
141
142
143 /** Specialization for Include dialog
144  */
145 class ControlInclude;
146
147 template <class GUIview, class GUIbc>
148 class GUIInclude :
149         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
150 public:
151         ///
152         GUIInclude(LyXView & lv, Dialogs & d)
153                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
154 };
155
156
157 /** Specialization for Log dialog
158  */
159 class ControlLog;
160
161 template <class GUIview, class GUIbc>
162 class GUILog :
163         public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
164 public:
165         ///
166         GUILog(LyXView & lv, Dialogs & d)
167                 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
168 };
169
170
171 /** Specialization for Print dialog
172  */
173 class ControlPrint;
174
175 template <class GUIview, class GUIbc>
176 class GUIPrint :
177         public GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc> {
178 public:
179         ///
180         GUIPrint(LyXView & lv, Dialogs & d)
181                 : GUI<ControlPrint, GUIview, OkApplyCancelPolicy, GUIbc>(lv, d) {}
182 };
183
184
185 /** Specialization for Ref dialog
186  */
187 class ControlRef;
188
189 template <class GUIview, class GUIbc>
190 class GUIRef :
191         public GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc> {
192 public:
193         ///
194         GUIRef(LyXView & lv, Dialogs & d)
195                 : GUI<ControlRef, GUIview, NoRepeatedApplyPolicy, GUIbc>(lv, d) {}
196 };
197
198
199 /** Specialization for Search dialog
200  */
201 class ControlSearch;
202
203 template <class GUIview, class GUIbc>
204 class GUISearch :
205         public GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
206 public:
207         ///
208         GUISearch(LyXView & lv, Dialogs & d)
209                 : GUI<ControlSearch, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
210 };
211
212
213 /** Specialization for TabularCreate dialog
214  */
215 class ControlTabularCreate;
216
217 template <class GUIview, class GUIbc>
218 class GUITabularCreate :
219         public GUI<ControlTabularCreate, GUIview,
220                    OkApplyCancelReadOnlyPolicy, GUIbc> {
221 public:
222         ///
223         GUITabularCreate(LyXView & lv, Dialogs & d)
224                 : GUI<ControlTabularCreate, GUIview,
225                       OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
226 };
227
228
229 /** Specialization for Url dialog
230  */
231 class ControlUrl;
232
233 template <class GUIview, class GUIbc>
234 class GUIUrl :
235         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
236 public:
237         ///
238         GUIUrl(LyXView & lv, Dialogs & d)
239             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
240 };
241
242
243 /** Specialization for VCLog dialog
244  */
245 class ControlVCLog;
246
247 template <class GUIview, class GUIbc>
248 class GUIVCLog :
249         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
250 public:
251         ///
252         GUIVCLog(LyXView & lv, Dialogs & d)
253             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
254 };
255
256
257 #endif // GUI_H