|
void | add_modify_callback (Fl_Text_Modify_Cb bufModifiedCB, void *cbArg) |
| Adds a callback function that is called whenever the text buffer is modified. More...
|
|
void | add_predelete_callback (Fl_Text_Predelete_Cb bufPredelCB, void *cbArg) |
| Adds a callback routine to be called before text is deleted from the buffer.
|
|
char * | address (int pos) |
| Convert a byte offset in buffer into a memory address. More...
|
|
const char * | address (int pos) const |
| Convert a byte offset in buffer into a memory address. More...
|
|
void | append (const char *t) |
| Appends the text string to the end of the buffer. More...
|
|
int | appendfile (const char *file, int buflen=128 *1024) |
| Appends the named file to the end of the buffer. More...
|
|
char | byte_at (int pos) const |
| Returns the raw byte at the specified position pos in the buffer. More...
|
|
void | call_modify_callbacks () |
| Calls all modify callbacks that have been registered using the add_modify_callback() method.
|
|
void | call_predelete_callbacks () |
| Calls the stored pre-delete callback procedure(s) for this buffer to update the changed area(s) on the screen and any other listeners.
|
|
void | canUndo (char flag=1) |
| Lets the undo system know if we can undo changes.
|
|
unsigned int | char_at (int pos) const |
| Returns the character at the specified position pos in the buffer. More...
|
|
void | copy (Fl_Text_Buffer *fromBuf, int fromStart, int fromEnd, int toPos) |
| Copies text from another Fl_Text_Buffer to this one. More...
|
|
int | count_displayed_characters (int lineStartPos, int targetPos) const |
| Count the number of displayed characters between buffer position lineStartPos and targetPos . More...
|
|
int | count_lines (int startPos, int endPos) const |
| Counts the number of newlines between startPos and endPos in buffer. More...
|
|
int | findchar_backward (int startPos, unsigned int searchChar, int *foundPos) const |
| Search backwards in buffer buf for character searchChar , starting with the character before startPos , returning the result in foundPos . More...
|
|
int | findchar_forward (int startPos, unsigned searchChar, int *foundPos) const |
| Finds the next occurrence of the specified character. More...
|
|
| Fl_Text_Buffer (int requestedSize=0, int preferredGapSize=1024) |
| Create an empty text buffer of a pre-determined size. More...
|
|
int | highlight () |
| Returns the highlighted text. More...
|
|
void | highlight (int start, int end) |
| Highlights the specified text within the buffer.
|
|
int | highlight_position (int *start, int *end) |
| Highlights the specified text between start and end within the buffer.
|
|
const Fl_Text_Selection * | highlight_selection () const |
| Returns the current highlight selection.
|
|
char * | highlight_text () |
| Returns the highlighted text. More...
|
|
void | insert (int pos, const char *text) |
| Inserts null-terminated string text at position pos . More...
|
|
int | insertfile (const char *file, int pos, int buflen=128 *1024) |
| Inserts a file at the specified position. More...
|
|
int | length () const |
| Returns the number of bytes in the buffer. More...
|
|
int | line_end (int pos) const |
| Finds and returns the position of the end of the line containing position pos (which is either a pointer to the newline character ending the line or a pointer to one character beyond the end of the buffer). More...
|
|
int | line_start (int pos) const |
| Returns the position of the start of the line containing position pos . More...
|
|
char * | line_text (int pos) const |
| Returns the text from the entire line containing the specified character position. More...
|
|
int | loadfile (const char *file, int buflen=128 *1024) |
| Loads a text file into the buffer. More...
|
|
int | next_char (int ix) const |
| Returns the index of the next character. More...
|
|
int | next_char_clipped (int ix) const |
|
int | outputfile (const char *file, int start, int end, int buflen=128 *1024) |
| Writes the specified portions of the text buffer to a file. More...
|
|
int | prev_char (int ix) const |
| Returns the index of the previous character. More...
|
|
int | prev_char_clipped (int ix) const |
|
Fl_Text_Selection * | primary_selection () |
| Returns the primary selection.
|
|
const Fl_Text_Selection * | primary_selection () const |
| Returns the primary selection.
|
|
void | remove (int start, int end) |
| Deletes a range of characters in the buffer. More...
|
|
void | remove_modify_callback (Fl_Text_Modify_Cb bufModifiedCB, void *cbArg) |
| Removes a modify callback.
|
|
void | remove_predelete_callback (Fl_Text_Predelete_Cb predelCB, void *cbArg) |
| Removes a callback routine bufPreDeleteCB associated with argument cbArg to be called before text is deleted from the buffer.
|
|
void | remove_secondary_selection () |
| Removes the text from the buffer corresponding to the secondary text selection object.
|
|
void | remove_selection () |
| Removes the text in the primary selection.
|
|
void | replace (int start, int end, const char *text) |
| Deletes the characters between start and end , and inserts the null-terminated string text in their place in the buffer. More...
|
|
void | replace_secondary_selection (const char *text) |
| Replaces the text from the buffer corresponding to the secondary text selection object with the new string text .
|
|
void | replace_selection (const char *text) |
| Replaces the text in the primary selection.
|
|
int | rewind_lines (int startPos, int nLines) |
| Finds and returns the position of the first character of the line nLines backwards from startPos (not counting the character pointed to by startpos if that is a newline) in the buffer. More...
|
|
int | savefile (const char *file, int buflen=128 *1024) |
| Saves a text file from the current buffer. More...
|
|
int | search_backward (int startPos, const char *searchString, int *foundPos, int matchCase=0) const |
| Search backwards in buffer for string searchString , starting with the character at startPos , returning the result in foundPos . More...
|
|
int | search_forward (int startPos, const char *searchString, int *foundPos, int matchCase=0) const |
| Search forwards in buffer for string searchString , starting with the character startPos , and returning the result in foundPos . More...
|
|
void | secondary_select (int start, int end) |
| Selects a range of characters in the secondary selection.
|
|
int | secondary_selected () |
| Returns a non-zero value if text has been selected in the secondary text selection, 0 otherwise.
|
|
const Fl_Text_Selection * | secondary_selection () const |
| Returns the secondary selection.
|
|
int | secondary_selection_position (int *start, int *end) |
| Returns the current selection in the secondary text selection object.
|
|
char * | secondary_selection_text () |
| Returns the text in the secondary selection. More...
|
|
void | secondary_unselect () |
| Clears any selection in the secondary text selection object.
|
|
void | select (int start, int end) |
| Selects a range of characters in the buffer.
|
|
int | selected () const |
| Returns a non-zero value if text has been selected, 0 otherwise.
|
|
int | selection_position (int *start, int *end) |
| Gets the selection position.
|
|
char * | selection_text () |
| Returns the currently selected text. More...
|
|
int | skip_displayed_characters (int lineStartPos, int nChars) |
| Count forward from buffer position startPos in displayed characters. More...
|
|
int | skip_lines (int startPos, int nLines) |
| Finds the first character of the line nLines forward from startPos in the buffer and returns its position.
|
|
int | tab_distance () const |
| Gets the tab width. More...
|
|
void | tab_distance (int tabDist) |
| Set the hardware tab distance (width) used by all displays for this buffer, and used in computing offsets for rectangular selection operations.
|
|
char * | text () const |
| Get a copy of the entire contents of the text buffer. More...
|
|
void | text (const char *text) |
| Replaces the entire contents of the text buffer. More...
|
|
char * | text_range (int start, int end) const |
| Get a copy of a part of the text buffer. More...
|
|
int | undo (int *cp=0) |
| Undo text modification according to the undo variables or insert text from the undo buffer.
|
|
void | unhighlight () |
| Unhighlights text in the buffer.
|
|
void | unselect () |
| Cancels any previous selection on the primary text selection object.
|
|
int | utf8_align (int) const |
| Align an index into the buffer to the current or previous UTF-8 boundary.
|
|
int | word_end (int pos) const |
| Returns the position corresponding to the end of the word. More...
|
|
int | word_start (int pos) const |
| Returns the position corresponding to the start of the word. More...
|
|
| ~Fl_Text_Buffer () |
| Frees a text buffer.
|
|