]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlFloat.h
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlFloat.h
index cf93d6fe16de99076e388bbbd331d24c598772d8..4f3c785abda5636ef0832dcdef37f23e9760dfa8 100644 (file)
@@ -1,72 +1,40 @@
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- *           LyX, The Document Processor
- *
- *          Copyright 2001 The LyX Team.
+/**
+ * \file ControlFloat.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *======================================================
+ * \author unknown
  *
- * \file ControlFloat.h
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef CONTROLFLOAT_H
 #define CONTROLFLOAT_H
 
-#include <vector>
+#include "Dialog.h"
 
-#ifdef __GNUG__
-#pragma interface
-#endif
+class InsetFloatParams;
 
-#include "ControlInset.h"
-
-class InsetFloat;
-
-///
-struct FloatParams {
+class ControlFloat : public Dialog::Controller {
+public:
        ///
-       FloatParams();
+       ControlFloat(Dialog &);
        ///
-       FloatParams(InsetFloat const &);
+       virtual bool initialiseParams(string const & data);
+       /// clean-up on hide.
+       virtual void clearParams();
+       /// clean-up on hide.
+       virtual void dispatchParams();
        ///
-       string placement;
+       virtual bool isBufferDependent() const { return true; }
        ///
-       bool allow_here_definitely;
-};
-
-
-inline
-bool operator==(FloatParams const & p1, FloatParams const & p2)
-{
-       return p1.placement == p2.placement && p1.allow_here_definitely == p2.allow_here_definitely;
-}
-
-
-inline
-bool operator!=(FloatParams const & p1, FloatParams const & p2)
-{
-       return !(p1 == p2);
-}
-
-
-/** A controller for Minipage dialogs.
- */
-class ControlFloat : public ControlInset<InsetFloat, FloatParams>  {
-public:
+       InsetFloatParams & params() { return *params_.get(); }
        ///
-       ControlFloat(LyXView &, Dialogs &);
+       InsetFloatParams const & params() const { return *params_.get(); }
 private:
-       /// Dispatch the changed parameters to the kernel.
-       virtual void applyParamsToInset();
        ///
-       virtual void applyParamsNoInset();
-       /// get the parameters from the string passed to createInset.
-       virtual FloatParams const getParams(string const &)
-               { return FloatParams(); }
-       /// get the parameters from the inset passed to showInset.
-       virtual FloatParams const getParams(InsetFloat const &);
+       boost::scoped_ptr<InsetFloatParams> params_;
 };
 
 #endif