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>
36 /** Container of all dialogs and signals a LyXView needs or uses to access them
37 The list of dialog signals isn't comprehensive but should be a good guide
38 for any future additions. Remember don't go overboard -- think minimal.
40 class Dialogs : boost::noncopyable
45 /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
48 /** Redraw all visible dialogs because, for example, the GUI colours
49 * have been re-mapped.
51 * Note that static boost signals break some compilers, so we return a
52 * reference to some hidden magic ;-)
54 static boost::signal0<void> & redrawGUI();
56 /// Toggle tooltips on/off in all dialogs.
57 static void toggleTooltips();
59 /// Are the tooltips on or off?
60 static bool tooltipsEnabled();
62 /**@name Global Hide and Update Signals */
64 /// Hide all visible dialogs
65 boost::signal0<void> hideAll;
67 /// Hide any dialogs that require a buffer for them to operate
68 boost::signal0<void> hideBufferDependent;
70 /** Update visible, buffer-dependent dialogs
71 If the bool is true then a buffer change has occurred
72 else its still the same buffer.
74 boost::signal1<void, bool> updateBufferDependent;
77 /**@name Dialog Access Signals.
78 Put into some sort of alphabetical order */
82 /// show the key and label of a bibliography entry
83 void showBibitem(InsetCommand * ic);
84 /// show the bibtex dialog
85 void showBibtex(InsetCommand * ic);
88 /// connected to the character dialog also
89 void setUserFreeFont();
91 void showCitation(InsetCommand *);
93 void createCitation(string const &);
97 void showError(InsetError *);
99 void showERT(InsetERT *);
101 void updateERT(InsetERT *);
102 /// show the external inset dialog
103 void showExternal(InsetExternal *);
104 /// show the contents of a file.
105 void showFile(string const &);
107 void showFloat(InsetFloat *);
109 void showWrap(InsetWrap *);
110 /// show all forked child processes
113 void showGraphics(InsetGraphics *);
114 /// show the details of a LyX file include inset
115 void showInclude(InsetInclude *);
117 void showIndex(InsetCommand *);
120 /// show the LaTeX log or build file
122 /// display the top-level maths panel
123 void showMathPanel();
124 /// show the merge changes dialog
125 void showMergeChanges();
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_;