#include <Fl_Text_Buffer.H>
Public Member Functions | |
| int | end () const |
| Return the byte ofsset to the character after the last selected character. | |
| int | includes (int pos) const |
Return true if position pos with indentation dispIndex is in the Fl_Text_Selection. | |
| int | position (int *start, int *end) const |
| Return the positions of this selection. | |
| void | selected (bool b) |
| Modify the 'selected' flag. | |
| bool | selected () const |
| Returns true if any text is selected. | |
| void | set (int start, int end) |
| Set the selection range. | |
| int | start () const |
| Return the byte offset to the first selected character. | |
| void | update (int pos, int nDeleted, int nInserted) |
| Updates a selection afer text was modified. | |
Protected Attributes | |
| int | mEnd |
| byte offset to the character after the last selected character | |
| bool | mSelected |
| this flag is set if any text is selected | |
| int | mStart |
| byte offset to the first selected character | |
Friends | |
| class | Fl_Text_Buffer |
This class works correctly with utf-8 strings assuming that the parameters for all calls are on character boundaries.
| int Fl_Text_Selection::end | ( | ) | const [inline] |
Return the byte ofsset to the character after the last selected character.
| int Fl_Text_Selection::position | ( | int * | start, | |
| int * | end | |||
| ) | const |
Return the positions of this selection.
| start | retrun byte offset to first selected character | |
| end | retrun byte offset pointing after last selected character |
| void Fl_Text_Selection::selected | ( | bool | b | ) | [inline] |
Modify the 'selected' flag.
| b | new flag |
| bool Fl_Text_Selection::selected | ( | ) | const [inline] |
Returns true if any text is selected.
| void Fl_Text_Selection::set | ( | int | start, | |
| int | end | |||
| ) |
Set the selection range.
| start | byte offset to first selected character | |
| end | byte offset pointing after last selected character |
| int Fl_Text_Selection::start | ( | ) | const [inline] |
Return the byte offset to the first selected character.
| void Fl_Text_Selection::update | ( | int | pos, | |
| int | nDeleted, | |||
| int | nInserted | |||
| ) |
Updates a selection afer text was modified.
Updates an individual selection for changes in the corresponding text
| pos | byte offset into text buffer at which the change occured | |
| nDeleted | number of bytes deleted from the buffer | |
| nInserted | number of bytes inserted into the buffer |
© 1998-2010 by Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for
any purpose, provided this copyright and permission notice are preserved.