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();
129 /// show the merge changes dialog
130 void showMergeChanges();
132 void showMinipage(InsetMinipage *);
134 void updateMinipage(InsetMinipage *);
136 void showParagraph();
138 void updateParagraph();
142 void showPreferences();
146 void showRef(InsetCommand *);
148 void createRef(string const &);
153 /// bring up the spellchecker
154 void showSpellchecker();
156 void showTabular(InsetTabular *);
158 void updateTabular(InsetTabular *);
160 void showTabularCreate();
163 /// show the thesaurus dialog
164 void showThesaurus(string const &);
166 void showTOC(InsetCommand *);
168 void createTOC(string const &);
170 void showUrl(InsetCommand *);
172 void createUrl(string const &);
173 /// show the version control log
174 void showVCLogFile();
178 /// Use the Pimpl idiom to hide the internals.
180 /// The pointer never changes although *pimpl_'s contents may.
181 boost::scoped_ptr<Impl> const pimpl_;