]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlViewSource.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.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         /// The title displayed by the dialog reflects source type. 
40         std::string const title() const;
41
42         /** get the source code of selected paragraphs, or the whole document
43                 \param fullSource get full source code
44          */
45         std::string const updateContent(bool fullSource);
46 };
47
48 } // namespace frontend
49 } // namespace lyx
50
51 #endif // CONTROLVIEWSOURCE_H