]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
add missing writeNormal() methods to some insets
[lyx.git] / src / lyxtext.h
index 8e35b20d518104ad3ea0fece4d3b04b5a80adaa2..32b8a7d344757b4f468ecfa1c2be29168c147b5c 100644 (file)
@@ -194,7 +194,7 @@ public:
        ///
        mutable Row * refresh_row;
        ///
-       int refresh_pos;
+       Paragraph::size_type refresh_pos;
 
        /// give and set the LyXText status
        text_status status() const;
@@ -217,8 +217,8 @@ public:
        /** returns the column near the specified x-coordinate of the row 
         x is set to the real beginning of this column
         */ 
-       int getColumnNearX(BufferView *, Row * row,
-                          int & x, bool & boundary) const;
+       Paragraph::size_type getColumnNearX(BufferView *, Row * row,
+                                           int & x, bool & boundary) const;
        
        /** returns a pointer to a specified row. y is set to the beginning
         of the row
@@ -239,9 +239,9 @@ public:
          Since the LyXText now has been moved from Buffer to BufferView
          it should not be absolutely needed to move the cursor...
          */
-       mutable LyXCursor cursor;
+       mutable LyXCursor cursor; // actual cursor position
 
-       /** The structrue that keeps track of the selections set. */
+       /** The structure that keeps track of the selections set. */
        struct Selection {
                Selection() 
                        : set_(false), mark_(false)
@@ -258,9 +258,10 @@ public:
                void mark(bool m) {
                        mark_ = m;
                }
-               LyXCursor cursor;
-               LyXCursor start;
-               LyXCursor end;
+               LyXCursor cursor; // temporary cursor to hold a cursor position
+                                 // until setSelection is called!
+               LyXCursor start;  // start of a REAL selection
+               LyXCursor end;    // end of a REAL selection
        private:
                bool set_; // former selection
                bool mark_; // former mark_set
@@ -268,12 +269,12 @@ public:
        };
        mutable Selection selection;
 
-       /// needed for the toggling
-       LyXCursor last_sel_cursor;
-       ///
-       LyXCursor toggle_cursor;
-       ///
-       LyXCursor toggle_end_cursor;
+       /// needed for the toggling (cursor position on last selection made)
+       mutable LyXCursor last_sel_cursor; 
+       /// needed for toggling the selection in screen.C
+       mutable LyXCursor toggle_cursor;
+       /// needed for toggling the selection in screen.C
+       mutable LyXCursor toggle_end_cursor;
    
        /// need the selection cursor:
        void setSelection(BufferView *);
@@ -295,7 +296,7 @@ public:
         to the beginning of this word. 
         With SelectSelectedWord can this be highlighted really
         */ 
-       string const selectNextWord(BufferView *, float & value) const;
+       string const selectNextWordToSpellcheck(BufferView *, float & value) const;
        ///
        void selectSelectedWord(BufferView *);
        ///
@@ -465,6 +466,8 @@ public:
        ///
        int workWidth(BufferView *) const;
        ///
+       int workWidth(BufferView *, Inset * inset) const;
+       ///
        void computeBidiTables(Buffer const *, Row * row) const;
 
        /// Maps positions in the visual string to positions in logical string.
@@ -543,6 +546,12 @@ private:
                            float & fill_label_hfill,
                            bool bidi = true) const;
 
+       // fix the cursor `cur' after a characters has been deleted at `where'
+       // position. Called by deleteEmptyParagraphMechanism
+       void fixCursorAfterDelete(BufferView * bview,
+                                 LyXCursor & cur,
+                                 LyXCursor const & where) const;
+       
        ///
        void deleteEmptyParagraphMechanism(BufferView *,
                                           LyXCursor const & old_cursor) const;
@@ -655,9 +664,9 @@ public:
        ///
        Paragraph * ownerParagraph() const;
        //
-       Paragraph * ownerParagraph(Paragraph *) const;
+       void ownerParagraph(Paragraph *) const;
        // set it searching first for the right owner using the paragraph id
-       Paragraph * ownerParagraph(int id, Paragraph *) const;
+       void ownerParagraph(int id, Paragraph *) const;
 };