]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
The dialogs/guiapi re-working.
[lyx.git] / src / frontends / Dialogs.h
1 // -*- C++ -*-
2 /**
3  * \file Dialogs.h
4  * Copyright 1995-2002 The LyX Team.
5  * See the file COPYING.
6  * \author Allan Rae, rae@lyx.org
7  */
8
9 #ifndef DIALOGS_H
10 #define DIALOGS_H
11
12 #ifdef __GNUG__
13 #pragma interface
14 #endif
15
16 #include "LString.h"
17
18 #include <boost/utility.hpp>
19 #include <boost/scoped_ptr.hpp>
20 #include <boost/signals/signal0.hpp>
21 #include <boost/signals/signal1.hpp>
22
23 class LyXView;
24 class InsetBibKey;
25 class InsetBibtex;
26 class InsetCommand;
27 class InsetError;
28 class InsetERT;
29 class InsetExternal;
30 class InsetFloat;
31 class InsetGraphics;
32 class InsetInclude;
33 class InsetInfo;
34 class InsetMinipage;
35 class Paragraph;
36 class InsetTabular;
37
38 /** Container of all dialogs and signals a LyXView needs or uses to access them
39     The list of dialog signals isn't comprehensive but should be a good guide
40     for any future additions.  Remember don't go overboard -- think minimal.
41  */
42 class Dialogs : boost::noncopyable
43 {
44 public:
45         ///
46         Dialogs(LyXView &);
47         /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
48         ~Dialogs();
49
50         /** Redraw all visible dialogs because, for example, the GUI colours
51          *  have been re-mapped.
52          *
53          *  Note that static boost signals break some compilers, so we return a
54          *  reference to some hidden magic ;-)
55          */
56         static boost::signal0<void> & redrawGUI();
57
58         /// Toggle tooltips on/off in all dialogs.
59         static void toggleTooltips();
60
61         /// Are the tooltips on or off?
62         static bool tooltipsEnabled();
63
64         /**@name Global Hide and Update Signals */
65         //@{
66         /// Hide all visible dialogs
67         boost::signal0<void> hideAll;
68
69         /// Hide any dialogs that require a buffer for them to operate
70         boost::signal0<void> hideBufferDependent;
71
72         /** Update visible, buffer-dependent dialogs
73             If the bool is true then a buffer change has occurred
74             else its still the same buffer.
75          */
76         boost::signal1<void, bool> updateBufferDependent;
77         //@}
78
79         /**@name Dialog Access Signals.
80            Put into some sort of alphabetical order */
81         //@{
82         ///
83         void showAboutlyx();
84         /// show the key and label of a bibliography entry
85         void showBibitem(InsetCommand * ic);
86         /// show the bibtex dialog
87         void showBibtex(InsetCommand * ic);
88         ///
89         void showCharacter();
90         /// connected to the character dialog also
91         void setUserFreeFont();
92         ///
93         void showCitation(InsetCommand *);
94         ///
95         void createCitation(string const &);
96         ///
97         void showDocument();
98         ///
99         void showError(InsetError *);
100         ///
101         void showERT(InsetERT *);
102         ///
103         void updateERT(InsetERT *);
104         /// show the external inset dialog
105         void showExternal(InsetExternal *);
106         /// show the contents of a file.
107         void showFile(string const &);
108         ///
109         void showFloat(InsetFloat *);
110         /// show all forked child processes
111         void showForks();
112         ///
113         void showGraphics(InsetGraphics *);
114         /// show the details of a LyX file include inset
115         void showInclude(InsetInclude *);
116         ///
117         void showIndex(InsetCommand *);
118         ///
119         void createIndex();
120         /// show the LaTeX log or build file
121         void showLogFile();
122         /// display the top-level maths panel
123         void showMathPanel();
124         ///
125         void showMinipage(InsetMinipage *);
126         ///
127         void updateMinipage(InsetMinipage *);
128         ///
129         void showParagraph();
130         ///
131         void updateParagraph();
132         ///
133         void showPreamble();
134         ///
135         void showPreferences();
136         ///
137         void showPrint();
138         ///
139         void showRef(InsetCommand *);
140         ///
141         void createRef(string const &);
142         ///
143         void showSearch();
144         ///
145         void showSendto();
146         /// bring up the spellchecker
147         void showSpellchecker();
148         ///
149         void showTabular(InsetTabular *);
150         ///
151         void updateTabular(InsetTabular *);
152         ///
153         void showTabularCreate();
154         /// show the TexInfo
155         void showTexinfo();
156         /// show the thesaurus dialog
157         void showThesaurus(string const &);
158         ///
159         void showTOC(InsetCommand *);
160         ///
161         void createTOC(string const &);
162         ///
163         void showUrl(InsetCommand *);
164         ///
165         void createUrl(string const &);
166         /// show the version control log
167         void showVCLogFile();
168         //@}
169
170 private:
171         /// Use the Pimpl idiom to hide the internals.
172         class Impl;
173         /// The pointer never changes although *pimpl_'s contents may.
174         boost::scoped_ptr<Impl> const pimpl_;
175 };
176
177 #endif