]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlLog.h
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlLog.h
index 63d66e6540ad1be6fbb2aa8ef554e2e3d3d40ba4..894671fd0427d1134821d4ac3a7e2412e17e329a 100644 (file)
 #pragma interface
 #endif
 
-#include "ControlConnections.h"
+#include "ControlDialogs.h"
 #include "buffer.h" // Buffer::LogType
 
 /**
  * A controller for a read-only text browser.
  */
-class ControlLog : public ControlConnectBD {
+class ControlLog : public ControlDialog<ControlConnectBD> {
 public:
        ///
        ControlLog(LyXView &, Dialogs &);
@@ -36,45 +36,15 @@ public:
        std::pair<Buffer::LogType, string> const & logfile()
                { return logfile_; }
 
-protected:
+private:
        ///
        virtual void apply() {}
-       /// Show the dialog.
-       virtual void show();
-       /// Update the dialog.
-       virtual void update();
-       /// Hide the dialog.
-       virtual void hide();
+       /// set the params before show or update
+       virtual void setParams();
+       /// clean-up on hide.
+       virtual void clearParams();
 
-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:
-       ///
-       GUILog(LyXView &, Dialogs &);
-       ///
-       virtual ButtonControllerBase & bc() { return bc_; }
-       ///
-       virtual ViewBase & view() { return view_; }
-
-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)
-{}
-
 #endif // CONTROLLOG_H