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
20 #include <boost/utility.hpp>
21 #include <boost/scoped_ptr.hpp>
22 #include <boost/signals/signal0.hpp>
23 #include <boost/signals/signal1.hpp>
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.
44 class Dialogs : boost::noncopyable
49 /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
52 /** Redraw all visible dialogs because, for example, the GUI colours
53 * have been re-mapped.
55 * Note that static boost signals break some compilers, so we return a
56 * reference to some hidden magic ;-)
58 static boost::signal0<void> & redrawGUI();
60 /// Toggle tooltips on/off in all dialogs.
61 static void toggleTooltips();
63 /// Are the tooltips on or off?
64 static bool tooltipsEnabled();
66 /**@name Global Hide and Update Signals */
68 /// Hide all visible dialogs
69 boost::signal0<void> hideAll;
71 /// Hide any dialogs that require a buffer for them to operate
72 boost::signal0<void> hideBufferDependent;
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.
78 boost::signal1<void, bool> updateBufferDependent;
81 /**@name Dialog Access Signals.
82 Put into some sort of alphabetical order */
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);
92 /// connected to the character dialog also
93 void setUserFreeFont();
95 void showCitation(InsetCommand *);
97 void createCitation(string const &);
101 void showError(InsetError *);
103 void showERT(InsetERT *);
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 &);
111 void showFloat(InsetFloat *);
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();
127 void showMinipage(InsetMinipage *);
129 void updateMinipage(InsetMinipage *);
131 void showParagraph();
133 void updateParagraph();
137 void showPreferences();
141 void showRef(InsetCommand *);
143 void createRef(string const &);
148 /// bring up the spellchecker
149 void showSpellchecker();
151 void showTabular(InsetTabular *);
153 void updateTabular(InsetTabular *);
155 void showTabularCreate();
158 /// show the thesaurus dialog
159 void showThesaurus(string const &);
161 void showTOC(InsetCommand *);
163 void createTOC(string const &);
165 void showUrl(InsetCommand *);
167 void createUrl(string const &);
168 /// show the version control log
169 void showVCLogFile();
173 /// Use the Pimpl idiom to hide the internals.
175 /// The pointer never changes although *pimpl_'s contents may.
176 boost::scoped_ptr<Impl> const pimpl_;