]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
include sys/time.h
[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
15 #include "LString.h"
16
17 #include <boost/utility.hpp>
18 #include <boost/scoped_ptr.hpp>
19 #include <boost/signals/signal0.hpp>
20 #include <boost/signals/signal1.hpp>
21
22 class LyXView;
23 class InsetBibKey;
24 class InsetBibtex;
25 class InsetCommand;
26 class InsetError;
27 class InsetERT;
28 class InsetExternal;
29 class InsetFloat;
30 class InsetWrap;
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         ///
111         void showWrap(InsetWrap *);
112         /// show all forked child processes
113         void showForks();
114         ///
115         void showGraphics(InsetGraphics *);
116         /// show the details of a LyX file include inset
117         void showInclude(InsetInclude *);
118         ///
119         void showIndex(InsetCommand *);
120         ///
121         void createIndex();
122         /// show the LaTeX log or build file
123         void showLogFile();
124         /// display the top-level maths panel
125         void showMathPanel();
126         /// show the merge changes dialog
127         void showMergeChanges();
128         ///
129         void showMinipage(InsetMinipage *);
130         ///
131         void updateMinipage(InsetMinipage *);
132         ///
133         void showParagraph();
134         ///
135         void updateParagraph();
136         ///
137         void showPreamble();
138         ///
139         void showPreferences();
140         ///
141         void showPrint();
142         ///
143         void showRef(InsetCommand *);
144         ///
145         void createRef(string const &);
146         ///
147         void showSearch();
148         ///
149         void showSendto();
150         /// bring up the spellchecker
151         void showSpellchecker();
152         ///
153         void showTabular(InsetTabular *);
154         ///
155         void updateTabular(InsetTabular *);
156         ///
157         void showTabularCreate();
158         /// show the TexInfo
159         void showTexinfo();
160         /// show the thesaurus dialog
161         void showThesaurus(string const &);
162         ///
163         void showTOC(InsetCommand *);
164         ///
165         void createTOC(string const &);
166         ///
167         void showUrl(InsetCommand *);
168         ///
169         void createUrl(string const &);
170         /// show the version control log
171         void showVCLogFile();
172         //@}
173
174 private:
175         /// Use the Pimpl idiom to hide the internals.
176         class Impl;
177         /// The pointer never changes although *pimpl_'s contents may.
178         boost::scoped_ptr<Impl> const pimpl_;
179 };
180
181 #endif