]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlERT.h
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlERT.h
index eb6569c1f560f83124b4521c8518bcecf3960182..1cb8bb8c102bbc46ac5fe621597637ff2deef86a 100644 (file)
 #ifndef CONTROLERT_H
 #define CONTROLERT_H
 
-#include <vector>
 
+#include "Dialog.h"
+#include "insets/insetert.h" // InsetERT::ERTStatus
 
-#include "ControlInset.h"
-#include "insets/insetert.h" // InsetERT::Status
 
-/** This should be moved back into insetert.h and InsetERT should
-    contain an instance of it. */
-
-struct ERTParams {
+class ControlERT : public Dialog::Controller {
+public:
        ///
-       ERTParams();
+       ControlERT(Dialog &);
        ///
-       ERTParams(InsetERT const &);
+       InsetERT::ERTStatus 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(InsetERT::ERTStatus status) { status_ = status; }
+       ///
+       virtual bool initialiseParams(string const & data);
+       /// clean-up on hide.
+       virtual void clearParams();
+       /// clean-up on hide.
+       virtual void dispatchParams();
        ///
-       ControlERT(LyXView &, Dialogs &);
+       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 &);
+       InsetERT::ERTStatus status_;
 };
 
 #endif