4 * Copyright 1995-2002 The LyX Team.
5 * See the file COPYING.
6 * \author Allan Rae, rae@lyx.org
18 #include <boost/utility.hpp>
19 #include <boost/shared_ptr.hpp>
20 #include <boost/signals/signal0.hpp>
21 #include <boost/signals/signal1.hpp>
23 // Maybe this should be a UIFunc modelled on LyXFunc
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
48 typedef boost::shared_ptr<boost::noncopyable> db_ptr;
52 /** Redraw all visible dialogs because, for example, the GUI colours
53 have been re-mapped. */
54 boost::signal0<void> redrawGUI;
56 /// Toggle tooltips on/off in all dialogs.
57 boost::signal0<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 *);
108 /// show all forked child processes
111 void showGraphics(InsetGraphics *);
112 /// show the details of a LyX file include inset
113 void showInclude(InsetInclude *);
115 void showIndex(InsetCommand *);
118 /// show the LaTeX log or build file
120 /// display the top-level maths panel
121 void showMathPanel();
123 void showMinipage(InsetMinipage *);
125 void updateMinipage(InsetMinipage *);
127 void showParagraph();
129 boost::signal0<void> updateParagraph;
133 void showPreferences();
137 void showRef(InsetCommand *);
139 void createRef(string const &);
144 /// bring up the spellchecker
145 void showSpellchecker();
147 void showTabular(InsetTabular *);
149 void updateTabular(InsetTabular *);
151 void showTabularCreate();
154 /// show the thesaurus dialog
155 void showThesaurus(string const &);
157 void showTOC(InsetCommand *);
159 void createTOC(string const &);
161 void showUrl(InsetCommand *);
163 void createUrl(string const &);
164 /// show the version control log
165 void showVCLogFile();