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