X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBox.h;h=83ba43403e07129dd5270eb6446a85970aa820f6;hb=996505c2ae981187d34580633fca410972c2493d;hp=29fa21e263b833463abcdeca47bf2a875ef5e8ad;hpb=75999ba650ec5cb40ae31aae4ea1eb817929d09b;p=lyx.git diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h index 29fa21e263..83ba43403e 100644 --- a/src/insets/InsetBox.h +++ b/src/insets/InsetBox.h @@ -15,12 +15,12 @@ #include "InsetCollapsable.h" #include "Length.h" -#include "MailInset.h" namespace lyx { -class InsetBoxParams { +class InsetBoxParams +{ public: /// InsetBoxParams(std::string const &); @@ -28,6 +28,7 @@ public: void write(std::ostream & os) const; /// void read(Lexer & lex); + /// std::string type; /// Use a parbox (true) or minipage (false) @@ -37,7 +38,7 @@ public: bool inner_box; /// Length width; - /// "special" widths, see usrguide.dvi §3.5 + /// "special" widths, see usrguide.dvi §3.5 std::string special; /// char pos; @@ -52,10 +53,16 @@ public: }; -/** The fbox/fancybox inset -*/ -class InsetBox : public InsetCollapsable { +/////////////////////////////////////////////////////////////////////// +// +// The fbox/fancybox inset +// +/////////////////////////////////////////////////////////////////////// + + +class InsetBox : public InsetCollapsable +{ public: /// enum BoxType { @@ -69,15 +76,16 @@ public: Doublebox }; /// - InsetBox(Buffer const &, std::string const &); + InsetBox(Buffer *, std::string const &); /// ~InsetBox(); + /// + static std::string params2string(InsetBoxParams const &); + /// + static void string2params(std::string const &, InsetBoxParams &); private: /// friend class InsetBoxParams; - friend class InsetBoxMailer; - /// - docstring editMessage() const; /// InsetCode lyxCode() const { return BOX_CODE; } /// @@ -94,23 +102,23 @@ private: bool showInsetDialog(BufferView * bv) const; /// DisplayType display() const { return Inline; } - //FIXME Is this the one we want? or is it: - //allowParagraphCustomization(idx_type)? /// - bool forceEmptyLayout() const; + bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); } + /// + bool forcePlainLayout(idx_type = 0) const; /// bool neverIndent() const { return true; } /// bool noFontChange() const { return true; } /// - bool isMacroScope() const; - /// int latex(odocstream &, OutputParams const &) const; /// int plaintext(odocstream &, OutputParams const &) const; /// int docbook(odocstream &, OutputParams const &) const; /// + docstring xhtml(XHTMLStream &, OutputParams const &) const; + /// void validate(LaTeXFeatures &) const; /// InsetBoxParams const & params() const { return params_; } @@ -124,35 +132,13 @@ private: Inset * clone() const { return new InsetBox(*this); } /// used by the constructors void init(); - /// - InsetBoxParams params_; -}; - + docstring contextMenu(BufferView const & bv, int x, int y) const; -class InsetBoxMailer : public MailInset { -public: - /// - InsetBoxMailer(InsetBox & inset); - /// - virtual Inset & inset() const { return inset_; } - /// - virtual std::string const & name() const { return name_; } /// - virtual std::string const inset2string(Buffer const &) const; - /// - static std::string const params2string(InsetBoxParams const &); - /// - static void string2params(std::string const &, InsetBoxParams &); - -private: - /// - static std::string const name_; - /// - InsetBox & inset_; + InsetBoxParams params_; }; - } // namespace lyx -#endif // INSET_BOX_H +#endif // INSETBOX_H