#ifndef CONTROLEXTERNAL_H
#define CONTROLEXTERNAL_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "ControlInset.h"
+#include "Dialog.h"
#include "insets/insetexternal.h"
+#include <boost/scoped_ptr.hpp>
-/** A controller for External dialogs.
- */
-class ControlExternal
- : public ControlInset<InsetExternal, InsetExternal::Params>
-{
+
+class ExternalTemplate;
+
+
+class ControlExternal : public Dialog::Controller {
public:
///
- ControlExternal(LyXView &, Dialogs &);
+ ControlExternal(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; }
///
- void editExternal();
+ InsetExternal::Params const & params() const;
///
- void viewExternal();
+ void setParams(InsetExternal::Params const &);
+
///
- void updateExternal();
+ void editExternal();
///
std::vector<string> const getTemplates() const;
///
string const Browse(string const &) const;
private:
///
- virtual void applyParamsToInset();
- /// not needed.
- virtual void applyParamsNoInset() {}
- /// get the parameters from the string passed to createInset.
- virtual InsetExternal::Params const getParams(string const &);
- /// get the parameters from the inset passed to showInset.
- virtual InsetExternal::Params const getParams(InsetExternal const &);
+ boost::scoped_ptr<InsetExternal::Params> params_;
};
#endif // CONTROLEXTERNAL_H