3 * Container of all dialogs and signals a LyXView needs or uses to access them.
4 * Author: Allan Rae <rae@lyx.org>
6 * ======================================================
8 * LyX, The Document Processor
10 * Copyright 1995 Matthias Ettrich
11 * Copyright 1995-2001 The LyX Team.
13 * This file Copyright 2000
15 * ======================================================
23 #include <boost/utility.hpp>
24 #include <boost/shared_ptr.hpp>
25 #include <boost/signals/signal0.hpp>
26 #include <boost/signals/signal1.hpp>
33 #include "DialogBase.h"
35 // Maybe this should be a UIFunc modelled on LyXFunc
52 /** Container of all dialogs and signals a LyXView needs or uses to access them
53 The list of dialog signals isn't comprehensive but should be a good guide
54 for any future additions. Remember don't go overboard -- think minimal.
56 class Dialogs : boost::noncopyable
60 typedef boost::shared_ptr<DialogBase> db_ptr;
61 /**@name Constructor */
67 /** Redraw all visible dialogs because, for example, the GUI colours
68 have been re-mapped. */
69 boost::signal0<void> redrawGUI;
71 /// Toggle tooltips on/off in all dialogs.
72 boost::signal0<void> toggleTooltips;
74 /// Are the tooltips on or off?
75 static bool tooltipsEnabled();
77 /**@name Global Hide and Update Signals */
79 /// Hide all visible dialogs
80 boost::signal0<void> hideAll;
82 /// Hide any dialogs that require a buffer for them to operate
83 boost::signal0<void> hideBufferDependent;
85 /** Update visible, buffer-dependent dialogs
86 If the bool is true then a buffer change has occurred
87 else its still the same buffer.
89 boost::signal1<void, bool> updateBufferDependent;
92 /**@name Dialog Access Signals.
93 Put into some sort of alphabetical order */
97 /// show the key and label of a bibliography entry
98 void showBibitem(InsetCommand * ic);
99 /// show the bibtex dialog
100 void showBibtex(InsetCommand * ic);
102 void showCharacter();
103 /// connected to the character dialog also
104 void setUserFreeFont();
106 void showCitation(InsetCommand *);
108 void createCitation(string const &);
112 void showError(InsetError *);
113 /// show the external inset dialog
114 void showExternal(InsetExternal *);
115 /// show the contents of a file.
116 void showFile(string const &);
117 /// show all forked child processes
120 void showGraphics(InsetGraphics *);
121 /// show the details of a LyX file include inset
122 void showInclude(InsetInclude *);
124 void showIndex(InsetCommand *);
128 void showInfo(InsetInfo *);
129 /// show the LaTeX log or build file
131 /// display the top-level maths panel
132 void showMathPanel();
134 void showMinipage(InsetMinipage *);
136 void updateMinipage(InsetMinipage *);
138 void showERT(InsetERT *);
140 void updateERT(InsetERT *);
142 void showFloat(InsetFloat *);
144 void showParagraph();
146 void updateParagraph();
150 void showPreferences();
154 void showRef(InsetCommand *);
156 void createRef(string const &);
161 /// bring up the spellchecker
162 void showSpellchecker();
163 /// bring up the spellchecker tab in preferences
164 void showSpellcheckerPreferences();
166 void showTabular(InsetTabular *);
168 void updateTabular(InsetTabular *);
170 void showTabularCreate();
173 /// show the thesaurus dialog
174 void showThesaurus(string const &);
176 void showTOC(InsetCommand *);
178 void createTOC(string const &);
180 void showUrl(InsetCommand *);
182 void createUrl(string const &);
183 /// show the version control log
184 void showVCLogFile();
187 /// Add a dialog to the vector of dialogs.
188 //void add(DialogBase *);
189 /// the dialogs being managed
190 //std::vector<db_ptr> dialogs_;