]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlLog.h
fix crash due to invalidated iterator
[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 namespace lyx {
19 namespace frontend {
20
21 /**
22  * A controller for a read-only text browser.
23  */
24 class ControlLog : public Dialog::Controller {
25 public:
26         ///
27         ControlLog(Dialog &);
28         /** \param data should contain "<logtype> <logfile>"
29          *  where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
30          */
31         virtual bool initialiseParams(std::string const & data);
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 the \c LOGTYPE
40         std::string const title() const;
41         /// put the log file into the ostream
42         void getContents(std::ostream & ss) const;
43
44 private:
45         /// Recognized log file-types
46         enum LOGTYPE {
47                 LatexLog,
48                 LiterateLog,
49                 Lyx2lyxLog,
50                 VCLog
51         };
52
53         LOGTYPE type_;
54         std::string logfile_;
55 };
56
57 } // namespace frontend
58 } // namespace lyx
59
60 #endif // CONTROLLOG_H