]> 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 1794b06926fcc16f8efdbd27c43b443af76484f8..4f3c785abda5636ef0832dcdef37f23e9760dfa8 100644 (file)
@@ -1,63 +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>
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlInset.h"
+#include "Dialog.h"
 
-class InsetFloat;
+class InsetFloatParams;
 
-///
-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;
-};
-
-
-inline
-bool operator==(FloatParams const & p1, FloatParams const & p2) 
-{
-       return p1.placement == p2.placement;
-}
-
-
-/** A controller for Minipage dialogs.
- */
-class ControlFloat : public ControlInset<InsetFloat, FloatParams>  {
-public:
+       virtual bool isBufferDependent() const { return true; }
+       ///
+       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