]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.h
Fix GRAPHICS_EDIT of InsetGraphics
[lyx.git] / src / insets / InsetBox.h
index 9f18e20c79efdc020e72109643eed272a7c53d03..4f207c28a832dbcb370ab9bc3afb1f932081285c 100644 (file)
@@ -58,37 +58,57 @@ public:
 class InsetBox : public InsetCollapsable {
 public:
        ///
-       InsetBox(BufferParams const &, std::string const &);
+       enum BoxType {
+               Frameless,
+               Boxed,
+               Framed,
+               ovalbox,
+               Ovalbox,
+               Shadowbox,
+               Shaded,
+               Doublebox
+       };
+       ///
+       InsetBox(Buffer const &, std::string const &);
        ///
        ~InsetBox();
+private:
        ///
-       virtual docstring const editMessage() const;
+       friend class InsetBoxParams;
+       friend class InsetBoxMailer;
        ///
-       Inset::Code lyxCode() const { return Inset::BOX_CODE; }
+       docstring editMessage() const;
        ///
-       void write(Buffer const &, std::ostream &) const;
+       InsetCode lyxCode() const { return BOX_CODE; }
        ///
-       void read(Buffer const & buf, Lexer & lex);
+       docstring name() const;
+       ///
+       void write(std::ostream &) const;
+       ///
+       void read(Lexer & lex);
        ///
        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; }
        ///
-       bool forceDefaultParagraphs(idx_type) const;
+       virtual bool allowParagraphCustomization(idx_type = 0)
+               { return forceEmptyLayout(); }
        ///
-       bool neverIndent(Buffer const &) const { return true; }
+       virtual bool forceEmptyLayout(idx_type = 0) const;
+       ///
+       bool neverIndent() const { return true; }
        ///
        bool noFontChange() const { return true; }
        ///
-       int latex(Buffer const &, odocstream &, OutputParams const &) const;
+       int latex(odocstream &, OutputParams const &) const;
        ///
-       int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
+       int plaintext(odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const &, odocstream &, OutputParams const &) const;
+       int docbook(odocstream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
@@ -96,28 +116,14 @@ public:
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
-       enum BoxType {
-               Frameless,
-               Boxed,
-               ovalbox,
-               Ovalbox,
-               Shadowbox,
-               Doublebox
-       };
-protected:
-       InsetBox(InsetBox const &);
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        /// Is the width forced to some value?
-       virtual bool hasFixedWidth() const;
+       bool hasFixedWidth() const;
        ///
-       virtual docstring insetName() const { return from_ascii("Box"); }
-private:
-       friend class InsetBoxParams;
-
-       virtual std::auto_ptr<Inset> doClone() const;
-
+       Inset * clone() const { return new InsetBox(*this); }
        /// used by the constructors
        void init();
+
        ///
        InsetBoxParams params_;
 };