]> git.lyx.org Git - lyx.git/blob - src/frontends/Dialogs.h
* Split insetbib.[Ch] into insetbibitem.[Ch] and insetbibtex.[Ch].
[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 InsetCommand;
24 class InsetError;
25 class InsetERT;
26 class InsetExternal;
27 class InsetFloat;
28 class InsetWrap;
29 class InsetGraphics;
30 class InsetInclude;
31 class InsetInfo;
32 class InsetMinipage;
33 class Paragraph;
34 class InsetTabular;
35
36 /** Container of all dialogs and signals a LyXView needs or uses to access them
37     The list of dialog signals isn't comprehensive but should be a good guide
38     for any future additions.  Remember don't go overboard -- think minimal.
39  */
40 class Dialogs : boost::noncopyable
41 {
42 public:
43         ///
44         Dialogs(LyXView &);
45         /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
46         ~Dialogs();
47
48         /** Redraw all visible dialogs because, for example, the GUI colours
49          *  have been re-mapped.
50          *
51          *  Note that static boost signals break some compilers, so we return a
52          *  reference to some hidden magic ;-)
53          */
54         static boost::signal0<void> & redrawGUI();
55
56         /// Toggle tooltips on/off in all dialogs.
57         static void toggleTooltips();
58
59         /// Are the tooltips on or off?
60         static bool tooltipsEnabled();
61
62         /**@name Global Hide and Update Signals */
63         //@{
64         /// Hide all visible dialogs
65         boost::signal0<void> hideAll;
66
67         /// Hide any dialogs that require a buffer for them to operate
68         boost::signal0<void> hideBufferDependent;
69
70         /** Update visible, buffer-dependent dialogs
71             If the bool is true then a buffer change has occurred
72             else its still the same buffer.
73          */
74         boost::signal1<void, bool> updateBufferDependent;
75         //@}
76
77         /**@name Dialog Access Signals.
78            Put into some sort of alphabetical order */
79         //@{
80         ///
81         void showAboutlyx();
82         /// show the key and label of a bibliography entry
83         void showBibitem(InsetCommand * ic);
84         /// show the bibtex dialog
85         void showBibtex(InsetCommand * ic);
86         ///
87         void showCharacter();
88         /// connected to the character dialog also
89         void setUserFreeFont();
90         ///
91         void showCitation(InsetCommand *);
92         ///
93         void createCitation(string const &);
94         ///
95         void showDocument();
96         ///
97         void showError(InsetError *);
98         ///
99         void showERT(InsetERT *);
100         ///
101         void updateERT(InsetERT *);
102         /// show the external inset dialog
103         void showExternal(InsetExternal *);
104         /// show the contents of a file.
105         void showFile(string const &);
106         ///
107         void showFloat(InsetFloat *);
108         ///
109         void showWrap(InsetWrap *);
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         /// show the merge changes dialog
125         void showMergeChanges();
126         ///
127         void showMinipage(InsetMinipage *);
128         ///
129         void updateMinipage(InsetMinipage *);
130         ///
131         void showParagraph();
132         ///
133         void updateParagraph();
134         ///
135         void showPreamble();
136         ///
137         void showPreferences();
138         ///
139         void showPrint();
140         ///
141         void showRef(InsetCommand *);
142         ///
143         void createRef(string const &);
144         ///
145         void showSearch();
146         ///
147         void showSendto();
148         /// bring up the spellchecker
149         void showSpellchecker();
150         ///
151         void showTabular(InsetTabular *);
152         ///
153         void updateTabular(InsetTabular *);
154         ///
155         void showTabularCreate();
156         /// show the TexInfo
157         void showTexinfo();
158         /// show the thesaurus dialog
159         void showThesaurus(string const &);
160         ///
161         void showTOC(InsetCommand *);
162         ///
163         void createTOC(string const &);
164         ///
165         void showUrl(InsetCommand *);
166         ///
167         void createUrl(string const &);
168         /// show the version control log
169         void showVCLogFile();
170         //@}
171
172 private:
173         /// Use the Pimpl idiom to hide the internals.
174         class Impl;
175         /// The pointer never changes although *pimpl_'s contents may.
176         boost::scoped_ptr<Impl> const pimpl_;
177 };
178
179 #endif