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>
41 /** Container of all dialogs and signals a LyXView needs or uses to access them
42 The list of dialog signals isn't comprehensive but should be a good guide
43 for any future additions. Remember don't go overboard -- think minimal.
45 class Dialogs : boost::noncopyable
50 /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
53 /** Redraw all visible dialogs because, for example, the GUI colours
54 * have been re-mapped.
56 * Note that static boost signals break some compilers, so we return a
57 * reference to some hidden magic ;-)
59 static boost::signal0<void> & redrawGUI();
61 /// Toggle tooltips on/off in all dialogs.
62 static void toggleTooltips();
64 /// Are the tooltips on or off?
65 static bool tooltipsEnabled();
67 /**@name Global Hide and Update Signals */
69 /// Hide all visible dialogs
70 boost::signal0<void> hideAll;
72 /// Hide any dialogs that require a buffer for them to operate
73 boost::signal0<void> hideBufferDependent;
75 /** Update visible, buffer-dependent dialogs
76 If the bool is true then a buffer change has occurred
77 else its still the same buffer.
79 boost::signal1<void, bool> updateBufferDependent;
82 /**@name Dialog Access Signals.
83 Put into some sort of alphabetical order */
87 /// show the key and label of a bibliography entry
88 void showBibitem(InsetCommand * ic);
89 /// show the bibtex dialog
90 void showBibtex(InsetCommand * ic);
93 /// connected to the character dialog also
94 void setUserFreeFont();
96 void showCitation(InsetCommand *);
98 void createCitation(string const &);
102 void showError(InsetError *);
104 void showERT(InsetERT *);
106 void updateERT(InsetERT *);
107 /// show the external inset dialog
108 void showExternal(InsetExternal *);
109 /// show the contents of a file.
110 void showFile(string const &);
112 void showFloat(InsetFloat *);
114 void showWrap(InsetWrap *);
115 /// show all forked child processes
118 void showGraphics(InsetGraphics *);
119 /// show the details of a LyX file include inset
120 void showInclude(InsetInclude *);
122 void showIndex(InsetCommand *);
125 /// show the LaTeX log or build file
127 /// display the top-level maths panel
128 void showMathPanel();
130 void showMinipage(InsetMinipage *);
132 void updateMinipage(InsetMinipage *);
134 void showParagraph();
136 void updateParagraph();
140 void showPreferences();
144 void showRef(InsetCommand *);
146 void createRef(string const &);
151 /// bring up the spellchecker
152 void showSpellchecker();
154 void showTabular(InsetTabular *);
156 void updateTabular(InsetTabular *);
158 void showTabularCreate();
161 /// show the thesaurus dialog
162 void showThesaurus(string const &);
164 void showTOC(InsetCommand *);
166 void createTOC(string const &);
168 void showUrl(InsetCommand *);
170 void createUrl(string const &);
171 /// show the version control log
172 void showVCLogFile();
176 /// Use the Pimpl idiom to hide the internals.
178 /// The pointer never changes although *pimpl_'s contents may.
179 boost::scoped_ptr<Impl> const pimpl_;