As a preamble, the most important remark is that you should never declare methods and members in a commit and implement them in anothe rone. Each commit should be self contained and leave the trunk compilable. The idea is not to commit file-by-file, but function-by-function.

JMarc

+++ b/src/Cursor.h
@@ -60,6 +60,8 @@ DocIterator

 #include "mathed/MathParser_flags.h"

+//#include "Row.h"
+

This should not be here.

Concerning the rest of the code below, I have already explained my concerns:
* do not declare const functions that are not const, unless you have a very good reason. At worst, it is better to declare some variables as mutable.
* rename tooWideRow, which is misleading.

 namespace lyx {

@@ -224,6 +226,15 @@ public:
        void getSurroundingPos(pos_type & left_pos, pos_type & right_pos);
        /// the row in the paragraph we're in
        Row const & textRow() const;
+       /// returns the pixel value at the left edge of the screen
+       int getLeftEdge() const;
+       /// set the pixel value at the left edge of the screen
+       void setLeftEdge(int leftEdge) const;
+       void setLeftEdge(int leftEdge);
+       /// returns the row which slid finally
+       Row const & getToowideRow();
+       /// set the row which slid finally
+       void setToowideRow(Row & wideRow) const;

        //
        // common part
@@ -281,6 +292,8 @@ public:
        int x_target() const;
        /// set targetX to current position
        void setTargetX();
+       /// set targetX to current position
+       void setTargetX() const;
        /// clear targetX, i.e. set it to -1
        void clearTargetX();
        /// set offset to actual position - targetX
@@ -436,6 +449,10 @@ private:
        /// cursor screen coordinates before dispatch started
        int beforeDispatchPosX_;
        int beforeDispatchPosY_;
+       /// the value of the offset for the row the cursor is in
+       int left_edge_;
+ /// a pointer to the row the cursor was in when applying a too wide offset.
+       Row * too_wide_row_;


Reply via email to