#ifndef InsetWrap_H
#define InsetWrap_H
-#ifdef __GNUG__
-#pragma interface
-#endif
#include "insetcollapsable.h"
#include "toc.h"
#include "lyxlength.h"
-#include <boost/signals/signal0.hpp>
-class Painter;
+struct InsetWrapParams {
+ ///
+ void write(std::ostream &) const;
+ ///
+ void read(LyXLex &);
+
+ ///
+ string type;
+ ///
+ string placement;
+ ///
+ LyXLength width;
+};
+
/** The wrap inset
-
-*/
+ */
class InsetWrap : public InsetCollapsable {
public:
///
///
~InsetWrap();
///
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ ///
void write(Buffer const * buf, std::ostream & os) const;
///
void read(Buffer const * buf, LyXLex & lex);
///
Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
///
- int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
+ int latex(Buffer const *, std::ostream &,
+ LatexRunParams const &) const;
///
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
- string const & type() const;
+ void addToToc(toc::TocList &, Buffer const *) const;
+ ///
+ bool showInsetDialog(BufferView *) const;
+ ///
+ int latexTextWidth(BufferView *) const;
///
- LyXLength const & pageWidth() const;
+ InsetWrapParams const & params() const { return params_; }
+private:
///
- void pageWidth(LyXLength const &);
+ InsetWrapParams params_;
+};
+
+
+
+#include "mailinset.h"
+
+
+class InsetWrapMailer : public MailInset {
+public:
///
- void placement(string const & p);
+ InsetWrapMailer(InsetWrap & inset);
///
- string const & placement() const;
+ virtual InsetBase & inset() const { return inset_; }
///
- void addToToc(toc::TocList &, Buffer const *) const;
+ virtual string const & name() const { return name_; }
///
- bool showInsetDialog(BufferView *) const;
+ virtual string const inset2string() const;
///
- boost::signal0<void> hideDialog;
+ static void string2params(string const &, InsetWrapParams &);
///
- int latexTextWidth(BufferView *) const;
+ static string const params2string(InsetWrapParams const &);
private:
///
- string Type_;
- ///
- string Placement_;
+ static string const name_;
///
- LyXLength width_;
+ InsetWrap & inset_;
};
#endif