]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
more changes, read the Changelog
[lyx.git] / src / lyxtext.h
index d2ea4a6a86273352b58e9aebcdcc4d98788216c3..48832114470bdb6f509a54057150b8e39aea47a3 100644 (file)
 #include "lyxcursor.h"
 #include "lyxparagraph.h"
 #include "layout.h"
-#include "insets/insettext.h"
 
 class Buffer;
 class BufferParams;
 class Row;
 class BufferView;
+class InsetText;
 
 
 /**
@@ -63,11 +63,17 @@ public:
        mutable int number_of_rows;
        ///
        mutable long height;
-       mutable long width;
+       mutable unsigned int width;
        /// the current font settings
        mutable LyXFont current_font;
        /// the current font
        mutable LyXFont real_current_font;
+       /// first visible pixel-row is set from LyXScreen!!!
+       unsigned long first;
+       ///
+       BufferView * bv_owner;
+       ///
+       InsetText * inset_owner;
 
        ///
        //      void owner(BufferView *);
@@ -189,6 +195,7 @@ public:
         */
        Row * GetRow(LyXParagraph * par,
                     LyXParagraph::size_type pos, long & y) const;
+
        /** returns the height of a default row, needed  for scrollbar
         */
        int DefaultHeight() const;
@@ -224,7 +231,7 @@ public:
        LyXCursor toggle_end_cursor;
    
        /// need the selection cursor:
-       void SetSelection(BufferView *);
+       void SetSelection();
        ///
        void ClearSelection() const;
        ///
@@ -325,7 +332,7 @@ public:
          solution but faster.
         */
        void GetVisibleRow(BufferView *, int y_offset, int x_offset,
-                          Row * row_ptr, long y);
+                          Row * row_ptr, long y, bool cleared=false);
 
        /* footnotes: */
        ///
@@ -423,8 +430,8 @@ public:
 
        /* for the greater insets */
   
-       /// returns 0 if inset wasn't found
-       int UpdateInset(BufferView *, Inset * inset);
+       /// returns false if inset wasn't found
+       bool UpdateInset(BufferView *, Inset *);
        ///
        void CheckParagraph(BufferView *, LyXParagraph * par,
                            LyXParagraph::size_type pos);
@@ -538,10 +545,6 @@ private:
        ///
        void init();
        ///
-       BufferView * bv_owner;
-       ///
-       InsetText * inset_owner;
-       ///
        mutable Row * firstrow;
        ///
        mutable Row * lastrow;
@@ -607,7 +610,7 @@ private:
        ///
        void draw(BufferView *, Row const * row,
                  LyXParagraph::size_type & pos,
-                 int offset, float & x);
+                 int offset, float & x, bool cleared);
 
        /// get the next breakpoint in a given paragraph
        LyXParagraph::size_type NextBreakPoint(BufferView *, Row const * row,