3 * \file ControlViewSource.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
14 #ifndef CONTROLVIEWSOURCE_H
15 #define CONTROLVIEWSOURCE_H
23 * A controller for a read-only text browser.
25 class ControlViewSource : public Dialog::Controller {
28 ControlViewSource(Dialog &);
29 /** \param source source code to be displayed
31 virtual bool initialiseParams(std::string const & source);
33 virtual void clearParams();
35 virtual void dispatchParams() {}
37 virtual bool isBufferDependent() const { return true; }
39 bool canApply() const { return true; }
41 virtual bool canApplyToReadOnly() const { return true; }
43 /// The title displayed by the dialog reflects source type.
44 docstring const title() const;
46 /** get the source code of selected paragraphs, or the whole document
47 \param fullSource get full source code
49 docstring const updateContent(bool fullSource);
52 } // namespace frontend
55 #endif // CONTROLVIEWSOURCE_H