]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
Edwin's updateParagraph patch.
[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-2001 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 "LString.h"
22
23 #include <boost/utility.hpp>
24 #include <boost/shared_ptr.hpp>
25 #include <boost/signals/signal0.hpp>
26 #include <boost/signals/signal1.hpp>
27 #include <vector>
28
29 #ifdef __GNUG__
30 #pragma interface
31 #endif
32
33 #include "DialogBase.h"
34
35 // Maybe this should be a UIFunc modelled on LyXFunc
36 class LyXView;
37
38 class InsetGraphics;
39 class InsetBibKey;
40 class InsetBibtex;
41 class InsetError;
42 class InsetExternal;
43 class InsetInclude;
44 class InsetInfo;
45 class InsetTabular;
46 class InsetCommand;
47 class InsetMinipage;
48 class InsetFloat;
49 class InsetERT;
50 class Paragraph;
51
52 /** Container of all dialogs and signals a LyXView needs or uses to access them
53     The list of dialog signals isn't comprehensive but should be a good guide
54     for any future additions.  Remember don't go overboard -- think minimal.
55  */
56 class Dialogs : boost::noncopyable
57 {
58 public:
59         ///
60         typedef boost::shared_ptr<DialogBase> db_ptr;
61         /**@name Constructor */
62         //@{
63         ///
64         Dialogs(LyXView *);
65         //@}
66
67         /** Redraw all visible dialogs because, for example, the GUI colours
68             have been re-mapped. */
69         boost::signal0<void> redrawGUI;
70
71         /// Toggle tooltips on/off in all dialogs.
72         boost::signal0<void> toggleTooltips;
73
74         /// Are the tooltips on or off?
75         static bool tooltipsEnabled();
76
77         /**@name Global Hide and Update Signals */
78         //@{
79         /// Hide all visible dialogs
80         boost::signal0<void> hideAll;
81
82         /// Hide any dialogs that require a buffer for them to operate
83         boost::signal0<void> hideBufferDependent;
84
85         /** Update visible, buffer-dependent dialogs
86             If the bool is true then a buffer change has occurred
87             else its still the same buffer.
88          */
89         boost::signal1<void, bool> updateBufferDependent;
90         //@}
91
92         /**@name Dialog Access Signals.
93            Put into some sort of alphabetical order */
94         //@{
95         ///
96         void showAboutlyx();
97         /// show the key and label of a bibliography entry
98         void showBibitem(InsetCommand * ic);
99         /// show the bibtex dialog
100         void showBibtex(InsetCommand * ic);
101         ///
102         void showCharacter();
103         /// connected to the character dialog also
104         void setUserFreeFont();
105         ///
106         void showCitation(InsetCommand *);
107         ///
108         void createCitation(string const &);
109         ///
110         void showDocument();
111         ///
112         void showError(InsetError *);
113         /// show the external inset dialog
114         void showExternal(InsetExternal *);
115         /// show the contents of a file.
116         void showFile(string const &);
117         /// show all forked child processes
118         void showForks();
119         ///
120         void showGraphics(InsetGraphics *);
121         /// show the details of a LyX file include inset
122         void showInclude(InsetInclude *);
123         ///
124         void showIndex(InsetCommand *);
125         ///
126         void createIndex();
127         ///
128         void showInfo(InsetInfo *);
129         /// show the LaTeX log or build file
130         void showLogFile();
131         /// display the top-level maths panel
132         void showMathPanel();
133         ///
134         void showMinipage(InsetMinipage *);
135         ///
136         void updateMinipage(InsetMinipage *);
137         ///
138         void showERT(InsetERT *);
139         ///
140         void updateERT(InsetERT *);
141         ///
142         void showFloat(InsetFloat *);
143         ///
144         void showParagraph();
145         ///
146         boost::signal0<void>  updateParagraph;
147         ///
148         void showPreamble();
149         ///
150         void showPreferences();
151         ///
152         void showPrint();
153         ///
154         void showRef(InsetCommand *);
155         ///
156         void createRef(string const &);
157         ///
158         void showSearch();
159         ///
160         void showSendto();
161         /// bring up the spellchecker
162         void showSpellchecker();
163         ///
164         void showTabular(InsetTabular *);
165         ///
166         void updateTabular(InsetTabular *);
167         ///
168         void showTabularCreate();
169         /// show the TexInfo
170         void showTexinfo();
171         /// show the thesaurus dialog
172         void showThesaurus(string const &);
173         ///
174         void showTOC(InsetCommand *);
175         ///
176         void createTOC(string const &);
177         ///
178         void showUrl(InsetCommand *);
179         ///
180         void createUrl(string const &);
181         /// show the version control log
182         void showVCLogFile();
183         //@}
184 private:
185         /// Add a dialog to the vector of dialogs.
186         //void add(DialogBase *);
187         /// the dialogs being managed
188         //std::vector<db_ptr> dialogs_;
189 };
190
191 #endif