#define INSETWRAP_H
#include "InsetCollapsable.h"
-#include "LyXLength.h"
+#include "Length.h"
#include "MailInset.h"
///
std::string type;
///
+ int lines;
+ ///
std::string placement;
///
- LyXLength width;
+ Length overhang;
+ ///
+ Length width;
};
class InsetWrap : public InsetCollapsable {
public:
///
- InsetWrap(BufferParams const &, std::string const &);
+ InsetWrap(Buffer const &, std::string const &);
///
~InsetWrap();
///
- void write(Buffer const & buf, std::ostream & os) const;
+ InsetWrapParams const & params() const { return params_; }
+private:
///
- void read(Buffer const & buf, Lexer & lex);
+ void write(std::ostream & os) const;
///
- void validate(LaTeXFeatures & features) const;
+ void read(Lexer & lex);
///
- InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
+ void validate(LaTeXFeatures & features) const;
///
- int latex(Buffer const &, odocstream &,
- OutputParams const &) const;
+ InsetCode lyxCode() const { return WRAP_CODE; }
///
- int plaintext(Buffer const &, odocstream &,
- OutputParams const &) const;
+ int latex(odocstream &, OutputParams const &) const;
///
- int docbook(Buffer const &, odocstream &,
- OutputParams const &) const;
+ int plaintext(odocstream &, OutputParams const &) const;
///
- virtual docstring const editMessage() const;
+ int docbook(odocstream &, OutputParams const &) const;
///
- bool insetAllowed(InsetBase::Code) const;
+ docstring editMessage() const;
///
- void addToToc(TocList &, Buffer const &) const;
+ bool insetAllowed(InsetCode) const;
///
bool showInsetDialog(BufferView *) const;
///
- InsetWrapParams const & params() const { return params_; }
+ bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+ // Update the counters of this inset and of its contents
+ void updateLabels(ParIterator const &);
///
- bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
-protected:
+ void doDispatch(Cursor & cur, FuncRequest & cmd);
///
- virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
-private:
- virtual std::auto_ptr<InsetBase> doClone() const;
+ docstring name() const { return name_; }
+ ///
+ Inset * clone() const { return new InsetWrap(*this); }
///
InsetWrapParams params_;
+ ///
+ docstring name_;
};
///
InsetWrapMailer(InsetWrap & inset);
///
- virtual InsetBase & inset() const { return inset_; }
+ virtual Inset & inset() const { return inset_; }
///
virtual std::string const & name() const { return name_; }
///