]> git.lyx.org Git - lyx.git/blobdiff - src/Row.h
fix warning
[lyx.git] / src / Row.h
index a3afad4c1164a3f646f36f0753e8615844561194..f053b4c5a9913106237a17143cdbab07b9519917 100644 (file)
--- a/src/Row.h
+++ b/src/Row.h
@@ -22,6 +22,8 @@
 
 namespace lyx {
 
+class DocIterator;
+
 /**
  * An on-screen row of text. A paragraph is broken into a
  * RowList for display. Each Row contains position pointers
@@ -45,7 +47,13 @@ public:
          * 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.
+       void setSelectionAndMargins(DocIterator const & beg, 
+               DocIterator const & end) const;
+       
        ///
        void pos(pos_type p);
        ///
@@ -80,7 +88,21 @@ public:
        mutable pos_type sel_beg;
        ///
        mutable pos_type sel_end;
+       ///
+       mutable bool left_margin_sel;
+       ///
+       mutable bool right_margin_sel;
+
 private:
+       /// Decides whether the margin is selected.
+       /**
+         * \param margin_begin
+         * \param beg
+         * \param end
+         */
+       bool isMarginSelected(bool left_margin, DocIterator const & beg,
+               DocIterator const & end) const;
+
        /// has the Row appearance changed since last drawing?
        mutable bool changed_;
        /// CRC of row contents.