// -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 2001 The LyX Team.
+/**
+ * \file ControlVCLog.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 ControlVCLog.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 CONTROLVCLOG_H
#define CONTROLVCLOG_H
-#include <utility>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlConnections.h"
-
-/**
- * A controller for the Version Control log viewer.
- */
-class ControlVCLog : public 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_;
-};
+#include "Dialog.h"
-
-/** A class to instantiate and make available the GUI-specific
- ButtonController and View.
- */
-template <class GUIview, class GUIbc>
-class GUIVCLog : public ControlVCLog {
+class ControlVCLog : public Dialog::Controller {
public:
///
- GUIVCLog(LyXView &, Dialogs &);
+ ControlVCLog(Dialog &);
+ /// Nothing to initialise in this case.
+ virtual bool initialiseParams(string const &) { return true; }
///
- virtual ButtonControllerBase & bc() { return bc_; }
+ virtual void clearParams() {}
///
- virtual ViewBase & view() { return view_; }
-
-private:
+ virtual void dispatchParams() {}
///
- ButtonController<OkCancelPolicy, GUIbc> bc_;
- ///
- GUIview view_;
+ virtual bool isBufferDependent() const { return true; }
+ /// put the log file into the ostream
+ void getVCLogFile(std::ostream & ss) const;
+ /// get the filename of the buffer
+ string const getBufferFileName() const;
};
-template <class GUIview, class GUIbc>
-GUIVCLog<GUIview, GUIbc>::GUIVCLog(LyXView & lv, Dialogs & d)
- : ControlVCLog(lv, d),
- view_(*this)
-{}
-
#endif // CONTROLVCLOG_H