4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
17 #include <boost/utility.hpp>
18 #include <boost/scoped_ptr.hpp>
19 #include <boost/signals/signal0.hpp>
20 #include <boost/signals/signal1.hpp>
38 /** Container of all dialogs and signals a LyXView needs or uses to access them
39 The list of dialog signals isn't comprehensive but should be a good guide
40 for any future additions. Remember don't go overboard -- think minimal.
42 class Dialogs : boost::noncopyable
47 /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
50 /** Redraw all visible dialogs because, for example, the GUI colours
51 * have been re-mapped.
53 * Note that static boost signals break some compilers, so we return a
54 * reference to some hidden magic ;-)
56 static boost::signal0<void> & redrawGUI();
58 /// Toggle tooltips on/off in all dialogs.
59 static void toggleTooltips();
61 /// Are the tooltips on or off?
62 static bool tooltipsEnabled();
64 /**@name Global Hide and Update Signals */
66 /// Hide all visible dialogs
67 boost::signal0<void> hideAll;
69 /// Hide any dialogs that require a buffer for them to operate
70 boost::signal0<void> hideBufferDependent;
72 /** Update visible, buffer-dependent dialogs
73 If the bool is true then a buffer change has occurred
74 else its still the same buffer.
76 boost::signal1<void, bool> updateBufferDependent;
79 /**@name Dialog Access Signals.
80 Put into some sort of alphabetical order */
84 /// show the key and label of a bibliography entry
85 void showBibitem(InsetCommand * ic);
86 /// show the bibtex dialog
87 void showBibtex(InsetCommand * ic);
90 /// connected to the character dialog also
91 void setUserFreeFont();
93 void showCitation(InsetCommand *);
95 void createCitation(string const &);
99 void showError(InsetError *);
101 void showERT(InsetERT *);
103 void updateERT(InsetERT *);
104 /// show the external inset dialog
105 void showExternal(InsetExternal *);
106 /// show the contents of a file.
107 void showFile(string const &);
109 void showFloat(InsetFloat *);
111 void showWrap(InsetWrap *);
112 /// show all forked child processes
115 void showGraphics(InsetGraphics *);
116 /// show the details of a LyX file include inset
117 void showInclude(InsetInclude *);
119 void showIndex(InsetCommand *);
122 /// show the LaTeX log or build file
124 /// display the top-level maths panel
125 void showMathPanel();
126 /// show the merge changes dialog
127 void showMergeChanges();
129 void showMinipage(InsetMinipage *);
131 void updateMinipage(InsetMinipage *);
133 void showParagraph();
135 void updateParagraph();
139 void showPreferences();
143 void showRef(InsetCommand *);
145 void createRef(string const &);
150 /// bring up the spellchecker
151 void showSpellchecker();
153 void showTabular(InsetTabular *);
155 void updateTabular(InsetTabular *);
157 void showTabularCreate();
160 /// show the thesaurus dialog
161 void showThesaurus(string const &);
163 void showTOC(InsetCommand *);
165 void createTOC(string const &);
167 void showUrl(InsetCommand *);
169 void createUrl(string const &);
170 /// show the version control log
171 void showVCLogFile();
175 /// Use the Pimpl idiom to hide the internals.
177 /// The pointer never changes although *pimpl_'s contents may.
178 boost::scoped_ptr<Impl> const pimpl_;