]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetBox.h
index d65268f82795a00ecf6c56edef9c56a3e4c2e7a8..611647d6f34bdfd23e1bdb2ee44987b654c8e586 100644 (file)
@@ -64,7 +64,9 @@ public:
        ///
        virtual docstring const editMessage() const;
        ///
-       Inset::Code lyxCode() const { return Inset::BOX_CODE; }
+       InsetCode lyxCode() const { return BOX_CODE; }
+       ///
+       docstring name() const;
        ///
        void write(Buffer const &, std::ostream &) const;
        ///
@@ -72,18 +74,22 @@ public:
        ///
        void setButtonLabel();
        ///
-       bool metrics(MetricsInfo &, Dimension &) const;
+       void metrics(MetricsInfo &, Dimension &) const;
        /// show the Box dialog
        bool showInsetDialog(BufferView * bv) const;
        ///
-       bool display() const { return false; }
+       DisplayType display() const { return Inline; }
+       //FIXME Is this the one we want? or is it:
+       //allowParagraphCustomization(idx_type)?
        ///
-       bool forceDefaultParagraphs(idx_type) const;
+       virtual bool forceEmptyLayout() const;
        ///
        bool neverIndent(Buffer const &) const { return true; }
        ///
        bool noFontChange() const { return true; }
        ///
+       bool isMacroScope(Buffer const & buf) const;
+       ///
        int latex(Buffer const &, odocstream &, OutputParams const &) const;
        ///
        int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
@@ -99,9 +105,11 @@ public:
        enum BoxType {
                Frameless,
                Boxed,
+               Framed,
                ovalbox,
                Ovalbox,
                Shadowbox,
+               Shaded,
                Doublebox
        };
 protected:
@@ -109,12 +117,10 @@ protected:
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
        /// Is the width forced to some value?
        virtual bool hasFixedWidth() const;
-       ///
-       virtual docstring name() const { return from_ascii("Box"); }
 private:
        friend class InsetBoxParams;
 
-       virtual std::auto_ptr<Inset> doClone() const;
+       virtual Inset * clone() const;
 
        /// used by the constructors
        void init();