///
CHANGED_IN_DRAW
};
+ ///
+ enum word_location {
+ /// the word around the cursor
+ WHOLE_WORD,
+ /// the word begining from the cursor position
+ PARTIAL_WORD,
+ /// the next word (not yet used)
+ NEXT_WORD
+ };
/// Constructor
LyXText(BufferView *);
*/
mutable LyXCursor cursor;
-#if 0
- /* the selection cursor */
- ///
- mutable bool selection;
- ///
- mutable bool mark_set;
-
- ///
- mutable LyXCursor sel_cursor;
- ///
- mutable LyXCursor sel_start_cursor;
- ///
- mutable LyXCursor sel_end_cursor;
-#else
/** The structrue that keeps track of the selections set. */
struct Selection {
bool set() const {
};
mutable Selection selection;
-#endif
+
/// needed for the toggling
LyXCursor last_sel_cursor;
///
///
string const selectionAsString(Buffer const *) const;
+ /// select the word we need depending on word_location
+ void getWord(LyXCursor & from, LyXCursor & to, word_location) const;
/// just selects the word the cursor is in
void selectWord(BufferView *);
///
void cursorLeftOneWord(BufferView *) const;
///
+ void cursorLeftOneWord(LyXCursor &) const;
+ ///
void cursorRightOneWord(BufferView *) const;
///
void cursorUpParagraph(BufferView *) const;
text_uppercase = 2
};
/// Change the case of the word at cursor position.
- void changeWordCase(BufferView *, TextCase action);
+ void changeCase(BufferView *, TextCase action);
+ ///
+ void changeRegionCase(BufferView * bview,
+ LyXCursor const & from,
+ LyXCursor const & to,
+ LyXText::TextCase action);
///
void transposeChars(BufferView const &);