X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FRow.h;h=a3afad4c1164a3f646f36f0753e8615844561194;hb=3f7d2a66f522a45583e0a8b0ba734bb71f0ddde0;hp=5b67abba5e463d655edfbb3b3dcf621c5db91634;hpb=26f336769af8dd5c48c2c0241cd3fbfc50a3c65e;p=lyx.git diff --git a/src/Row.h b/src/Row.h index 5b67abba5e..a3afad4c11 100644 --- a/src/Row.h +++ b/src/Row.h @@ -38,9 +38,13 @@ public: /// void setChanged(bool c) { changed_ = c; } /// - void setCrc(size_type crc); - /// - void setSelection(pos_type sel_beg, pos_type sel_end); + void setCrc(size_type crc) const; + /// 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; /// void pos(pos_type p); @@ -68,21 +72,19 @@ public: /// width of a separator (i.e. space) double separator; - /// width of hfills in the body - double hfill; /// width of hfills in the label double label_hfill; /// the x position of the row double x; /// - pos_type sel_beg; + mutable pos_type sel_beg; /// - pos_type sel_end; + mutable pos_type sel_end; private: /// has the Row appearance changed since last drawing? - bool changed_; + mutable bool changed_; /// CRC of row contents. - size_type crc_; + mutable size_type crc_; /// first pos covered by this row pos_type pos_; /// one behind last pos covered by this row