REFRESH_AREA = 2
};
- ///
- enum word_location {
- // the word around the cursor, only if the cursor is
- //not at a boundary
- WHOLE_WORD_STRICT,
- // the word around the cursor
- WHOLE_WORD,
- /// the word begining from the cursor position
- PARTIAL_WORD,
- /// the word around the cursor or before the cursor
- PREVIOUS_WORD,
- /// the next word (not yet used)
- NEXT_WORD
- };
-
/// Constructor
LyXText(BufferView *);
/// sets inset as owner
LyXText(BufferView *, InsetText *);
- void init(BufferView *, bool reinit = false);
+ void init(BufferView *);
///
int height;
///
refresh_status refresh_status_;
+public:
/// only the top-level LyXText has this non-zero
BufferView * bv_owner;
+private:
/// returns a pointer to a specified row.
RowList::iterator
getRow(ParagraphList::iterator pit, lyx::pos_type pos) const;
RowList::iterator getRow(LyXCursor const & cursor) const;
/// convenience
RowList::iterator cursorRow() const;
-
+
/** returns a pointer to the row near the specified y-coordinate
(relative to the whole text). y is set to the real beginning
of this row
return rowlist_;
}
-
+
/// need the selection cursor:
void setSelection();
///
void clearSelection();
/// select the word we need depending on word_location
- void getWord(LyXCursor & from, LyXCursor & to,
- word_location const);
+ void getWord(LyXCursor & from, LyXCursor & to, lyx::word_location const);
/// just selects the word the cursor is in
- void selectWord(word_location const);
+ void selectWord(lyx::word_location loc);
/// returns the inset at cursor (if it exists), 0 otherwise
Inset * getInset() const;
///
void backspace();
///
- bool selectWordWhenUnderCursor(word_location);
+ bool selectWordWhenUnderCursor(lyx::word_location);
///
enum TextCase {
///
private:
///
mutable RowList rowlist_;
- ///
- void cursorLeftOneWord(LyXCursor &);
///
float getCursorX(RowList::iterator rit, lyx::pos_type pos,