X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfloat.h;h=633d0a75330087d20e321948541b1ef4a254adc6;hb=5603df4a5b7e511b31026c9a4f8f55b2b10fde57;hp=7eb8a54e314c48fba5e4f7420e8b36d60d1f8c7b;hpb=caa4b718ac0e77c72a53c84e376fb5b98f3cebfe;p=lyx.git diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 7eb8a54e31..633d0a7533 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -7,12 +7,11 @@ * \author Jürgen Vigna * \author Lars Gullik Bjønnes * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ -#ifndef InsetFloat_H -#define InsetFloat_H - +#ifndef INSETFLOAT_H +#define INSETFLOAT_H #include "insetcollapsable.h" #include "toc.h" @@ -20,17 +19,19 @@ struct InsetFloatParams { /// - InsetFloatParams() : wide(false) {} + InsetFloatParams() : wide(false), sideways(false) {} /// void write(std::ostream & os) const; /// void read(LyXLex & lex); /// - string type; + std::string type; /// - string placement; + std::string placement; /// bool wide; + /// + bool sideways; }; @@ -40,46 +41,48 @@ struct InsetFloatParams { class InsetFloat : public InsetCollapsable { public: /// - InsetFloat(BufferParams const &, string const &); - /// - InsetFloat(InsetFloat const &, bool same_id = false); + InsetFloat(BufferParams const &, std::string const &); /// ~InsetFloat(); /// - virtual dispatch_result localDispatch(FuncRequest const & cmd); - /// - void write(Buffer const * buf, std::ostream & os) const; + void write(Buffer const & buf, std::ostream & os) const; /// - void read(Buffer const * buf, LyXLex & lex); + void read(Buffer const & buf, LyXLex & lex); /// void validate(LaTeXFeatures & features) const; /// - Inset * clone(Buffer const &, bool same_id = false) const; + virtual std::auto_ptr clone() const; /// - Inset::Code lyxCode() const { return Inset::FLOAT_CODE; } + InsetOld::Code lyxCode() const { return InsetOld::FLOAT_CODE; } /// - int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const; + int latex(Buffer const &, std::ostream &, + OutputParams const &) const; /// - int docbook(Buffer const *, std::ostream &, bool mixcont) const; + int linuxdoc(Buffer const &, std::ostream &, + OutputParams const &) const; /// - string const editMessage() const; + int docbook(Buffer const &, std::ostream &, + OutputParams const &) const; /// - bool insetAllowed(Inset::Code) const; + std::string const editMessage() const; + /// + bool insetAllowed(InsetOld::Code) const; /** returns true if, when outputing LaTeX, font changes should be closed before generating this inset. This is needed for insets that may contain several paragraphs */ bool noFontChange() const { return true; } /// - string const & type() const; - /// void wide(bool w, BufferParams const &); /// - void addToToc(toc::TocList &, Buffer const *) const; + void sideways(bool s, BufferParams const &); + /// + void addToToc(lyx::toc::TocList &, Buffer const &) const; /// bool showInsetDialog(BufferView *) const; /// InsetFloatParams const & params() const { return params_; } - +protected: + virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd); private: /// InsetFloatParams params_; @@ -96,16 +99,16 @@ public: /// virtual InsetBase & inset() const { return inset_; } /// - virtual string const & name() const { return name_; } + virtual std::string const & name() const { return name_; } /// - virtual string const inset2string() const; + virtual std::string const inset2string(Buffer const &) const; /// - static void string2params(string const &, InsetFloatParams &); + static void string2params(std::string const &, InsetFloatParams &); /// - static string const params2string(InsetFloatParams const &); + static std::string const params2string(InsetFloatParams const &); private: /// - static string const name_; + static std::string const name_; /// InsetFloat & inset_; };