// -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 2001 The LyX Team.
+/**
+ * \file ControlERT.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- *======================================================
+ * \author Jürgen Vigna
+ * \author Angus Leeming
*
- * \file ControlERT.h
- * \author Juergen Vigna, jug@sad.it
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * Full author contact details are available in file CREDITS.
*/
#ifndef CONTROLERT_H
#define CONTROLERT_H
-#include <vector>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "ControlInset.h"
-#include "insets/insetert.h" // InsetERT::Status
+#include "Dialog.h"
+#include "insets/insetert.h" // InsetERT::ERTStatus
-/** This should be moved back into insetert.h and InsetERT should
- contain an instance of it. */
+namespace lyx {
+namespace frontend {
-struct ERTParams {
+class ControlERT : public Dialog::Controller {
+public:
///
- ERTParams();
+ ControlERT(Dialog &);
///
- ERTParams(InsetERT const &);
+ InsetCollapsable::CollapseStatus status() const { return status_; }
///
- InsetERT::ERTStatus status;
-};
-
-
-///
-bool operator==(ERTParams const &, ERTParams const &);
-///
-bool operator!=(ERTParams const &, ERTParams const &);
-
-
-/** A controller for ERT dialogs.
- */
-class ControlERT : public ControlInset<InsetERT, ERTParams> {
-public:
+ void setStatus(InsetCollapsable::CollapseStatus status) { status_ = status; }
///
- ControlERT(LyXView &, Dialogs &);
-
+ virtual bool initialiseParams(std::string const & data);
+ /// clean-up on hide.
+ virtual void clearParams();
+ /// clean-up on hide.
+ virtual void dispatchParams();
+ ///
+ virtual bool isBufferDependent() const { return true; }
private:
- /// Dispatch the changed parameters to the kernel.
- virtual void applyParamsToInset();
- ///
- virtual void applyParamsNoInset();
- /// get the parameters from the string passed to createInset.
- virtual ERTParams const getParams(string const &)
- { return ERTParams(); }
- /// get the parameters from the inset passed to showInset.
- virtual ERTParams const getParams(InsetERT const &);
+ ///
+ InsetCollapsable::CollapseStatus status_;
};
+} // namespace frontend
+} // namespace lyx
+
#endif