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 * ======================================================
22 #include <sigc++/signal_system.h>
25 #include <boost/utility.hpp>
26 #include <boost/smart_ptr.hpp>
32 #include "DialogBase.h"
34 // Maybe this should be a UIFunc modelled on LyXFunc
51 /** Container of all dialogs and signals a LyXView needs or uses to access them
52 The list of dialog signals isn't comprehensive but should be a good guide
53 for any future additions. Remember don't go overboard -- think minimal.
55 class Dialogs : boost::noncopyable
59 typedef boost::shared_ptr<DialogBase> db_ptr;
60 /**@name Constructor */
66 /** Redraw all visible dialogs because, for example, the GUI colours
67 have been re-mapped. */
68 static SigC::Signal0<void> redrawGUI;
70 /**@name Global Hide and Update Signals */
72 /// Hide all visible dialogs
73 SigC::Signal0<void> hideAll;
75 /// Hide any dialogs that require a buffer for them to operate
76 SigC::Signal0<void> hideBufferDependent;
78 /** Update visible, buffer-dependent dialogs
79 If the bool is true then a buffer change has occurred
80 else its still the same buffer.
82 SigC::Signal1<void, bool> updateBufferDependent;
85 /**@name Dialog Access Signals.
86 Put into some sort of alphabetical order */
88 /// Do we really have to push this?
89 SigC::Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
91 SigC::Signal0<void> showAboutlyx;
92 /// show the key and label of a bibliography entry
93 SigC::Signal1<void, InsetCommand *> showBibitem;
94 /// show the bibtex dialog
95 SigC::Signal1<void, InsetCommand *> showBibtex;
97 SigC::Signal0<void> showCharacter;
98 /// connected to the character dialog also
99 SigC::Signal0<void> setUserFreeFont;
101 SigC::Signal1<void, InsetCommand *> showCitation;
103 SigC::Signal1<void, string const &> createCitation;
105 SigC::Signal0<void> showDocument;
107 SigC::Signal1<void, InsetError *> showError;
108 /// show the external inset dialog
109 SigC::Signal1<void, InsetExternal *> showExternal;
110 /// show the contents of a file.
111 SigC::Signal1<void, string const &> showFile;
113 SigC::Signal1<void, InsetGraphics *> showGraphics;
114 /// show the details of a LyX file include inset
115 SigC::Signal1<void, InsetInclude *> showInclude;
117 SigC::Signal1<void, InsetCommand *> showIndex;
119 SigC::Signal1<void, string const &> createIndex;
121 SigC::Signal1<void, InsetInfo *> showInfo;
122 /// show the LaTeX log or build file
123 SigC::Signal0<void> showLogFile;
124 /// display the top-level maths panel
125 SigC::Signal0<void> showMathPanel;
127 SigC::Signal1<void, InsetMinipage *> showMinipage;
129 SigC::Signal1<void, InsetMinipage *> updateMinipage;
131 SigC::Signal1<void, InsetERT *> showERT;
133 SigC::Signal1<void, InsetERT *> updateERT;
135 SigC::Signal1<void, InsetFloat *> showFloat;
137 SigC::Signal0<void> showParagraph;
139 SigC::Signal0<void> updateParagraph;
141 SigC::Signal0<void> showPreamble;
143 SigC::Signal0<void> showPreferences;
145 SigC::Signal0<void> showPrint;
147 SigC::Signal1<void, InsetCommand *> showRef;
149 SigC::Signal1<void, string const &> createRef;
151 SigC::Signal0<void> showSearch;
152 /// bring up the spellchecker
153 SigC::Signal0<void> showSpellchecker;
154 /// bring up the spellchecker tab in preferences
155 SigC::Signal0<void> showSpellcheckerPreferences;
157 SigC::Signal1<void, InsetTabular *> showTabular;
159 SigC::Signal1<void, InsetTabular *> updateTabular;
161 SigC::Signal0<void> showTabularCreate;
163 SigC::Signal0<void> showTexinfo;
164 /// show the thesaurus dialog
165 SigC::Signal1<void, string const &> showThesaurus;
167 SigC::Signal1<void, InsetCommand *> showTOC;
169 SigC::Signal1<void, string const &> createTOC;
171 SigC::Signal1<void, InsetCommand *> showUrl;
173 SigC::Signal1<void, string const &> createUrl;
174 /// show the version control log
175 SigC::Signal0<void> showVCLogFile;
178 /// Add a dialog to the vector of dialogs.
179 void add(DialogBase *);
180 /// the dialogs being managed
181 std::vector<db_ptr> dialogs_;