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