]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Dialogs.C
Edwin's Para MVC. Sorry for the delay !
[lyx.git] / src / frontends / xforms / Dialogs.C
1 /**
2  * \file xforms/Dialogs.C
3  * Copyright 1995 Matthias Ettrich
4  * Copyright 1995-2001 The LyX Team.
5  * See the file COPYING.
6  *
7  * \author Allan Rae, rae@lyx.org
8  */
9
10 #include <config.h>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "Dialogs.h"
17
18 #include "GUI.h"
19 #include "xformsBC.h"
20
21 #include "combox.h"       // needed for clean destruction of boost::scoped_ptr
22 #include "form_aboutlyx.h"
23 #include "form_bibitem.h"
24 #include "form_bibtex.h"
25 #include "form_browser.h"
26 #include "form_character.h"
27 #include "form_citation.h"
28 #include "form_error.h"
29 #include "form_ert.h"
30 #include "form_external.h"
31 #include "form_float.h"
32 #include "form_forks.h"
33 #include "form_graphics.h"
34 #include "form_include.h"
35 #include "form_index.h"
36 #include "form_minipage.h"
37 #include "form_paragraph.h"
38 #include "form_preamble.h"
39 #include "form_print.h"
40 #include "form_ref.h"
41 #include "form_search.h"
42 #include "form_sendto.h"
43 #include "form_spellchecker.h"
44 #include "form_tabular_create.h"
45 #include "form_texinfo.h"
46 #include "form_thesaurus.h"
47 #include "form_toc.h"
48 #include "form_url.h"
49
50 #include "FormAboutlyx.h"
51 #include "FormBibitem.h"
52 #include "FormBibtex.h"
53 #include "FormCharacter.h"
54 #include "FormCitation.h"
55 #include "FormError.h"
56 #include "FormERT.h"
57 #include "FormExternal.h"
58 #include "FormFloat.h"
59 #include "FormForks.h"
60 #include "FormGraphics.h"
61 #include "FormInclude.h"
62 #include "FormIndex.h"
63 #include "FormLog.h"
64 #include "FormMinipage.h"
65 #include "FormParagraph.h"
66 #include "FormPreamble.h"
67 #include "FormPrint.h"
68 #include "FormRef.h"
69 #include "FormSearch.h"
70 #include "FormSendto.h"
71 #include "FormShowFile.h"
72 #include "FormSpellchecker.h"
73 #include "FormTabularCreate.h"
74 #include "FormTexinfo.h"
75 #include "FormThesaurus.h"
76 #include "FormToc.h"
77 #include "FormUrl.h"
78 #include "FormVCLog.h"
79
80 #include "FormDocument.h"
81 #include "FormMathsPanel.h"
82 #include "FormPreferences.h"
83 #include "FormTabular.h"
84
85 #include "Tooltips.h"
86
87 /// Are the tooltips on or off?
88 bool Dialogs::tooltipsEnabled()
89 {
90         return Tooltips::enabled();
91 }
92
93
94 Dialogs::Dialogs(LyXView * lv)
95 {
96         add(new GUI<ControlAboutlyx, FormAboutlyx,
97                     OkCancelPolicy, xformsBC>(*lv, *this));
98         add(new GUI<ControlBibitem, FormBibitem,
99                     OkCancelReadOnlyPolicy, xformsBC>(*lv, *this));
100         add(new GUI<ControlBibtex, FormBibtex,
101                     OkCancelReadOnlyPolicy, xformsBC>(*lv, *this));
102         add(new GUI<ControlCharacter, FormCharacter,
103                     OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
104         add(new GUI<ControlCitation, FormCitation,
105                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
106         add(new GUI<ControlError, FormError,
107                     OkCancelPolicy, xformsBC>(*lv, *this));
108         add(new GUI<ControlERT, FormERT,
109                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
110         add(new GUI<ControlExternal, FormExternal,
111                     OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
112         add(new GUI<ControlForks, FormForks,
113                     OkApplyCancelPolicy, xformsBC>(*lv, *this));
114         add(new GUI<ControlGraphics, FormGraphics,
115                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
116         add(new GUI<ControlInclude, FormInclude,
117                     OkCancelReadOnlyPolicy, xformsBC>(*lv, *this));
118         add(new GUI<ControlIndex, FormIndex,
119                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
120         add(new GUI<ControlLog, FormLog,
121                     OkCancelPolicy, xformsBC>(*lv, *this));
122         add(new GUI<ControlMinipage, FormMinipage,
123                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
124         add(new GUI<ControlFloat, FormFloat,
125                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
126         add(new GUI<ControlParagraph, FormParagraph,
127                     OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
128         add(new GUI<ControlPreamble, FormPreamble,
129                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
130         add(new GUI<ControlPrint, FormPrint,
131                     OkApplyCancelPolicy, xformsBC>(*lv, *this));
132         add(new GUI<ControlRef, FormRef,
133                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
134         add(new GUI<ControlSearch, FormSearch,
135                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
136         add(new GUI<ControlSendto, FormSendto,
137                     OkApplyCancelPolicy, xformsBC>(*lv, *this));
138         add(new GUI<ControlShowFile, FormShowFile,
139                     OkCancelPolicy, xformsBC>(*lv, *this));
140         add(new GUI<ControlSpellchecker, FormSpellchecker,
141                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
142         add(new GUI<ControlTabularCreate, FormTabularCreate,
143                     OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
144 #ifdef HAVE_LIBAIKSAURUS
145         add(new GUI<ControlThesaurus, FormThesaurus,
146                     OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
147 #endif
148         add(new GUI<ControlTexinfo, FormTexinfo,
149                     OkCancelPolicy, xformsBC>(*lv, *this));
150         add(new GUI<ControlToc, FormToc,
151                     OkCancelPolicy, xformsBC>(*lv, *this));
152         add(new GUI<ControlUrl, FormUrl,
153                     NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
154         add(new GUI<ControlVCLog, FormVCLog,
155                     OkCancelPolicy, xformsBC>(*lv, *this));
156
157         add(new FormDocument(lv, this));
158         add(new FormMathsPanel(lv, this));
159         add(new FormPreferences(lv, this));
160         add(new FormTabular(lv, this));
161
162         // reduce the number of connections needed in
163         // dialogs by a simple connection here.
164         hideAll.connect(hideBufferDependent);
165 }