]> git.lyx.org Git - features.git/blob - src/frontends/Dialogs.h
remove Last when NEW_INSETS is defined
[features.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 #ifdef SIGC_CXX_NAMESPACES
42 using SigC::Signal0;
43 using SigC::Signal1;
44 #endif
45
46 /** Container of all dialogs and signals a LyXView needs or uses to access them
47     The list of dialog signals isn't comprehensive but should be a good guide
48     for any future additions.  Remember don't go overboard -- think minimal.
49  */
50 class Dialogs : public noncopyable
51 {
52 public:
53         /**@name Constructors and Deconstructors */
54         //@{
55         ///
56         Dialogs(LyXView *);
57         ///
58         ~Dialogs();
59         //@}
60         
61         /** Redraw all visible popups because, for example, the GUI colours
62             have been re-mapped. */
63         static Signal0<void> redrawGUI;
64
65         /**@name Global Hide and Update Signals */
66         //@{
67         /// Hide all visible popups
68         Signal0<void> hideAll;
69         
70         /// Hide any dialogs that require a buffer for them to operate
71         Signal0<void> hideBufferDependent;
72         
73         /** Update visible, buffer-dependent dialogs
74             If the bool is true then a buffer change has occurred
75             else its still the same buffer.
76          */
77         Signal1<void, bool> updateBufferDependent;
78         //@}
79
80         /**@name Dialog Access Signals.
81            Put into some sort of alphabetical order */
82         //@{
83         /// Do we really have to push this?
84         Signal1<void, std::vector<string> const &> SetDocumentClassChoice;
85         /// show the key and label of a bibliography entry
86         Signal1<void, InsetCommand *> showBibitem;
87         /// show the bibtex dialog
88         Signal1<void, InsetCommand *> showBibtex;
89         ///
90         Signal0<void> showCharacter;
91         ///
92         Signal1<void, InsetCommand *> showCitation;
93         ///
94         Signal1<void, string const &> createCitation;
95         ///
96         Signal0<void> showCopyright;
97         ///
98         Signal0<void> showCredits;
99         ///
100         Signal1<void, InsetError *> showError;
101         ///
102         Signal1<void, InsetGraphics *> showGraphics;
103         /// show the details of a LyX file include inset
104         Signal1<void, InsetCommand *> showInclude;
105         /// create a LyX file include inset
106         Signal1<void, string const &> createInclude;
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         ///
118         Signal0<void> showLayoutCharacter;
119         ///
120         Signal0<void> setUserFreeFont;
121         /// show the version control log
122         Signal0<void> showVCLogFile;
123         /// show the LaTeX log or build file
124         Signal0<void> showLogFile;
125         ///
126         Signal0<void> showPreamble;
127         ///
128         Signal0<void> showPreferences;
129         ///
130         Signal0<void> showPrint;
131         ///
132         Signal1<void, InsetCommand *> showRef;
133         ///
134         Signal1<void, string const &> createRef;
135         ///
136         Signal0<void> showSearch;
137         /// pop up the splash
138         Signal0<void> showSplash;
139         /// hide the splash immediately
140         Signal0<void> hideSplash;
141         ///
142         Signal1<void, InsetTabular *> showTabular;
143         ///
144         Signal1<void, InsetTabular *> updateTabular;
145         ///
146         Signal0<void> showTabularCreate;
147         ///
148         Signal1<void, InsetCommand *> showTOC;
149         ///
150         Signal1<void, string const &> createTOC;
151         ///
152         Signal1<void, InsetCommand *> showUrl;
153         ///
154         Signal1<void, string const &> createUrl;
155         ///
156         Signal0<void> updateCharacter;  // allow update as cursor moves
157         //@}
158 private:
159         ///
160         std::vector<DialogBase *> dialogs_;
161 };
162
163 #endif