X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfloat.h;h=633d0a75330087d20e321948541b1ef4a254adc6;hb=5603df4a5b7e511b31026c9a4f8f55b2b10fde57;hp=8b02904acdc07f20a3259d283191601fa99d1114;hpb=46e5fe4a67e6645e0cb6a74c47c6036efc6625de;p=lyx.git diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 8b02904acd..633d0a7533 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -7,7 +7,7 @@ * \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 @@ -19,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; }; @@ -39,36 +41,32 @@ struct InsetFloatParams { class InsetFloat : public InsetCollapsable { public: /// - InsetFloat(BufferParams const &, string const &); - /// - InsetFloat(InsetFloat const &); - /// - //InsetFloat(InsetFloat const &, bool same_id); + 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 &) const; + virtual std::auto_ptr clone() const; /// - //Inset * clone(Buffer const &, bool same_id) const; + InsetOld::Code lyxCode() const { return InsetOld::FLOAT_CODE; } /// - Inset::Code lyxCode() const { return Inset::FLOAT_CODE; } + int latex(Buffer const &, std::ostream &, + OutputParams const &) const; /// - int latex(Buffer const *, std::ostream &, - LatexRunParams const &) const; + int linuxdoc(Buffer const &, std::ostream &, + OutputParams const &) const; /// - int docbook(Buffer const *, std::ostream &, bool mixcont) const; + int docbook(Buffer const &, std::ostream &, + OutputParams const &) const; /// - string const editMessage() const; + std::string const editMessage() const; /// - bool insetAllowed(Inset::Code) 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 */ @@ -76,12 +74,15 @@ public: /// 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_; @@ -98,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_; };