]> git.lyx.org Git - features.git/blobdiff - src/insets/lyxinset.h
Reinsert the changes Lars reverted!
[features.git] / src / insets / lyxinset.h
index eea2d76d9edec8f8eb4e0313faf7dae509223b1c..ba836588906373be9d59b7889c361b763d71997d 100644 (file)
@@ -234,7 +234,12 @@ public:
        ///
        virtual void resizeLyXText(BufferView *) const {}
        /// returns the actuall scroll-value
-       int scroll() const { return scx; }
+       virtual int scroll(bool recursive=true) const {
+               if (!recursive || !owner_)
+                       return scx;
+               return 0;
+       }
+
 protected:
        ///
        mutable int top_x;
@@ -304,7 +309,8 @@ public:
        }
 
        ///
-       UpdatableInset() : cursor_visible_(false) {}
+       UpdatableInset() : cursor_visible_(false), block_drawing_(false) {}
+
        ///
        virtual EDITABLE Editable() const;
        
@@ -363,12 +369,21 @@ public:
        ///
        virtual int getMaxWidth(BufferView * bv, UpdatableInset const *) const;
        ///
-       int scroll() const {
+       int scroll(bool recursive=true) const {
                // We need this method to not clobber the real method in Inset
-               return Inset::scroll();
+               return Inset::scroll(recursive);
        }
        ///
        virtual bool ShowInsetDialog(BufferView *) const { return false; }
+       ///
+       virtual void nodraw(bool b) {
+               block_drawing_ = b;
+       }
+       ///
+       virtual bool nodraw() const {
+               return block_drawing_;
+       }
+
 protected:
        ///
        void toggleCursorVisible() const {
@@ -382,8 +397,11 @@ protected:
        void scroll(BufferView *, float sx) const;
        /// scrolls offset pixels
        void scroll(BufferView *, int offset) const;
+
 private:
        ///
        mutable bool cursor_visible_;
+       ///
+       bool block_drawing_;
 };
 #endif