]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.h
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / insettext.h
index 1699154fc29171baea42b702c74ebdaeea219652..11cd54be750a9da92150cb9863a35af9b1f200d4 100644 (file)
@@ -27,9 +27,7 @@ class BufferView;
 class CursorSlice;
 class Dimension;
 class LColor_color;
-class Painter;
 class ParagraphList;
-class Row;
 
 
 /**
@@ -42,8 +40,8 @@ public:
        explicit InsetText(BufferParams const &);
        ///
        InsetText();
-       /// empty inset to empty par, or just mark as erased
-       void clear(bool just_mark_erased);
+       /// empty inset to empty par
+       void clear();
        ///
        void read(Buffer const & buf, LyXLex & lex);
        ///
@@ -102,12 +100,15 @@ public:
        /// Appends \c list with all labels found within this inset.
        void getLabelList(Buffer const &, std::vector<std::string> & list) const;
        ///
-       LyXText * getText(int) const;
+       LyXText * getText(int i) const {
+               return (i == 0) ? const_cast<LyXText*>(&text_) : 0;
+       }
        ///
        bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
 
        /// mark as erased for change tracking
-       void markErased() { clear(true); }
+       void markErased(bool erased);
+
        /**
         * Mark as new. Used when pasting in tabular, and adding rows
         * or columns. Note that pasting will ensure that tracking already
@@ -138,27 +139,20 @@ public:
        bool insetAllowed(Code) const { return true; }
        ///
        bool allowSpellCheck() const { return true; }
+       /// should paragraph indendation be ommitted in any case?
+       bool neverIndent() const;
        ///
        InsetText(InsetText const &);
 
 protected:
        ///
        virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
-private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
 
+private:
        ///
-       void updateLocal(LCursor &);
+       virtual std::auto_ptr<InsetBase> doClone() const;
        ///
        void init();
-       ///
-       void setCharFont(Buffer const &, int pos, LyXFont const & font);
-       ///
-       void removeNewlines();
-       ///
-       void drawFrame(Painter &, int x, int y) const;
-       ///
-       void clearInset(Painter &, int x, int y) const;
 
        ///
        bool drawFrame_;