X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetbox.h;h=8786c1c649efb1301eeaec92995e0f9d7ddc9f63;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=af396197b47a8dbb8878aa4797a1a91a312040d8;hpb=70d0ba900118ac7e253c1e1969fd7a3d64ec8e03;p=lyx.git diff --git a/src/insets/insetbox.h b/src/insets/insetbox.h index af396197b4..8786c1c649 100644 --- a/src/insets/insetbox.h +++ b/src/insets/insetbox.h @@ -13,12 +13,15 @@ #ifndef INSETBOX_H #define INSETBOX_H - #include "insetcollapsable.h" #include "lyxlength.h" +#include "mailinset.h" -struct InsetBoxParams { +namespace lyx { + +class InsetBoxParams { +public: /// InsetBoxParams(std::string const &); /// @@ -56,16 +59,12 @@ class InsetBox : public InsetCollapsable { public: /// InsetBox(BufferParams const &, std::string const &); - /// Copy constructor - InsetBox(InsetBox const &); /// ~InsetBox(); /// - virtual std::auto_ptr clone() const; - /// - std::string const editMessage() const; + virtual docstring const editMessage() const; /// - InsetOld::Code lyxCode() const { return InsetOld::BOX_CODE; } + InsetBase::Code lyxCode() const { return InsetBase::BOX_CODE; } /// void write(Buffer const &, std::ostream &) const; /// @@ -73,28 +72,31 @@ public: /// void setButtonLabel(); /// - void metrics(MetricsInfo &, Dimension &) const; + bool metrics(MetricsInfo &, Dimension &) const; /// show the Box dialog bool showInsetDialog(BufferView * bv) const; /// bool display() const { return false; } /// - int latex(Buffer const &, std::ostream &, - OutputParams const &) const; + bool forceDefaultParagraphs(idx_type) const; + /// + bool neverIndent(Buffer const &) const { return true; } + /// + bool noFontChange() const { return true; } /// - int linuxdoc(Buffer const &, std::ostream &, - OutputParams const &) const; + int latex(Buffer const &, odocstream &, OutputParams const &) const; /// - int docbook(Buffer const &, std::ostream &, - OutputParams const &) const; + int docbook(Buffer const &, odocstream &, OutputParams const &) const; /// - int plaintext(Buffer const &, std::ostream &, + int plaintext(Buffer const &, odocstream &, OutputParams const & runparams) const; /// void validate(LaTeXFeatures &) const; /// InsetBoxParams const & params() const { return params_; } /// + bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const; + /// enum BoxType { Frameless, Boxed, @@ -104,13 +106,15 @@ public: Doublebox }; protected: - /// - virtual - DispatchResult - priv_dispatch(BufferView & bv, FuncRequest const & cmd); + InsetBox(InsetBox const &); + virtual void doDispatch(LCursor & cur, FuncRequest & cmd); + /// Is the width forced to some value? + virtual bool hasFixedWidth() const; private: friend class InsetBoxParams; + virtual std::auto_ptr doClone() const; + /// used by the constructors void init(); /// @@ -118,8 +122,6 @@ private: }; -#include "mailinset.h" - class InsetBoxMailer : public MailInset { public: /// @@ -142,4 +144,7 @@ private: InsetBox & inset_; }; + +} // namespace lyx + #endif // INSET_BOX_H