]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
48e825da70a77a9f3e56193045f00e1cdac7fda5
[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 "support/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 InsetCitation;
36 class InsetInclude;
37 class InsetIndex;
38 class InsetInfo;
39 class InsetTabular;
40 class InsetUrl;
41
42 using std::vector;
43
44 #ifdef SIGC_CXX_NAMESPACES
45 using SigC::Signal0;
46 using SigC::Signal1;
47 #endif
48
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.
52  */
53 class Dialogs : public noncopyable
54 {
55 public:
56         /**@name Constructors and Deconstructors */
57         //@{
58         ///
59         Dialogs(LyXView *);
60         ///
61         ~Dialogs();
62         //@}
63         
64         /**@name Global Hide and Update Signals */
65         //@{
66         /// Hide all visible popups
67         Signal0<void> hideAll;
68         
69         /// Hide any popups that require a buffer for them to operate
70         Signal0<void> hideBufferDependent;
71         
72         /// Update visible, buffer-dependent popups
73         Signal0<void> updateBufferDependent;
74         //@}
75
76         /**@name Dialog Access Signals */
77         //@{
78         /// Opens the Preamble Dialog.
79         Signal0<void> showPreamble;
80         ///
81         Signal0<void> showLogFile;
82         ///
83         Signal1<void, InsetTabular *> showTabular;
84         ///
85         Signal1<void, InsetTabular *> updateTabular;
86         ///
87         Signal1<void, InsetTabular *> hideTabular;
88         ///
89         Signal0<void> showTabularCreate;
90         ///
91         Signal0<void> showCharacter;
92         ///
93         Signal0<void> updateCharacter;  // allow update as cursor moves
94         ///
95         Signal0<void> showParagraph;
96         ///
97         Signal0<void> showDocument;
98         /// Do we really have to push this?
99         Signal1<void, vector<string> const &> SetDocumentClassChoice;
100         ///
101         Signal0<void> showPrint;
102         ///
103         Signal0<void> showCopyright;
104         ///
105         Signal0<void> showCredits;
106         ///
107         Signal0<void> showPreferences;
108         ///
109         Signal1<void, InsetGraphics *> showGraphics;
110         ///
111         Signal1<void, InsetInclude *> showInclude;
112         ///
113         Signal1<void, InsetIndex *> showIndex;
114         ///
115         Signal1<void, InsetBibKey *> showBibkey;
116         ///
117         Signal1<void, InsetCitation *> showCitation;
118         ///
119         Signal1<void, string const &> createCitation;
120         ///
121         Signal1<void, InsetUrl *> showUrl;
122         ///
123         Signal1<void, string const &> createUrl;
124         ///
125         Signal1<void, InsetBibtex *> showBibtex;
126         ///
127         Signal1<void, InsetInfo *> showInfo;
128         //@}
129 private:
130         ///
131         vector<DialogBase *> dialogs_;
132 };
133
134 #endif
135
136
137
138
139
140
141
142