]> git.lyx.org Git - lyx.git/blobdiff - src/Row.h
grammar
[lyx.git] / src / Row.h
index 49513d32b970b63124ce6a3c5290283ab145b317..b54a233b20856184e30b581857000d484ea0d8ec 100644 (file)
--- a/src/Row.h
+++ b/src/Row.h
@@ -163,18 +163,18 @@ public:
        bool changed() const { return changed_; }
        ///
        void changed(bool c) const { changed_ = c; }
-       /// Set the selection begin and end.
-       /**
-         * This is const because we update the selection status only at draw()
-         * time.
-         */
-       void setSelection(pos_type sel_beg, pos_type sel_end) const;
        ///
        bool selection() const;
-       /// Set the selection begin and end and whether the left and/or right
-       /// margins are selected.
+       /**
+        * Set the selection begin and end and whether the left and/or
+        * right margins are selected.
+        * This is const because we update the selection status only at
+        * draw() time.
+        */
        void setSelectionAndMargins(DocIterator const & beg,
                DocIterator const & end) const;
+       /// no selection on this row.
+       void clearSelectionAndMargins() const;
 
        ///
        void pit(pit_type p) { pit_ = p; }
@@ -198,9 +198,9 @@ public:
        bool flushed() const { return flushed_; }
 
        ///
-       Dimension const & dimension() const { return dim_; }
+       Dimension const & dim() const { return dim_; }
        ///
-       Dimension & dimension() { return dim_; }
+       Dimension & dim() { return dim_; }
        ///
        int height() const { return dim_.height(); }
        /// The width of the row, including the left margin, but not the right one.
@@ -210,6 +210,11 @@ public:
        ///
        int descent() const { return dim_.des; }
 
+       ///
+       Dimension const & contents_dim() const { return contents_dim_; }
+       ///
+       Dimension & contents_dim() { return contents_dim_; }
+
        /// The offset of the left-most cursor position on the row
        int left_x() const;
        /// The offset of the right-most cursor position on the row
@@ -261,8 +266,6 @@ public:
        Element const & back() const { return elements_.back(); }
        /// remove last element
        void pop_back();
-       /// remove all row elements
-       void clear() { elements_.clear(); }
        /**
         * if row width is too large, remove all elements after last
         * separator and update endpos if necessary. If all that
@@ -321,8 +324,10 @@ private:
          * \param beg
          * \param end
          */
-       bool isMarginSelected(bool left_margin, DocIterator const & beg,
+       bool isMarginSelected(bool left, DocIterator const & beg,
                DocIterator const & end) const;
+       /// Set the selection begin and end.
+       void setSelection(pos_type sel_beg, pos_type sel_end) const;
 
        /**
         * Returns true if a char or string with font \c f and change
@@ -348,6 +353,8 @@ private:
        bool flushed_;
        /// Row dimension.
        Dimension dim_;
+       /// Row contents dimension. Does not contain the space above/below row.
+       Dimension contents_dim_;
        /// true when this row lives in a right-to-left paragraph
        bool rtl_;
        /// true when a changebar should be drawn in the margin