]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
Move LaTeX and VC logs to GUI-I on xforms
[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-2000 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
27 class DialogBase;
28
29 // Maybe this should be a UIFunc modelled on LyXFunc
30 class LyXView;
31
32 class InsetGraphics;
33 class InsetBibKey;
34 class InsetBibtex;
35 class InsetError;
36 class InsetInclude;
37 class InsetInfo;
38 class InsetTabular;
39 class InsetCommand;
40
41 using std::vector;
42
43 #ifdef SIGC_CXX_NAMESPACES
44 using SigC::Signal0;
45 using SigC::Signal1;
46 #endif
47
48 /** Container of all dialogs and signals a LyXView needs or uses to access them
49     The list of dialog signals isn't comprehensive but should be a good guide
50     for any future additions.  Remember don't go overboard -- think minimal.
51  */
52 class Dialogs : public noncopyable
53 {
54 public:
55         /**@name Constructors and Deconstructors */
56         //@{
57         ///
58         Dialogs(LyXView *);
59         ///
60         ~Dialogs();
61         //@}
62         
63         /** Redraw all visible popups because, for example, the GUI colours
64             have been re-mapped. */
65         static Signal0<void> redrawGUI;
66
67         /**@name Global Hide and Update Signals */
68         //@{
69         /// Hide all visible popups
70         Signal0<void> hideAll;
71         
72         /// Hide any dialogs that require a buffer for them to operate
73         Signal0<void> hideBufferDependent;
74         
75         /** Update visible, buffer-dependent dialogs
76             If the bool is true then a buffer change has occurred
77             else its still the same buffer.
78          */
79         Signal1<void, bool> updateBufferDependent;
80         //@}
81
82         /**@name Dialog Access Signals.
83            Put into some sort of alphabetical order */
84         //@{
85         /// Do we really have to push this?
86         Signal1<void, vector<string> const &> SetDocumentClassChoice;
87         ///
88         Signal1<void, InsetBibKey *> showBibkey;
89         ///
90         Signal1<void, InsetBibtex *> showBibtex;
91         ///
92         Signal0<void> showCharacter;
93         ///
94         Signal1<void, InsetCommand *> showCitation;
95         ///
96         Signal1<void, string const &> createCitation;
97         ///
98         Signal0<void> showCopyright;
99         ///
100         Signal0<void> showCredits;
101         ///
102         Signal1<void, InsetError *> showError;
103         ///
104         Signal1<void, InsetGraphics *> showGraphics;
105         ///
106         Signal1<void, InsetInclude *> showInclude;
107         ///
108         Signal1<void, InsetCommand *> showIndex;
109         ///
110         Signal1<void, string const &> createIndex;
111         ///
112         Signal1<void, InsetInfo *> showInfo;
113         ///
114         Signal0<void> showLayoutDocument;
115         ///
116         Signal0<void> showLayoutParagraph;
117         /// show the version control log
118         Signal0<void> showVCLogFile;
119         /// show the LaTeX log or build file
120         Signal0<void> showLogFile;
121         ///
122         Signal0<void> showPreamble;
123         ///
124         Signal0<void> showPreferences;
125         ///
126         Signal0<void> showPrint;
127         ///
128         Signal1<void, InsetCommand *> showRef;
129         ///
130         Signal1<void, string const &> createRef;
131         ///
132         Signal1<void, InsetTabular *> showTabular;
133         ///
134         Signal1<void, InsetTabular *> updateTabular;
135         ///
136         Signal0<void> showTabularCreate;
137         ///
138         Signal1<void, InsetCommand *> showTOC;
139         ///
140         Signal1<void, string const &> createTOC;
141         ///
142         Signal1<void, InsetCommand *> showUrl;
143         ///
144         Signal1<void, string const &> createUrl;
145         ///
146         Signal0<void> updateCharacter;  // allow update as cursor moves
147         //@}
148 private:
149         ///
150         vector<DialogBase *> dialogs_;
151 };
152
153 #endif