]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/GUI.h
controller-view split for Url popup.
[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     ButtonController and View.
14  */
15 template <class Controller, class GUIview, class Policy, class GUIbc>
16 class GUI : public Controller {
17 public:
18         ///
19         GUI(LyXView & lv, Dialogs & d) : Controller(lv, d), view_(*this) {}
20         ///
21         virtual ButtonControllerBase & bc() { return bc_; }
22         ///
23         virtual ViewBase & view() { return view_; }
24
25 private:
26         ///
27         ButtonController<Policy, GUIbc> bc_;
28         ///
29         GUIview view_;
30 };
31
32 /// Forward declaration of ButtonPolicies
33 class OkCancelPolicy;
34 class OkCancelReadOnlyPolicy;
35 class NoRepeatedApplyReadOnlyPolicy;
36
37
38 /** Specialization for Bibitem dialog
39  */
40 class ControlBibitem;
41
42 template <class GUIview, class GUIbc>
43 class GUIBibitem :
44         public GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
45 public:
46         ///
47         GUIBibitem(LyXView & lv, Dialogs & d)
48                 : GUI<ControlBibitem, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
49 };
50
51
52 /** Specialization for Bibtex dialog
53  */
54 class ControlBibtex;
55
56 template <class GUIview, class GUIbc>
57 class GUIBibtex :
58         public GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
59 public:
60         ///
61         GUIBibtex(LyXView & lv, Dialogs & d)
62                 : GUI<ControlBibtex, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
63 };
64
65
66 /** Specialization for Character dialog
67  */
68 class ControlCharacter;
69
70 template <class GUIview, class GUIbc>
71 class GUICharacter : public GUI<ControlCharacter, GUIview,
72                                 NoRepeatedApplyReadOnlyPolicy, GUIbc>
73 {
74 public:
75         ///
76         GUICharacter(LyXView & lv, Dialogs & d)
77                 : GUI<ControlCharacter, GUIview,
78                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
79 };
80
81
82 /** Specialization for Citation dialog
83  */
84 class ControlCitation;
85
86 template <class GUIview, class GUIbc>
87 class GUICitation : public GUI<ControlCitation, GUIview,
88                                NoRepeatedApplyReadOnlyPolicy, GUIbc>
89 {
90 public:
91         ///
92         GUICitation(LyXView & lv, Dialogs & d)
93                 : GUI<ControlCitation, GUIview,
94                       NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
95 };
96
97
98 /** Specialization for Credits dialog
99  */
100 class ControlCredits;
101
102 template <class GUIview, class GUIbc>
103 class GUICredits :
104         public GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc> {
105 public:
106         ///
107         GUICredits(LyXView & lv, Dialogs & d)
108                 : GUI<ControlCredits, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
109 };
110
111
112 /** Specialization for Error dialog
113  */
114 class ControlError;
115
116 template <class GUIview, class GUIbc>
117 class GUIError :
118         public GUI<ControlError, GUIview, OkCancelPolicy, GUIbc> {
119 public:
120         ///
121         GUIError(LyXView & lv, Dialogs & d)
122                 : GUI<ControlError, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
123 };
124
125
126 /** Specialization for Include dialog
127  */
128 class ControlInclude;
129
130 template <class GUIview, class GUIbc>
131 class GUIInclude :
132         public GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc> {
133 public:
134         ///
135         GUIInclude(LyXView & lv, Dialogs & d)
136                 : GUI<ControlInclude, GUIview, OkCancelReadOnlyPolicy, GUIbc>(lv, d) {}
137 };
138
139
140 /** Specialization for Log dialog
141  */
142 class ControlLog;
143
144 template <class GUIview, class GUIbc>
145 class GUILog :
146         public GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc> {
147 public:
148         ///
149         GUILog(LyXView & lv, Dialogs & d)
150                 : GUI<ControlLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
151 };
152
153
154 /** Specialization for Url dialog
155  */
156 class ControlUrl;
157
158 template <class GUIview, class GUIbc>
159 class GUIUrl :
160         public GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc> {
161 public:
162         ///
163         GUIUrl(LyXView & lv, Dialogs & d)
164             : GUI<ControlUrl, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
165 };
166
167
168 /** Specialization for VCLog dialog
169  */
170 class ControlVCLog;
171
172 template <class GUIview, class GUIbc>
173 class GUIVCLog :
174         public GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc> {
175 public:
176         ///
177         GUIVCLog(LyXView & lv, Dialogs & d)
178             : GUI<ControlVCLog, GUIview, OkCancelPolicy, GUIbc>(lv, d) {}
179 };
180
181 #endif // GUI_H