]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.h
This patch introduces an optional argument to Buffer::updateLabels(), so
[lyx.git] / src / insets / InsetBox.h
index 4f207c28a832dbcb370ab9bc3afb1f932081285c..83ba43403e07129dd5270eb6446a85970aa820f6 100644 (file)
 
 #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; }
        ///
@@ -95,10 +103,9 @@ private:
        ///
        DisplayType display() const { return Inline; }
        ///
-       virtual bool allowParagraphCustomization(idx_type = 0)
-               { return forceEmptyLayout(); }
+       bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
        ///
-       virtual bool forceEmptyLayout(idx_type = 0) const;
+       bool forcePlainLayout(idx_type = 0) const;
        ///
        bool neverIndent() const { return true; }
        ///
@@ -110,6 +117,8 @@ private:
        ///
        int docbook(odocstream &, OutputParams const &) const;
        ///
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       ///
        void validate(LaTeXFeatures &) const;
        ///
        InsetBoxParams const & params() const { return params_; }
@@ -123,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