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