]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
Angus Custom Export patch and removal of unused files from repository.
[lyx.git] / src / frontends / Dialogs.h
1 // -*- C++ -*-
2 /* Dialogs.h
3  * Container of all dialogs and signals a LyXView needs or uses to access them.
4  * Author: Allan Rae <rae@lyx.org>
5  * This file is part of
6  * ======================================================
7  *
8  *           LyX, The Document Processor
9  *
10  *           Copyright 1995 Matthias Ettrich
11  *           Copyright 1995-2001 The LyX Team.
12  *
13  *           This file Copyright 2000
14  *           Allan Rae
15  * ======================================================
16  */
17
18 #ifndef DIALOGS_H
19 #define DIALOGS_H
20
21 #include <vector>
22 #include <sigc++/signal_system.h>
23
24 #include "LString.h"
25 #include <boost/utility.hpp>
26 #include <boost/smart_ptr.hpp>
27
28 #ifdef __GNUG__
29 #pragma interface
30 #endif
31
32 #include "DialogBase.h"
33
34 // Maybe this should be a UIFunc modelled on LyXFunc
35 class LyXView;
36
37 class InsetGraphics;
38 class InsetBibKey;
39 class InsetBibtex;
40 class InsetError;
41 class InsetExternal;
42 class InsetInclude;
43 class InsetInfo;
44 class InsetTabular;
45 class InsetCommand;
46 class InsetMinipage;
47 class InsetFloat;
48 class InsetERT;
49 class Paragraph;
50
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.
54  */
55 class Dialogs : boost::noncopyable
56 {
57 public:
58         ///
59         typedef boost::shared_ptr<DialogBase> db_ptr;
60         /**@name Constructor */
61         //@{
62         ///
63         Dialogs(LyXView *);
64         //@}
65
66         /** Redraw all visible dialogs because, for example, the GUI colours
67             have been re-mapped. */
68         static SigC::Signal0<void> redrawGUI;
69
70         /**@name Global Hide and Update Signals */
71         //@{
72         /// Hide all visible dialogs
73         SigC::Signal0<void> hideAll;
74         
75         /// Hide any dialogs that require a buffer for them to operate
76         SigC::Signal0<void> hideBufferDependent;
77         
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.
81          */
82         SigC::Signal1<void, bool> updateBufferDependent;
83         //@}
84
85         /**@name Dialog Access Signals.
86            Put into some sort of alphabetical order */
87         //@{
88         /// Do we really have to push this?
89         SigC::Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
90         ///
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;
96         ///
97         SigC::Signal0<void> showCharacter;
98         /// connected to the character dialog also
99         SigC::Signal0<void> setUserFreeFont;
100         ///
101         SigC::Signal1<void, InsetCommand *> showCitation;
102         ///
103         SigC::Signal1<void, string const &> createCitation;
104         ///
105         SigC::Signal0<void> showDocument;
106         ///
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;
112         /// show all forked child processes
113         SigC::Signal0<void> showForks;
114         ///
115         SigC::Signal1<void, InsetGraphics *> showGraphics;
116         /// show the details of a LyX file include inset
117         SigC::Signal1<void, InsetInclude *> showInclude;
118         ///
119         SigC::Signal1<void, InsetCommand *> showIndex;
120         ///
121         SigC::Signal1<void, string const &> createIndex;
122         ///
123         SigC::Signal1<void, InsetInfo *> showInfo;
124         /// show the LaTeX log or build file
125         SigC::Signal0<void> showLogFile;
126         /// display the top-level maths panel
127         SigC::Signal0<void> showMathPanel;
128         ///
129         SigC::Signal1<void, InsetMinipage *> showMinipage;
130         ///
131         SigC::Signal1<void, InsetMinipage *> updateMinipage;
132         ///
133         SigC::Signal1<void, InsetERT *> showERT;
134         ///
135         SigC::Signal1<void, InsetERT *> updateERT;
136         ///
137         SigC::Signal1<void, InsetFloat *> showFloat;
138         ///
139         SigC::Signal0<void> showParagraph;
140         ///
141         SigC::Signal0<void> updateParagraph;
142         ///
143         SigC::Signal0<void> showPreamble;
144         ///
145         SigC::Signal0<void> showPreferences;
146         ///
147         SigC::Signal0<void> showPrint;
148         ///
149         SigC::Signal1<void, InsetCommand *> showRef;
150         ///
151         SigC::Signal1<void, string const &> createRef;
152         ///
153         SigC::Signal0<void> showSearch;
154         ///
155         SigC::Signal0<void> showSendto;
156         /// bring up the spellchecker
157         SigC::Signal0<void> showSpellchecker;
158         /// bring up the spellchecker tab in preferences
159         SigC::Signal0<void> showSpellcheckerPreferences;
160         ///
161         SigC::Signal1<void, InsetTabular *> showTabular;
162         ///
163         SigC::Signal1<void, InsetTabular *> updateTabular;
164         ///
165         SigC::Signal0<void> showTabularCreate;
166         /// show the TexInfo
167         SigC::Signal0<void> showTexinfo;
168         /// show the thesaurus dialog
169         SigC::Signal1<void, string const &> showThesaurus; 
170         ///
171         SigC::Signal1<void, InsetCommand *> showTOC;
172         ///
173         SigC::Signal1<void, string const &> createTOC;
174         ///
175         SigC::Signal1<void, InsetCommand *> showUrl;
176         ///
177         SigC::Signal1<void, string const &> createUrl;
178         /// show the version control log
179         SigC::Signal0<void> showVCLogFile;
180         //@}
181 private:
182         /// Add a dialog to the vector of dialogs.
183         void add(DialogBase *);
184         /// the dialogs being managed
185         std::vector<db_ptr> dialogs_;
186 };
187
188 #endif