class Fl_Text_Buffer


Class Hierarchy

Include Files

Description

The Fl_Text_Buffer class is used by the Fl_Text_Display and Fl_Text_Editor to manage complex text data and is based upon the excellent NEdit text editor engine - see http://www.nedit.org/.

Methods

Fl_Text_Buffer(int requestedSize = 0);

~Fl_Text_Buffer();

void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg);

void append(const char* text);

int appendfile(const char *file, int buflen = 128*1024);

void call_modify_callbacks();

char character(int pos);

static int character_width(char c, int indent, int tabDist, char nullSubsChar);

void clear_rectangular(int start, int end, int rectStart, int rectEnd);

void copy(Fl_Text_Buffer* fromBuf, int fromStart, int fromEnd, int toPos);

int count_displayed_characters(int lineStartPos, int targetPos);

int count_lines(int startPos, int endPos);

int expand_character(int pos, int indent, char *outStr);
static int expand_character(char c, int indent, char* outStr, int tabDist, char nullSubsChar);

int findchar_backward(int startPos, char searchChar, int* foundPos);

int findchar_forward(int startPos, char searchChar, int* foundPos);

int findchars_backward(int startPos, const char* searchChars, int* foundPos);

int findchars_forward(int startPos, const char* searchChars, int* foundPos);

void highlight(int start, int end);

int highlight_position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd);

void highlight_rectangular(int start, int end, int rectStart, int rectEnd);

Fl_Text_Selection* highlight_selection();

const char* highlight_text();

void insert_column(int column, int startPos, const char* text, int* charsInserted, int* charsDeleted);

int insertfile(const char *file, int pos, int buflen = 128*1024);

void insert(int pos, const char* text);

int length();

int line_end(int pos);

int line_start(int pos);

const char* line_text(int pos);

int loadfile(const char *file, int buflen = 128*1024);

char null_substitution_character();

int outputfile(const char *file, int start, int end, int buflen = 128*1024);

void overlay_rectangular(int startPos, int rectStart, int rectEnd, const char* text, int* charsInserted, int* charsDeleted);

Fl_Text_Selection* primary_selection();

void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg);

void remove_rectangular(int start, int end, int rectStart, int rectEnd);

void remove(int start, int end);

void remove_secondary_selection();

void remove_selection();

void replace_rectangular(int start, int end, int rectStart, int rectEnd, const char* text);

void replace(int start, int end, const char *text);

void replace_secondary_selection(const char* text);

void replace_selection(const char* text);

int rewind_lines(int startPos, int nLines);

int savefile(const char *file, int buflen = 128*1024);

int search_backward(int startPos, const char* searchString, int* foundPos, int matchCase = 0);

int search_forward(int startPos, const char* searchString, int* foundPos, int matchCase = 0);

int secondary_selection_position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd);

Fl_Text_Selection* secondary_selection();

const char* secondary_selection_text();

void secondary_select_rectangular(int start, int end, int rectStart, int rectEnd);

void secondary_select(int start, int end);

void secondary_unselect();

int selected();

int selection_position(int* start, int* end);
int selection_position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd);

const char* selection_text();

void select_rectangular(int start, int end, int rectStart, int rectEnd);

void select(int start, int end);

int skip_displayed_characters(int lineStartPos, int nChars);

int skip_lines(int startPos, int nLines);

int substitute_null_characters(char* string, int length);

int tab_distance();
void tab_distance(int tabDist);

const char* text_in_rectangle(int start, int end, int rectStart, int rectEnd);

const char* text_range(int start, int end);

const char* text();
void text(const char* text);

void unhighlight();

void unselect();

void unsubstitute_null_characters(char* string);

int word_end(int pos);

int word_start(int pos);