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