]> git.lyx.org Git - features.git/blobdiff - src/Row.h
Fix various selection-related problems
[features.git] / src / Row.h
index 2282c82d93eac822105e8b2317f8f442117dbffb..7725427b9be615d286e9ba0165fea49ba1f07c52 100644 (file)
--- a/src/Row.h
+++ b/src/Row.h
@@ -66,7 +66,7 @@ public:
                // returns total width of element, including separator overhead
                double width() const { return dim.wid + extra; };
                // returns position in pixels (from the left) of position
-               // \param i in the row element
+               // \param i in the row element.
                double pos2x(pos_type const i) const;
 
                /** Return character position that is the closest to
@@ -77,6 +77,11 @@ public:
                */
                pos_type x2pos(double &x, bool low = false) const;
 
+               // Returns the position on left side of the element.
+               pos_type left_pos() const;
+               // Returns the position on right side of the element.
+               pos_type right_pos() const;
+
                // The kind of row element
                Type type;
                // position of the element in the paragraph
@@ -186,6 +191,10 @@ public:
        ///
        bool empty() const { return elements_.empty(); }
        ///
+       Element & front() { return elements_.front(); }
+       ///
+       Element const & front() const { return elements_.front(); }
+       ///
        Element & back() { return elements_.back(); }
        ///
        Element const & back() const { return elements_.back(); }
@@ -196,7 +205,7 @@ public:
        /**
         * if row width is too large, remove all elements after last
         * separator and update endpos if necessary. If all that
-        * rename is a large word, cut it to \param width.
+        * remains is a large word, cut it to \param width.
         * \param body_pos minimum amount of text to keep.
         * \param width maximum width of the row
         */