#ifndef CONTROLGRAPHICS_H
#define CONTROLGRAPHICS_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "ControlInset.h"
-
-// needed to instatiate inset->hideDialog in ControlInset
-#include "insets/insetgraphics.h"
+#include "Dialog.h"
#include <utility>
#include <vector>
/** A controller for Graphics dialogs.
*/
-class ControlGraphics
- : public ControlInset<InsetGraphics, InsetGraphicsParams> {
+class ControlGraphics : public Dialog::Controller {
public:
///
- ControlGraphics(LyXView &, Dialogs &);
+ ControlGraphics(Dialog &);
+ ///
+ virtual bool initialiseParams(string const & data);
+ /// clean-up on hide.
+ virtual void clearParams();
+ /// clean-up on hide.
+ virtual void dispatchParams();
+ ///
+ virtual bool isBufferDependent() const { return true; }
+ ///
+ InsetGraphicsParams & params() { return *params_.get(); }
+ ///
+ InsetGraphicsParams const & params() const { return *params_.get(); }
/// Browse for a file
string const Browse(string const &);
bool bbChanged;
/// test if file exist
bool isFilenameValid(string const & fname) const;
- /// get the units for the bb
- std::vector<string> const getUnits();
private:
- /// Dispatch the changed parameters to the kernel.
- virtual void applyParamsToInset();
///
- virtual void applyParamsNoInset();
- /// get the parameters from the string passed to createInset.
- virtual InsetGraphicsParams const getParams(string const &);
- /// get the parameters from the inset passed to showInset.
- virtual InsetGraphicsParams const getParams(InsetGraphics const &);
+ boost::scoped_ptr<InsetGraphicsParams> params_;
};
namespace frnt {
+/// get the units for the bounding box
+std::vector<string> const getBBUnits();
+
/// The (tranlated) GUI string and it's LaTeX equivalent.
typedef std::pair<string, string> RotationOriginPair;
///