]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlVCLog.h
Rob Lahaye's "iconify dialogs with main window if so desired" patch.
[lyx.git] / src / frontends / controllers / ControlVCLog.h
index 6da6c7b96d7b2dd88a88983da7d7c11e1d22aa72..b54bdadd01f2ef6821c1b8ae5d1d1083caa90ff5 100644 (file)
 #ifndef CONTROLVCLOG_H
 #define CONTROLVCLOG_H
 
-#include <utility>
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "ControlConnections.h"
+#include "ControlDialogs.h"
+#include "Lsstream.h"
 
 /**
  * A controller for the Version Control log viewer.
  */
-class ControlVCLog : public ControlConnectBD {
+class ControlVCLog : public ControlDialog<ControlConnectBD> {
 public:
        ///
        ControlVCLog(LyXView &, Dialogs &);
-       ///
-       string const & logfile() { return logfile_; }
-
-protected:
-       ///
-       virtual void apply() {}
-       /// Show the dialog.
-       virtual void show();
-       /// Update the dialog.
-       virtual void update();
-       /// Hide the dialog.
-       virtual void hide();
-
-private:
-       string logfile_;
-};
-
-
-/** A class to instantiate and make available the GUI-specific
-    ButtonController and View.
- */
-template <class GUIview, class GUIbc>
-class GUIVCLog : public ControlVCLog {
-public:
-       ///
-       GUIVCLog(LyXView &, Dialogs &);
-       ///
-       virtual ButtonControllerBase & bc() { return bc_; }
-       ///
-       virtual ViewBase & view() { return view_; }
+       /// get a stringstream containing the log file
+       stringstream & getVCLogFile(stringstream & ss) const;
+       /// get the filename of the buffer
+       string const getBufferFileName() const;
 
 private:
        ///
-       ButtonController<OkCancelPolicy, GUIbc> bc_;
-       ///
-       GUIview view_;
+       virtual void apply() {}
 };
 
-template <class GUIview, class GUIbc>
-GUIVCLog<GUIview, GUIbc>::GUIVCLog(LyXView & lv, Dialogs & d)
-       : ControlVCLog(lv, d),
-         view_(*this)
-{}
-
 #endif // CONTROLVCLOG_H