]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.h
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / insetcollapsable.h
index a552119eb43ff7204763188f026a0c60d1a23381..22697c4828e5bfb0c626e932baae3f2b77ff4087 100644 (file)
@@ -47,7 +47,7 @@ public:
        ///
        void drawSelection(PainterInfo & pi, int x, int y) const;
        /// return x,y of given position relative to the inset's baseline
-       void getCursorPos(CursorSlice const & sl, int & x, int & y) const;
+       void cursorPos(CursorSlice const & sl, bool boundary, int & x, int & y) const;
        ///
        bool hitButton(FuncRequest const &) const;
        ///
@@ -65,17 +65,11 @@ public:
        ///
        void setLabelFont(LyXFont & f);
        ///
-       int scroll(bool recursive = true) const;
-       ///
-       void scroll(BufferView & bv, double sx) const;
-       ///
-       void scroll(BufferView & bv, int offset) const;
-       ///
        bool isOpen() const { return status_ == Open || status_ == Inlined; }
        ///
        bool inlined() const { return status_ == Inlined; }
        ///
-       CollapseStatus status() const { return status_; }
+       CollapseStatus status() const;
        ///
        bool allowSpellCheck() const { return true; }
        ///
@@ -84,19 +78,16 @@ public:
        void setStatus(LCursor & cur, CollapseStatus st);
 
 protected:
-
        ///
        virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
        ///
        Dimension dimensionCollapsed() const;
        ///
-       int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;
-       ///
        Box const & buttonDim() const;
        ///
        void edit(LCursor & cur, bool left);
        ///
-       InsetBase * editXY(LCursor & cur, int x, int y) const;
+       InsetBase * editXY(LCursor & cur, int x, int y);
        ///
        void setInlined() { status_ = Inlined; }
 
@@ -116,6 +107,8 @@ private:
        mutable CollapseStatus status_;
        /// a substatus of the Open status, determined automatically in metrics
        mutable bool openinlined_;
+       /// the inset will automatically open when the cursor is inside
+       mutable bool autoOpen_;
        ///
        mutable Dimension textdim_;
 };