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