]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
another fix
[lyx.git] / src / frontends / Dialogs.h
1 // -*- C++ -*-
2 /**
3  * \file Dialogs.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  * \author Allan Rae
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #ifndef DIALOGS_H
12 #define DIALOGS_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "LString.h"
19
20 #include <boost/utility.hpp>
21 #include <boost/scoped_ptr.hpp>
22 #include <boost/signals/signal0.hpp>
23 #include <boost/signals/signal1.hpp>
24
25 class LyXView;
26 class InsetBibKey;
27 class InsetBibtex;
28 class InsetCommand;
29 class InsetError;
30 class InsetERT;
31 class InsetExternal;
32 class InsetFloat;
33 class InsetGraphics;
34 class InsetInclude;
35 class InsetInfo;
36 class InsetMinipage;
37 class Paragraph;
38 class InsetTabular;
39
40 /** Container of all dialogs and signals a LyXView needs or uses to access them
41     The list of dialog signals isn't comprehensive but should be a good guide
42     for any future additions.  Remember don't go overboard -- think minimal.
43  */
44 class Dialogs : boost::noncopyable
45 {
46 public:
47         ///
48         Dialogs(LyXView &);
49         /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
50         ~Dialogs();
51
52         /** Redraw all visible dialogs because, for example, the GUI colours
53          *  have been re-mapped.
54          *
55          *  Note that static boost signals break some compilers, so we return a
56          *  reference to some hidden magic ;-)
57          */
58         static boost::signal0<void> & redrawGUI();
59
60         /// Toggle tooltips on/off in all dialogs.
61         static void toggleTooltips();
62
63         /// Are the tooltips on or off?
64         static bool tooltipsEnabled();
65
66         /**@name Global Hide and Update Signals */
67         //@{
68         /// Hide all visible dialogs
69         boost::signal0<void> hideAll;
70
71         /// Hide any dialogs that require a buffer for them to operate
72         boost::signal0<void> hideBufferDependent;
73
74         /** Update visible, buffer-dependent dialogs
75             If the bool is true then a buffer change has occurred
76             else its still the same buffer.
77          */
78         boost::signal1<void, bool> updateBufferDependent;
79         //@}
80
81         /**@name Dialog Access Signals.
82            Put into some sort of alphabetical order */
83         //@{
84         ///
85         void showAboutlyx();
86         /// show the key and label of a bibliography entry
87         void showBibitem(InsetCommand * ic);
88         /// show the bibtex dialog
89         void showBibtex(InsetCommand * ic);
90         ///
91         void showCharacter();
92         /// connected to the character dialog also
93         void setUserFreeFont();
94         ///
95         void showCitation(InsetCommand *);
96         ///
97         void createCitation(string const &);
98         ///
99         void showDocument();
100         ///
101         void showError(InsetError *);
102         ///
103         void showERT(InsetERT *);
104         ///
105         void updateERT(InsetERT *);
106         /// show the external inset dialog
107         void showExternal(InsetExternal *);
108         /// show the contents of a file.
109         void showFile(string const &);
110         ///
111         void showFloat(InsetFloat *);
112         /// show all forked child processes
113         void showForks();
114         ///
115         void showGraphics(InsetGraphics *);
116         /// show the details of a LyX file include inset
117         void showInclude(InsetInclude *);
118         ///
119         void showIndex(InsetCommand *);
120         ///
121         void createIndex();
122         /// show the LaTeX log or build file
123         void showLogFile();
124         /// display the top-level maths panel
125         void showMathPanel();
126         ///
127         void showMinipage(InsetMinipage *);
128         ///
129         void updateMinipage(InsetMinipage *);
130         ///
131         void showParagraph();
132         ///
133         void updateParagraph();
134         ///
135         void showPreamble();
136         ///
137         void showPreferences();
138         ///
139         void showPrint();
140         ///
141         void showRef(InsetCommand *);
142         ///
143         void createRef(string const &);
144         ///
145         void showSearch();
146         ///
147         void showSendto();
148         /// bring up the spellchecker
149         void showSpellchecker();
150         ///
151         void showTabular(InsetTabular *);
152         ///
153         void updateTabular(InsetTabular *);
154         ///
155         void showTabularCreate();
156         /// show the TexInfo
157         void showTexinfo();
158         /// show the thesaurus dialog
159         void showThesaurus(string const &);
160         ///
161         void showTOC(InsetCommand *);
162         ///
163         void createTOC(string const &);
164         ///
165         void showUrl(InsetCommand *);
166         ///
167         void createUrl(string const &);
168         /// show the version control log
169         void showVCLogFile();
170         //@}
171
172 private:
173         /// Use the Pimpl idiom to hide the internals.
174         class Impl;
175         /// The pointer never changes although *pimpl_'s contents may.
176         boost::scoped_ptr<Impl> const pimpl_;
177 };
178
179 #endif