]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlLog.h
Rationalize the interface to the log dialog.
[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 /**
19  * A controller for a read-only text browser.
20  */
21 class ControlLog : public Dialog::Controller {
22 public:
23         ///
24         ControlLog(Dialog &);
25         /** \param data should contain "<logtype> <logfile>"
26          *  where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
27          */
28         virtual bool initialiseParams(std::string const & data);
29         ///
30         virtual void clearParams();
31         ///
32         virtual void dispatchParams() {}
33         ///
34         virtual bool isBufferDependent() const { return true; }
35
36         /// The title displayed by the dialog reflects the \c LOGTYPE
37         std::string const title() const;
38         /// put the log file into the ostream
39         void getContents(std::ostream & ss) const;
40
41 private:
42         /// Recognized log file-types
43         enum LOGTYPE {
44                 LatexLog,
45                 LiterateLog,
46                 Lyx2lyxLog,
47                 VCLog
48         };
49
50         LOGTYPE type_;
51         std::string logfile_;
52 };
53
54 #endif // CONTROLLOG_H