]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Dialogs2.C
Introduce LFUN_PRINT.
[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 #include "xforms_helpers.h"
20
21 #include "ControlDocument.h"
22 #include "FormDocument.h"
23 #include "forms/form_document.h"
24
25 #include "ControlPreamble.h"
26 #include "FormPreamble.h"
27 #include "forms/form_preamble.h"
28
29 #include "ControlPrefs.h"
30 #include "FormPreferences.h"
31 #include "FormColorpicker.h"
32 #include "forms/form_preferences.h"
33
34 #include "ControlSpellchecker.h"
35 #include "FormSpellchecker.h"
36 #include "forms/form_spellchecker.h"
37
38 typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
39 DocumentDialog;
40
41 typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
42 PreambleDialog;
43
44 typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
45 PreferencesDialog;
46
47 typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
48 SpellcheckerDialog;
49
50
51 struct Dialogs::Impl {
52         Impl(LyXView & lv, Dialogs & d);
53
54         DocumentDialog      document;
55         PreambleDialog      preamble;
56         PreferencesDialog   preferences;
57         SpellcheckerDialog  spellchecker;
58 };
59
60
61 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
62         : document(lv, d),
63           preamble(lv, d),
64           preferences(lv, d),
65           spellchecker(lv, d)
66 {}
67
68
69 void Dialogs::init_pimpl()
70 {
71         pimpl_ = new Impl(lyxview_, *this);
72 }
73
74
75 Dialogs::~Dialogs()
76 {
77         delete pimpl_;
78 }
79
80
81 void Dialogs::showDocument()
82 {
83         pimpl_->document.controller().show();
84 }
85
86
87 void Dialogs::showPreamble()
88 {
89         pimpl_->preamble.controller().show();
90 }
91
92
93 void Dialogs::showPreferences()
94 {
95         pimpl_->preferences.controller().show();
96 }
97
98
99 void Dialogs::showSpellchecker()
100 {
101         pimpl_->spellchecker.controller().show();
102 }