X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FRow.h;h=c26752bde861c7c557630cc3ba41938612dc242b;hb=13739f37d5208e87e97c44ef2eeba35807ddb9c5;hp=a3afad4c1164a3f646f36f0753e8615844561194;hpb=a837d22ab95e181fa55c9d7665eb9ca6065babcb;p=lyx.git diff --git a/src/Row.h b/src/Row.h index a3afad4c11..c26752bde8 100644 --- a/src/Row.h +++ b/src/Row.h @@ -5,7 +5,7 @@ * Licence details can be found in the file COPYING. * * \author Matthias Ettrich - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. * @@ -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 @@ -32,8 +34,6 @@ public: /// Row(); /// - Row(pos_type pos); - /// bool changed() const { return changed_; } /// void setChanged(bool c) { changed_ = c; } @@ -45,7 +45,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 +86,21 @@ public: mutable pos_type sel_beg; /// mutable pos_type sel_end; + /// + mutable bool begin_margin_sel; + /// + mutable bool end_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.