- 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;
+ ///
+ 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;
+