]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlLog.h
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlLog.h
index 63d66e6540ad1be6fbb2aa8ef554e2e3d3d40ba4..e1bbbf8cef15b0c572f830c8778b90c9fa543e6b 100644 (file)
@@ -1,80 +1,44 @@
 // -*- C++ -*-
-/* This file is part of
- * ====================================================== 
- *
- *           LyX, The Document Processor
- *
- *           Copyright 2001 The LyX Team.
+/**
+ * \file ControlLog.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * ======================================================
+ * \author John Levon
+ * \author Angus Leeming
  *
- * \file ControlLog.h
- * \author John Levon, moz@compsoc.man.ac.uk
- * \author Angus Leeming <a.leeming@ic.ac.uk>
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef CONTROLLOG_H
 #define CONTROLLOG_H
 
-#include <utility>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlConnections.h"
+#include "Dialog.h"
 #include "buffer.h" // Buffer::LogType
+#include <utility>
 
 /**
  * A controller for a read-only text browser.
  */
-class ControlLog : public ControlConnectBD {
+class ControlLog : public Dialog::Controller {
 public:
        ///
-       ControlLog(LyXView &, Dialogs &);
+       ControlLog(Dialog &);
        ///
-       std::pair<Buffer::LogType, string> const & logfile()
-               { return logfile_; }
-
-protected:
+       virtual bool initialiseParams(string const & data);
        ///
-       virtual void apply() {}
-       /// Show the dialog.
-       virtual void show();
-       /// Update the dialog.
-       virtual void update();
-       /// Hide the dialog.
-       virtual void hide();
-
-private:
-       std::pair<Buffer::LogType, string> logfile_;
-};
-
-
-/** A class to instantiate and make available the GUI-specific
-    ButtonController and View.
- */
-template <class GUIview, class GUIbc>
-class GUILog : public ControlLog {
-public:
+       virtual void clearParams();
        ///
-       GUILog(LyXView &, Dialogs &);
+       virtual void dispatchParams() {}
        ///
-       virtual ButtonControllerBase & bc() { return bc_; }
+       virtual bool isBufferDependent() const { return true; }
        ///
-       virtual ViewBase & view() { return view_; }
-
+       std::pair<Buffer::LogType, string> const & logfile() const {
+               return logfile_;
+       }
 private:
-       ///
-       ButtonController<OkCancelPolicy, GUIbc> bc_;
-       ///
-       GUIview view_;
-};
 
-template <class GUIview, class GUIbc>
-GUILog<GUIview, GUIbc>::GUILog(LyXView & lv, Dialogs & d)
-       : ControlLog(lv, d),
-         view_(*this)
-{}
+       std::pair<Buffer::LogType, string> logfile_;
+};
 
 #endif // CONTROLLOG_H