]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlLog.h
more unicode filenames
[lyx.git] / src / frontends / controllers / ControlLog.h
index 0843d1e6c5d60ddc3e1290bc8864b491ea0211c3..7c76010951bdce89da432ffac19470f3b6b589a5 100644 (file)
 #define CONTROLLOG_H
 
 #include "Dialog.h"
-#include "buffer.h" // Buffer::LogType
-#include <utility>
+
+#include "support/filename.h"
+
+namespace lyx {
+namespace frontend {
 
 /**
  * A controller for a read-only text browser.
@@ -24,7 +27,9 @@ class ControlLog : public Dialog::Controller {
 public:
        ///
        ControlLog(Dialog &);
-       ///
+       /** \param data should contain "<logtype> <logfile>"
+        *  where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
+        */
        virtual bool initialiseParams(std::string const & data);
        ///
        virtual void clearParams();
@@ -32,13 +37,26 @@ public:
        virtual void dispatchParams() {}
        ///
        virtual bool isBufferDependent() const { return true; }
-       ///
-       std::pair<Buffer::LogType, std::string> const & logfile() const {
-               return logfile_;
-       }
+
+       /// The title displayed by the dialog reflects the \c LOGTYPE
+       lyx::docstring const title() const;
+       /// put the log file into the ostream
+       void getContents(std::ostream & ss) const;
+
 private:
+       /// Recognized log file-types
+       enum LOGTYPE {
+               LatexLog,
+               LiterateLog,
+               Lyx2lyxLog,
+               VCLog
+       };
 
-       std::pair<Buffer::LogType, std::string> logfile_;
+       LOGTYPE type_;
+       support::FileName logfile_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLLOG_H