]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Dialogs2.C
remove defaults stuff, let Qt handle no toolbar
[lyx.git] / src / frontends / xforms / Dialogs2.C
1 /**
2  * \file xforms/Dialogs2.C
3  * Copyright 1995 Matthias Ettrich
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Allan Rae
8  * \author Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #include <config.h>
14
15 #include "Dialogs.h"
16 #include "controllers/GUI.h"
17 #include "ButtonController.h"
18
19 #include "Tooltips.h"
20 #include "xformsBC.h"
21
22 #include "ControlDocument.h"
23 #include "FormDocument.h"
24 #include "forms/form_document.h"
25
26 #include "ControlForks.h"
27 #include "FormForks.h"
28 #include "forms/form_forks.h"
29
30 #include "ControlMath.h"
31 #include "FormMathsPanel.h"
32 #include "forms/form_maths_panel.h"
33
34 #include "ControlPreamble.h"
35 #include "FormPreamble.h"
36 #include "forms/form_preamble.h"
37
38 #include "ControlPrefs.h"
39 #include "FormPreferences.h"
40 #include "forms/form_preferences.h"
41
42 #include "ControlPrint.h"
43 #include "FormPrint.h"
44 #include "forms/form_print.h"
45
46 #include "ControlSearch.h"
47 #include "FormSearch.h"
48 #include "forms/form_search.h"
49
50 #include "ControlSendto.h"
51 #include "FormSendto.h"
52 #include "forms/form_sendto.h"
53
54 #include "ControlSpellchecker.h"
55 #include "FormSpellchecker.h"
56 #include "forms/form_spellchecker.h"
57
58 #include "ControlTexinfo.h"
59 #include "FormTexinfo.h"
60 #include "forms/form_texinfo.h"
61
62 typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
63 DocumentDialog;
64
65 typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
66 ForksDialog;
67
68 typedef GUI<ControlMath, FormMathsPanel, OkCancelReadOnlyPolicy, xformsBC>
69 MathPanelDialog;
70
71 typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
72 PreambleDialog;
73
74 typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
75 PreferencesDialog;
76
77 typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
78 PrintDialog;
79
80 typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
81 SearchDialog;
82
83 typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
84 SendtoDialog;
85
86 typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
87 SpellcheckerDialog;
88
89 typedef GUI<ControlTexinfo, FormTexinfo, OkCancelPolicy, xformsBC>
90 TexinfoDialog;
91
92 struct Dialogs::Impl {
93         Impl(LyXView & lv, Dialogs & d);
94
95         DocumentDialog      document;
96         ForksDialog         forks;
97         MathPanelDialog     mathpanel;
98         PreambleDialog      preamble;
99         PreferencesDialog   preferences;
100         PrintDialog         print;
101         SearchDialog        search;
102         SendtoDialog        sendto;
103         SpellcheckerDialog  spellchecker;
104         TexinfoDialog       texinfo;
105 };
106
107
108 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
109         : document(lv, d),
110           forks(lv, d),
111           mathpanel(lv, d),
112           preamble(lv, d),
113           preferences(lv, d),
114           print(lv, d),
115           search(lv, d),
116           sendto(lv, d),
117           spellchecker(lv, d),
118           texinfo(lv, d)
119 {}
120
121
122 void Dialogs::init_pimpl()
123 {
124         pimpl_ = new Impl(lyxview_, *this);
125 }
126
127
128 Dialogs::~Dialogs()
129 {
130         delete pimpl_;
131 }
132
133
134 void Dialogs::showDocument()
135 {
136         pimpl_->document.controller().show();
137 }
138
139
140 void Dialogs::showForks()
141 {
142         pimpl_->forks.controller().show();
143 }
144
145
146 void Dialogs::showMathPanel()
147 {
148         pimpl_->mathpanel.controller().show();
149 }
150
151
152 void Dialogs::showPreamble()
153 {
154         pimpl_->preamble.controller().show();
155 }
156
157
158 void Dialogs::showPreferences()
159 {
160         pimpl_->preferences.controller().show();
161 }
162
163
164 void Dialogs::showPrint()
165 {
166         pimpl_->print.controller().show();
167 }
168
169
170 void Dialogs::showSearch()
171 {
172         pimpl_->search.controller().show();
173 }
174
175
176 void Dialogs::showSendto()
177 {
178         pimpl_->sendto.controller().show();
179 }
180
181
182 void Dialogs::showSpellchecker()
183 {
184         pimpl_->spellchecker.controller().show();
185 }
186
187
188 void Dialogs::showTexinfo()
189 {
190         pimpl_->texinfo.controller().show();
191 }