]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.h
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insettext.h
index 0b33eb23eb78a528fc5a8e3873ec399b5ed4282e..3b21200f3dfecd2387e8004f227bf51ab27f265b 100644 (file)
@@ -43,6 +43,9 @@ public:
        explicit InsetText(BufferParams const &);
        ///
        InsetText();
+       ///
+       virtual ~InsetText() {}
+
        /// empty inset to empty par
        void clear();
        ///
@@ -50,13 +53,13 @@ public:
        ///
        void write(Buffer const & buf, std::ostream & os) const;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       bool metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        /// draw inset selection
        void drawSelection(PainterInfo & pi, int x, int y) const;
        /// are we inside the area covered by the inset?
-       virtual bool covers(BufferView & bv, int x, int y) const;
+       virtual bool covers(BufferView const & bv, int x, int y) const;
        ///
        virtual docstring const editMessage() const;
        ///
@@ -92,22 +95,20 @@ public:
        ///
        void setFrameColor(LColor_color);
        ///
-       void setViewCache(BufferView const * bv) const;
-       ///
        bool showInsetDialog(BufferView *) const;
        ///
        LyXText * getText(int i) const {
                return (i == 0) ? const_cast<LyXText*>(&text_) : 0;
        }
        ///
-       bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+       virtual bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
 
        /// set the change for the entire inset
        void setChange(Change const & change);
        /// accept the changes within the inset
-       void acceptChanges();
+       void acceptChanges(BufferParams const & bparams);
        /// reject the changes within the inset
-       void rejectChanges();
+       void rejectChanges(BufferParams const & bparams);
 
        /// append text onto the existing text
        void appendParagraphs(Buffer * bp, ParagraphList &);
@@ -131,11 +132,13 @@ public:
        ///
        bool allowSpellCheck() const { return true; }
        /// should paragraph indendation be ommitted in any case?
-       bool neverIndent() const;
+       bool neverIndent(Buffer const &) const;
        ///
        InsetText(InsetText const &);
        ///
-       bool & Wide() const { return wide_inset_; }
+       virtual bool wide() const { return wide_inset_; }
+       ///
+       void setWide(bool wide_inset) { wide_inset_ = wide_inset; }
 
 protected:
        ///
@@ -156,14 +159,14 @@ private:
        ///
        mutable pit_type old_pit;
        ///
-       static int border_;
-       ///
-       mutable bool wide_inset_;
+       bool wide_inset_;
 public:
        ///
        mutable LyXText text_;
        ///
        mutable LyXFont font_;
+       ///
+       static int border_;
 };
 
 } // namespace lyx