X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfloat.h;h=7992d44d6cdd7d370d08884672e8e38d3ffd5551;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=5416845ac27d83000f1aa3c9334471d6ea473a3f;hpb=87ca6fbbeb83fa95310789e6d692e43cbfcdb6f5;p=lyx.git diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 5416845ac2..7992d44d6c 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -14,12 +14,16 @@ #define INSETFLOAT_H #include "insetcollapsable.h" -#include "toc.h" +#include "mailinset.h" + +namespace lyx { -struct InsetFloatParams { + +class InsetFloatParams { +public: /// - InsetFloatParams() : wide(false) {} + InsetFloatParams() : wide(false), sideways(false) {} /// void write(std::ostream & os) const; /// @@ -30,6 +34,8 @@ struct InsetFloatParams { std::string placement; /// bool wide; + /// + bool sideways; }; @@ -41,8 +47,6 @@ public: /// InsetFloat(BufferParams const &, std::string const &); /// - InsetFloat(InsetFloat const &); - /// ~InsetFloat(); /// void write(Buffer const & buf, std::ostream & os) const; @@ -51,20 +55,17 @@ public: /// void validate(LaTeXFeatures & features) const; /// - virtual std::auto_ptr clone() const; - /// - InsetOld::Code lyxCode() const { return InsetOld::FLOAT_CODE; } - /// - int latex(Buffer const &, std::ostream &, - LatexRunParams const &) const; + InsetBase::Code lyxCode() const { return InsetBase::FLOAT_CODE; } /// - int linuxdoc(Buffer const &, std::ostream &) const; + int latex(Buffer const &, odocstream &, + OutputParams const &) const; /// - int docbook(Buffer const &, std::ostream &, bool mixcont) const; + int docbook(Buffer const &, odocstream &, + OutputParams const &) const; /// - std::string const editMessage() const; + virtual docstring const editMessage() const; /// - bool insetAllowed(InsetOld::Code) const; + bool insetAllowed(InsetBase::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 */ @@ -72,24 +73,25 @@ public: /// void wide(bool w, BufferParams const &); /// - void addToToc(lyx::toc::TocList &, Buffer const &) const; + void sideways(bool s, BufferParams const &); + /// + void addToToc(TocList &, Buffer const &) const; /// bool showInsetDialog(BufferView *) const; /// InsetFloatParams const & params() const { return params_; } + /// + bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const; protected: - virtual - dispatch_result - priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &); + virtual void doDispatch(LCursor & cur, FuncRequest & cmd); private: + virtual std::auto_ptr doClone() const; + /// InsetFloatParams params_; }; -#include "mailinset.h" - - class InsetFloatMailer : public MailInset { public: /// @@ -111,4 +113,7 @@ private: InsetFloat & inset_; }; + +} // namespace lyx + #endif