]> git.lyx.org Git - lyx.git/blobdiff - src/insets/lyxinset.h
some reindentation, revert workarea xpos++, constify, remove all traces of LyXParagra...
[lyx.git] / src / insets / lyxinset.h
index e47c9b47b1ad6c90f336b7b1a1d8e39e35bfc31f..5d14cd0ae3ac00a5fa595c19a901b64d6bd18089 100644 (file)
@@ -45,71 +45,67 @@ public:
                ///
                TOC_CODE,  // do these insets really need a code? (ale)
                ///
-               LOF_CODE, // 2
-               ///
-               LOT_CODE,
-               ///
-               LOA_CODE,
-               ///
-               QUOTE_CODE, // 5
+               QUOTE_CODE,
                ///
                MARK_CODE,
                ///
-               REF_CODE,
+               REF_CODE, // 5
                ///
                URL_CODE,
                ///
                HTMLURL_CODE,
                ///
-               SEPARATOR_CODE, // 10
+               SEPARATOR_CODE,
                ///
                ENDING_CODE,
                ///
-               LABEL_CODE,
+               LABEL_CODE, // 10
                ///
                IGNORE_CODE,
                ///
                ACCENT_CODE,
                ///
-               MATH_CODE, // 15
+               MATH_CODE,
                ///
                INDEX_CODE,
                ///
-               INCLUDE_CODE,
+               INCLUDE_CODE, // 15
                ///
                GRAPHICS_CODE,
                ///
                PARENT_CODE,
                ///
-               BIBTEX_CODE, // 20
+               BIBTEX_CODE,
                ///
                TEXT_CODE,
                ///
-               ERT_CODE,
+               ERT_CODE, // 20
                ///
                FOOT_CODE,
                ///
                MARGIN_CODE,
                ///
-               FLOAT_CODE, // 25
+               FLOAT_CODE,
                ///
                MINIPAGE_CODE,
                ///
-               SPECIALCHAR_CODE,
+               SPECIALCHAR_CODE, // 25
                ///
                TABULAR_CODE,
                ///
                EXTERNAL_CODE,
                ///
-               THEOREM_CODE, // 30
+               THEOREM_CODE,
                ///
                CAPTION_CODE,
                ///
-               MATHMACRO_CODE,
+               MATHMACRO_CODE, // 30
                ///
                ERROR_CODE,
                ///
-               CITE_CODE
+               CITE_CODE,
+               ///
+               FLOAT_LIST_CODE
        };
 
        ///
@@ -130,7 +126,7 @@ public:
        
        ///
        Inset() : top_x(0), top_baseline(0), scx(0), owner_(0) {}
-       ///
+       /// Virtual base destructor
        virtual ~Inset() {}
        ///
        virtual int ascent(BufferView *, LyXFont const &) const = 0;
@@ -234,7 +230,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;
@@ -303,9 +304,8 @@ public:
                return b ? DISPATCHED : FINISHED;
        }
 
-
        ///
-       UpdatableInset() : cursor_visible_(false) {}
+       UpdatableInset() : cursor_visible_(false), block_drawing_(false) {}
 
        ///
        virtual EDITABLE Editable() const;
@@ -365,12 +365,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 {
@@ -384,8 +393,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