]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlLog.h
more unicode filenames
[lyx.git] / src / frontends / controllers / ControlLog.h
1 // -*- C++ -*-
2 /**
3  * \file ControlLog.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  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef CONTROLLOG_H
14 #define CONTROLLOG_H
15
16 #include "Dialog.h"
17
18 #include "support/filename.h"
19
20 namespace lyx {
21 namespace frontend {
22
23 /**
24  * A controller for a read-only text browser.
25  */
26 class ControlLog : public Dialog::Controller {
27 public:
28         ///
29         ControlLog(Dialog &);
30         /** \param data should contain "<logtype> <logfile>"
31          *  where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
32          */
33         virtual bool initialiseParams(std::string const & data);
34         ///
35         virtual void clearParams();
36         ///
37         virtual void dispatchParams() {}
38         ///
39         virtual bool isBufferDependent() const { return true; }
40
41         /// The title displayed by the dialog reflects the \c LOGTYPE
42         lyx::docstring const title() const;
43         /// put the log file into the ostream
44         void getContents(std::ostream & ss) const;
45
46 private:
47         /// Recognized log file-types
48         enum LOGTYPE {
49                 LatexLog,
50                 LiterateLog,
51                 Lyx2lyxLog,
52                 VCLog
53         };
54
55         LOGTYPE type_;
56         support::FileName logfile_;
57 };
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // CONTROLLOG_H