4 * See the file COPYING.
7 * Full author contact details are available in file CREDITS
19 #include <boost/utility.hpp>
20 #include <boost/scoped_ptr.hpp>
21 #include <boost/signals/signal0.hpp>
22 #include <boost/signals/signal1.hpp>
39 /** Container of all dialogs and signals a LyXView needs or uses to access them
40 The list of dialog signals isn't comprehensive but should be a good guide
41 for any future additions. Remember don't go overboard -- think minimal.
43 class Dialogs : boost::noncopyable
48 /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
51 /** Redraw all visible dialogs because, for example, the GUI colours
52 * have been re-mapped.
54 * Note that static boost signals break some compilers, so we return a
55 * reference to some hidden magic ;-)
57 static boost::signal0<void> & redrawGUI();
59 /// Toggle tooltips on/off in all dialogs.
60 static void toggleTooltips();
62 /// Are the tooltips on or off?
63 static bool tooltipsEnabled();
65 /**@name Global Hide and Update Signals */
67 /// Hide all visible dialogs
68 boost::signal0<void> hideAll;
70 /// Hide any dialogs that require a buffer for them to operate
71 boost::signal0<void> hideBufferDependent;
73 /** Update visible, buffer-dependent dialogs
74 If the bool is true then a buffer change has occurred
75 else its still the same buffer.
77 boost::signal1<void, bool> updateBufferDependent;
80 /**@name Dialog Access Signals.
81 Put into some sort of alphabetical order */
85 /// show the key and label of a bibliography entry
86 void showBibitem(InsetCommand * ic);
87 /// show the bibtex dialog
88 void showBibtex(InsetCommand * ic);
91 /// connected to the character dialog also
92 void setUserFreeFont();
94 void showCitation(InsetCommand *);
96 void createCitation(string const &);
100 void showError(InsetError *);
102 void showERT(InsetERT *);
104 void updateERT(InsetERT *);
105 /// show the external inset dialog
106 void showExternal(InsetExternal *);
107 /// show the contents of a file.
108 void showFile(string const &);
110 void showFloat(InsetFloat *);
111 /// show all forked child processes
114 void showGraphics(InsetGraphics *);
115 /// show the details of a LyX file include inset
116 void showInclude(InsetInclude *);
118 void showIndex(InsetCommand *);
121 /// show the LaTeX log or build file
123 /// display the top-level maths panel
124 void showMathPanel();
126 void showMinipage(InsetMinipage *);
128 void updateMinipage(InsetMinipage *);
130 void showParagraph();
132 void updateParagraph();
136 void showPreferences();
140 void showRef(InsetCommand *);
142 void createRef(string const &);
147 /// bring up the spellchecker
148 void showSpellchecker();
150 void showTabular(InsetTabular *);
152 void updateTabular(InsetTabular *);
154 void showTabularCreate();
157 /// show the thesaurus dialog
158 void showThesaurus(string const &);
160 void showTOC(InsetCommand *);
162 void createTOC(string const &);
164 void showUrl(InsetCommand *);
166 void createUrl(string const &);
167 /// show the version control log
168 void showVCLogFile();
172 /// Use the Pimpl idiom to hide the internals.
174 /// The pointer never changes although *pimpl_'s contents may.
175 boost::scoped_ptr<Impl> const pimpl_;