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-2000 The LyX Team.
13 * This file Copyright 2000
15 * ======================================================
22 #include <sigc++/signal_system.h>
25 #include <boost/utility.hpp>
29 // Maybe this should be a UIFunc modelled on LyXFunc
44 #ifdef SIGC_CXX_NAMESPACES
49 /** Container of all dialogs and signals a LyXView needs or uses to access them
50 The list of dialog signals isn't comprehensive but should be a good guide
51 for any future additions. Remember don't go overboard -- think minimal.
53 class Dialogs : public noncopyable
56 /**@name Constructors and Deconstructors */
64 /** Redraw all visible popups because, for example, the GUI colours
65 have been re-mapped. */
66 static Signal0<void> redrawGUI;
68 /**@name Global Hide and Update Signals */
70 /// Hide all visible popups
71 Signal0<void> hideAll;
73 /// Hide any dialogs that require a buffer for them to operate
74 Signal0<void> hideBufferDependent;
76 /** Update visible, buffer-dependent dialogs
77 If the bool is true then a buffer change has occurred
78 else its still the same buffer.
80 Signal1<void, bool> updateBufferDependent;
83 /**@name Dialog Access Signals.
84 Put into some sort of alphabetical order */
86 /// Do we really have to push this?
87 Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
88 /// show the key and label of a bibliography entry
89 Signal1<void, InsetCommand *> showBibitem;
90 /// show the bibtex dialog
91 Signal1<void, InsetCommand *> showBibtex;
93 Signal0<void> showCharacter;
95 Signal1<void, InsetCommand *> showCitation;
97 Signal1<void, string const &> createCitation;
99 Signal0<void> showCopyright;
101 Signal0<void> showCredits;
103 Signal1<void, InsetError *> showError;
104 /// show the external inset dialog
105 Signal1<void, InsetExternal *> showExternal;
107 Signal1<void, InsetGraphics *> showGraphics;
108 /// show the details of a LyX file include inset
109 Signal1<void, InsetCommand *> showInclude;
110 /// create a LyX file include inset
111 Signal1<void, string const &> createInclude;
113 Signal1<void, InsetCommand *> showIndex;
115 Signal1<void, string const &> createIndex;
117 Signal1<void, InsetInfo *> showInfo;
119 Signal0<void> showLayoutDocument;
121 Signal0<void> showLayoutParagraph;
123 Signal0<void> showLayoutCharacter;
125 Signal0<void> setUserFreeFont;
126 /// show the version control log
127 Signal0<void> showVCLogFile;
128 /// show the LaTeX log or build file
129 Signal0<void> showLogFile;
131 Signal0<void> showPreamble;
133 Signal0<void> showPreferences;
135 Signal0<void> showPrint;
137 Signal1<void, InsetCommand *> showRef;
139 Signal1<void, string const &> createRef;
141 Signal0<void> showSearch;
142 /// pop up the splash
143 Signal0<void> showSplash;
144 /// destroy the splash dialog
145 void destroySplash();
147 Signal1<void, InsetTabular *> showTabular;
149 Signal1<void, InsetTabular *> updateTabular;
151 Signal0<void> showTabularCreate;
153 Signal1<void, InsetCommand *> showTOC;
155 Signal1<void, string const &> createTOC;
157 Signal1<void, InsetCommand *> showUrl;
159 Signal1<void, string const &> createUrl;
161 Signal0<void> updateCharacter; // allow update as cursor moves
164 /// the dialogs being managed
165 std::vector<DialogBase *> dialogs_;
166 /// the splash dialog
167 FormSplash * splash_;