- lyx::pos_type getColumnNearX(Row * row,
- int & x, bool & boundary) const;
-
- /** returns a pointer to a specified row. y is set to the beginning
- of the row
- */
- Row * getRow(Paragraph * par, lyx::pos_type pos, int & y) const;
- /** returns the firstrow, this could be done with the above too but
- IMO it's stupid to have to allocate a dummy y all the time I need
- the first row
- */
- Row * firstRow() const { return firstrow; }
-
- /** The cursor.
- Later this variable has to be removed. There should be now internal
- cursor in a text (and thus not in a buffer). By keeping this it is
- (I think) impossible to have several views with the same buffer, but
- the cursor placed at different places.
- [later]
- Since the LyXText now has been moved from Buffer to BufferView
- it should not be absolutely needed to move the cursor...
- */
- LyXCursor cursor; // actual cursor position
-
- /** The structure that keeps track of the selections set. */
- struct Selection {
- Selection()
- : set_(false), mark_(false)
- {}
- bool set() const {
- return set_;
- }
- void set(bool s) {
- set_ = s;
- }
- bool mark() const {
- return mark_;
- }
- void mark(bool m) {
- mark_ = m;
- }
- LyXCursor cursor; // temporary cursor to hold a cursor position
- // until setSelection is called!
- LyXCursor start; // start of a REAL selection
- LyXCursor end; // end of a REAL selection
- private:
- bool set_; // former selection
- bool mark_; // former mark_set
-
- };
- Selection selection;
- // this is used to handle XSelection events in the right manner
- Selection xsel_cache;
-
- /// needed for the toggling (cursor position on last selection made)
- LyXCursor last_sel_cursor;
- /// needed for toggling the selection in screen.C
- LyXCursor toggle_cursor;
- /// needed for toggling the selection in screen.C
- LyXCursor toggle_end_cursor;