]> git.lyx.org Git - features.git/blob - src/frontends/controllers/ControlViewSource.h
Whitespace cleanup
[features.git] / src / frontends / controllers / ControlViewSource.h
1 // -*- C++ -*-
2 /**
3  * \file ControlViewSource.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Angus Leeming
9  * \Bo Peng
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef CONTROLVIEWSOURCE_H
15 #define CONTROLVIEWSOURCE_H
16
17 #include "Dialog.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 /**
23  * A controller for a read-only text browser.
24  */
25 class ControlViewSource : public Dialog::Controller {
26 public:
27         ///
28         ControlViewSource(Dialog &);
29         /** \param source source code to be displayed
30          */
31         virtual bool initialiseParams(std::string const & source);
32         ///
33         virtual void clearParams();
34         ///
35         virtual void dispatchParams() {}
36         ///
37         virtual bool isBufferDependent() const { return true; }
38         ///
39         bool canApply() const { return true; }
40
41         /// The title displayed by the dialog reflects source type.
42         docstring const title() const;
43
44         /** get the source code of selected paragraphs, or the whole document
45                 \param fullSource get full source code
46          */
47         docstring const updateContent(bool fullSource);
48 };
49
50 } // namespace frontend
51 } // namespace lyx
52
53 #endif // CONTROLVIEWSOURCE_H