// -*- 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