]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
cf1891294484264d3f5e33144600c29cdecbbae9
[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 InsetInclude;
39 class InsetIndex;
40 class InsetBibKey;
41 class InsetCitation;
42 class InsetBibtex;
43 class InsetInfo;
44
45 /** Container of all dialogs and signals a LyXView needs or uses to access them
46     The list of dialog signals isn't comprehensive but should be a good guide
47     for any future additions.  Remember don't go overboard -- think minimal.
48  */
49 class Dialogs
50 {
51 public:
52         /**@name Constructors and Deconstructors */
53         //@{
54         ///
55         Dialogs(LyXView *);
56         ///
57         ~Dialogs();
58         //@}
59         
60         /**@name Global Hide and Update Signals */
61         //@{
62         /// Hide all visible popups
63         Signal0<void> hideAll;
64         
65         /// Hide any popups that require a buffer for them to operate
66         Signal0<void> hideBufferDependent;
67         
68         /// Update visible, buffer-dependent popups
69         Signal0<void> updateBufferDependent;
70         //@}
71
72         /**@name Dialog Access Signals */
73         //@{
74         /// Opens the Preamble Dialog.
75         Signal0<void> showPreamble;
76         ///
77         Signal0<void> showLogFile;
78         ///
79         Signal0<void> showTable;
80         ///
81         Signal0<void> updateTable; // needed for InsetTabular-Update
82         ///
83         Signal0<void> showTableNew;
84         ///
85         Signal0<void> showCharacter;
86         ///
87         Signal0<void> updateCharacter;  // allow update as cursor moves
88         ///
89         Signal0<void> showParagraph;
90         ///
91         Signal0<void> showDocument;
92         /// Do we really have to push this?
93         Signal1<void, vector<string> const &> SetDocumentClassChoice;
94         ///
95         Signal0<void> showPrint;
96         ///
97         Signal0<void> showCopyright;
98         ///
99         Signal0<void> showCredits;
100         ///
101         Signal0<void> showPreferences;
102         ///
103         Signal1<void, InsetInclude *> showInclude;
104         ///
105         Signal1<void, InsetIndex *> showIndex;
106         ///
107         Signal1<void, InsetBibKey *> showBibkey;
108         ///
109         Signal1<void, InsetCitation *> showCitation;
110         ///
111         Signal1<void, InsetBibtex *> showBibtex;
112         ///
113         Signal1<void, InsetInfo *> showInfo;
114         //@}
115 private:
116         /// Disallow default constructor
117         Dialogs() {}
118         /// Disallow copy constructor
119         Dialogs(Dialogs &) {}
120         ///
121         vector<DialogBase *> dialogs_;
122 };
123
124 #endif
125
126
127
128
129
130
131
132