From 561052191096d72b321f676401fbc8c7476a5990 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 4 Oct 2002 02:30:34 +0000 Subject: Doco updates. Reset cursor when changing the current pane in an Fl_Wizard widget. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2648 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Text_Display.html | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'documentation/Fl_Text_Display.html') diff --git a/documentation/Fl_Text_Display.html b/documentation/Fl_Text_Display.html index 56cd69570..8d17db109 100644 --- a/documentation/Fl_Text_Display.html +++ b/documentation/Fl_Text_Display.html @@ -72,98 +72,152 @@ class.

Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0);

+

Creates a new text display widget.

~Fl_Text_Display();

+

Destroys a text display widget.

void buffer(Fl_Text_Buffer* buf);
void buffer(Fl_Text_Buffer& buf);
Fl_Text_Buffer* buffer();

+

Sets or gets the current text buffer associated with the text widget. +Multiple text widgets can be associated with the same text buffer. +

void cursor_style(int style);

+

Sets the text cursor style to one of the following: + +

void hide_cursor();

+

Hides the text cursor.

void highlight_data(Fl_Text_Buffer *styleBuffer, Style_Table_Entry *styleTable, int nStyles, char unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void *cbArg);

+

Sets the text buffer, text styles, and callbacks to use when +displaying text in the widget. Style buffers cannot be shared +between widgets and are often used to do syntax highlighting. +The editor example from Chapter 4 +shows how to use the highlight_data() method.

int in_selection(int x, int y);

+

Returns non-zero if the specified mouse position is inside the current +selection.

void insert(const char* text);

+

Inserts text at the current insert position.

void insert_position(int newPos);
int insert_position()

+

Sets or gets the current insert position.

int move_down();

+

Moves the current insert position down one line.

int move_left();

+

Moves the current insert position left one character.

int move_right();

+

Moves the current insert position right one character.

int move_up();

+

Moves the current insert position up one line.

void next_word(void);

+

Moves the current insert position right one word.

void overstrike(const char* text);

+

Replaces text at the current insert position.

int position_style(int lineStartPos, int lineLen, int lineIndex, int dispIndex);

+

Returns the style associated with the character at position +lineStartPos + lineIndex.

void previous_word(void);

+

Moves the current insert position left one word.

void redisplay_range(int start, int end);

+

Marks text from start to end as needing a redraw.

void scrollbar_align(Fl_Align a);
Fl_Align scrollbar_align();

+

Sets or gets where scrollbars are attached to the widget - +FL_ALIGN_LEFT and FL_ALIGN_RIGHT for +the vertical scrollbar and FL_ALIGN_TOP and +FL_ALIGN_BOTTOM for the horizontal scrollbar.

void scrollbar_width(int w);
int scrollbar_width();

+

Sets or gets the width/height of the scrollbars.

void scroll(int topLineNum, int horizOffset);

+

Scrolls the current buffer to start at the specified line and column.

void show_cursor(int b = 1);

+

Shows or hides the text cursor.

void show_insert_position();

+

Scrolls the text buffer to show the current insert position.

void textcolor(unsigned n);
Fl_Color textcolor() const;

+

Sets or gets the default color of text in the widget.

void textfont(uchar s);
Fl_Font textfont() const;

+

Sets or gets the default font used when drawing text in the widget.

void textsize(uchar s);
uchar textsize() const;

+

Sets or gets the default size of text in the widget.

int word_end(int pos);

+

Moves the insert position to the end of the current word.

int word_start(int pos);

+

Moves the insert position to the beginning of the current word. -- cgit v1.2.3