|
Public Types |
enum | {
NORMAL_CURSOR,
CARET_CURSOR,
DIM_CURSOR,
BLOCK_CURSOR,
HEAVY_CURSOR
} |
enum | { CURSOR_POS,
CHARACTER_POS
} |
enum | { DRAG_CHAR,
DRAG_WORD,
DRAG_LINE
} |
enum | { ATTR_NONE,
ATTR_UNDERLINE,
ATTR_HIDDEN
} |
Public Member Functions |
| TextDisplay (int X, int Y, int W, int H, const char *l=0) |
int | size () const |
const char * | text () const |
void | text (const char *v) |
void | static_text (const char *v) |
char | at (int i) const |
virtual int | handle (int e) |
virtual void | draw () |
virtual void | layout () |
void | buffer (TextBuffer *buf) |
void | buffer (TextBuffer &buf) |
TextBuffer * | buffer () |
const TextBuffer * | buffer () const |
void | append (const char *text) |
void | insert (const char *text) |
void | overstrike (const char *text) |
void | insert_position (int newPos) |
int | insert_position () const |
void | show_insert_position () |
void | show_cursor (bool b=true) |
void | hide_cursor () |
bool | cursor_on () const |
void | cursor_style (int style) |
Color | cursor_color () const |
void | cursor_color (Color n) |
int | word_start (int pos) |
int | word_end (int pos) |
void | next_word (void) |
void | previous_word (void) |
void | wrap_mode (bool wrap, int wrap_margin=0) |
void | linenumber_width (int width) |
int | linenumber_width () const |
void | highlight_data (TextBuffer *styleBuffer, StyleTableEntry *styleTable, int nStyles, char unfinishedStyle, UnfinishedStyleCb unfinishedHighlightCB, void *cbArg) |
bool | move_right () |
bool | move_left () |
bool | move_up () |
bool | move_down () |
void | redisplay_range (int start, int end) |
void | scroll (int topLineNum, int horizOffset) |
bool | in_selection (int x, int y) |
int | line_start (int pos) |
int | line_end (int pos, bool start_pos_is_line_start=false) |
int | visible_lines () const |
int | top_line () const |
int | hor_offset () const |
int | find_next_char (int pos) |
int | find_prev_char (int pos) |
int | xy_to_position (int X, int Y, int PosType=CHARACTER_POS) |
void | xy_to_rowcol (int X, int Y, int *row, int *column, int PosType=CHARACTER_POS) |
bool | position_to_xy (int pos, int *X, int *Y) |
int | total_lines () |
Protected Member Functions |
void | draw_text (int X, int Y, int W, int H) |
void | draw_range (int start, int end) |
void | draw_cursor (int, int) |
void | draw_string (int style, int x, int y, int toX, const char *string, int nChars) |
void | draw_vline (int visLineNum, int leftClip, int rightClip, int leftCharIndex, int rightCharIndex) |
void | draw_line_numbers (bool clearAll) |
void | clear_rect (int style, int x, int y, int width, int height) |
void | display_insert () |
int | count_lines (int start, int end, bool start_pos_is_line_start) |
int | skip_lines (int startPos, int nLines, bool startPosIsLineStart) |
int | rewind_lines (int startPos, int nLines) |
int | position_style (int lineStartPos, int lineLen, int lineIndex, int dispIndex) |
int | wrapped_column (int row, int column) |
int | wrapped_row (int row) |
void | offset_line_starts (int newTopLineNum) |
void | calc_line_starts (int startLine, int endLine) |
void | update_line_starts (int pos, int charsInserted, int charsDeleted, int linesInserted, int linesDeleted, bool *scrolled) |
void | calc_last_char () |
bool | position_to_line (int pos, int *lineNum) |
int | string_width (const char *string, int length, int style) |
void | update_v_scrollbar () |
void | update_h_scrollbar (int longestvline=0) |
void | blank_cursor_protrusions () |
int | measure_vline (int visLineNum) |
int | longest_vline () |
int | empty_vlines () |
int | vline_length (int visLineNum) |
void | maintain_absolute_top_line_number (bool state) |
int | get_absolute_top_line_number () |
void | absolute_top_line_number (int oldFirstChar) |
int | maintaining_absolute_top_line_number () |
void | reset_absolute_top_line_number () |
bool | position_to_linecol (int pos, int *lineNum, int *column) |
void | scroll_ (int topLineNum, int horizOffset) |
void | extend_range_for_styles (int *start, int *end) |
void | find_wrap_range (const char *deletedText, int pos, int nInserted, int nDeleted, int *modRangeStart, int *modRangeEnd, int *linesInserted, int *linesDeleted) |
void | measure_deleted_lines (int pos, int nDeleted) |
void | wrapped_line_counter (TextBuffer *buf, int startPos, int maxPos, int maxLines, bool startPosIsLineStart, int styleBufOffset, int *retPos, int *retLines, int *retLineStart, int *retLineEnd, bool countLastLineMissingNewLine=true) |
void | find_line_end (int pos, bool start_pos_is_line_start, int *lineEnd, int *nextLineStart) |
int | measure_proportional_character (TextBuffer *buf, int bufpos, int colNum, int pos) |
int | wrap_uses_character (int lineEndPos) |
int | range_touches_selection (TextSelection *sel, int rangeStart, int rangeEnd) |
void | text_drag_me (int pos) |
Static Protected Member Functions |
void | buffer_predelete_cb (int pos, int nDeleted, void *cbArg) |
void | buffer_modified_cb (int pos, int nInserted, int nDeleted, int nRestyled, const char *deletedText, void *cbArg) |
void | h_scrollbar_cb (Scrollbar *w, TextDisplay *d) |
void | v_scrollbar_cb (Scrollbar *w, TextDisplay *d) |
Protected Attributes |
int | damage_range1_start |
int | damage_range1_end |
int | damage_range2_start |
int | damage_range2_end |
int | cursor_pos_ |
bool | cursor_on_ |
int | cursor_oldx_ |
int | cursor_oldy_ |
int | cursor_hint_ |
int | cursor_style_ |
int | cursor_preferred_col_ |
int | visiblelines_cnt_ |
int | bufferlines_cnt_ |
TextBuffer * | buffer_ |
TextBuffer * | stylebuffer_ |
int | firstchar_ |
int | lastchar_ |
bool | own_buffer |
bool | continuous_wrap_ |
int | wrapmargin_ |
int * | linestarts_ |
int | topline_num_ |
int | abs_topline_num_ |
bool | need_abs_topline_num_ |
int | horiz_offset_ |
int | numstyles_ |
const StyleTableEntry * | styletable_ |
char | unfinished_style_ |
UnfinishedStyleCb | unfinished_highlight_cb_ |
void * | highlight_cbarg_ |
int | fixed_fontwidth_ |
bool | suppressresync_ |
int | nlinesdeleted_ |
int | stdfontwidth_ |
int | ascent_ |
int | descent_ |
int | maxsize_ |
Color | cursor_color_ |
Scrollbar * | hscrollbar |
Scrollbar * | vscrollbar |
Rectangle | text_area |
int | dragpos_ |
int | dragtype_ |
int | dragging_ |
int | linenumleft_ |
int | linenumwidth_ |