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
42 #ifdef SIGC_CXX_NAMESPACES
47 /** Container of all dialogs and signals a LyXView needs or uses to access them
48 The list of dialog signals isn't comprehensive but should be a good guide
49 for any future additions. Remember don't go overboard -- think minimal.
51 class Dialogs : public noncopyable
54 /**@name Constructors and Deconstructors */
62 /** Redraw all visible popups because, for example, the GUI colours
63 have been re-mapped. */
64 static Signal0<void> redrawGUI;
66 /**@name Global Hide and Update Signals */
68 /// Hide all visible popups
69 Signal0<void> hideAll;
71 /// Hide any dialogs that require a buffer for them to operate
72 Signal0<void> hideBufferDependent;
74 /** Update visible, buffer-dependent dialogs
75 If the bool is true then a buffer change has occurred
76 else its still the same buffer.
78 Signal1<void, bool> updateBufferDependent;
81 /**@name Dialog Access Signals.
82 Put into some sort of alphabetical order */
84 /// Do we really have to push this?
85 Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
86 /// show the key and label of a bibliography entry
87 Signal1<void, InsetCommand *> showBibitem;
88 /// show the bibtex dialog
89 Signal1<void, InsetCommand *> showBibtex;
91 Signal0<void> showCharacter;
93 Signal1<void, InsetCommand *> showCitation;
95 Signal1<void, string const &> createCitation;
97 Signal0<void> showCopyright;
99 Signal0<void> showCredits;
101 Signal1<void, InsetError *> showError;
102 /// show the external inset dialog
103 Signal1<void, InsetExternal *> showExternal;
105 Signal1<void, InsetGraphics *> showGraphics;
106 /// show the details of a LyX file include inset
107 Signal1<void, InsetCommand *> showInclude;
108 /// create a LyX file include inset
109 Signal1<void, string const &> createInclude;
111 Signal1<void, InsetCommand *> showIndex;
113 Signal1<void, string const &> createIndex;
115 Signal1<void, InsetInfo *> showInfo;
117 Signal0<void> showLayoutDocument;
119 Signal0<void> showLayoutParagraph;
121 Signal0<void> showLayoutCharacter;
123 Signal0<void> setUserFreeFont;
124 /// show the version control log
125 Signal0<void> showVCLogFile;
126 /// show the LaTeX log or build file
127 Signal0<void> showLogFile;
129 Signal0<void> showPreamble;
131 Signal0<void> showPreferences;
133 Signal0<void> showPrint;
135 Signal1<void, InsetCommand *> showRef;
137 Signal1<void, string const &> createRef;
139 Signal0<void> showSearch;
140 /// pop up the splash
141 Signal0<void> showSplash;
142 /// hide the splash immediately
143 Signal0<void> hideSplash;
145 Signal1<void, InsetTabular *> showTabular;
147 Signal1<void, InsetTabular *> updateTabular;
149 Signal0<void> showTabularCreate;
151 Signal1<void, InsetCommand *> showTOC;
153 Signal1<void, string const &> createTOC;
155 Signal1<void, InsetCommand *> showUrl;
157 Signal1<void, string const &> createUrl;
159 Signal0<void> updateCharacter; // allow update as cursor moves
163 std::vector<DialogBase *> dialogs_;