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 ++++++++++++++++++++++++++++++++++++++ documentation/Fl_Text_Editor.html | 37 ++++++++++++++++++++++++++ documentation/basics.html | 16 +++++++++++ 3 files changed, 107 insertions(+) (limited to 'documentation') 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. diff --git a/documentation/Fl_Text_Editor.html b/documentation/Fl_Text_Editor.html index f849edaf4..a5060e972 100644 --- a/documentation/Fl_Text_Editor.html +++ b/documentation/Fl_Text_Editor.html @@ -73,101 +73,138 @@ class.

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

+

The constructor creates a new text editor widget.

~Fl_Text_Editor();

+

The destructor frees all memory used by the text editor widget.

void add_default_key_bindings(Key_Binding** list);

+

Adds all of the default editor key bindings to the specified key binding list.

void add_key_binding(int key, int state, Key_Func f, Key_Binding** list);
void add_key_binding(int key, int state, Key_Func f);

+

Adds a single key binding to the specified or current key binding list.

Key_Func bound_key_function(int key, int state, Key_Binding* list);
Key_Func bound_key_function(int key, int state);

+

Returns the function associated with a key binding.

void default_key_function(Key_Func f);

+

Sets the default key function for unassigned keys.

void insert_mode(int b);
int insert_mode();

+

Sets or gets the current insert mode; if non-zero, new text +is inserted before the current cursor position. Otherwise, new +text replaces text at the current cursor position.

int kf_backspace(int c, Fl_Text_Editor* e);

+

Does a backspace in the current buffer.

int kf_copy(int c, Fl_Text_Editor* e);

+

Does a copy of selected text in the current buffer.

int kf_c_s_move(int c, Fl_Text_Editor* e);

+

Extends the current selection in the direction indicated by +control key c.

int kf_ctrl_move(int c, Fl_Text_Editor* e);

+

Moves the current text cursor in the direction indicated by +control key c.

int kf_cut(int c, Fl_Text_Editor* e);

+

Does a cut of selected text in the current buffer.

int kf_default(int c, Fl_Text_Editor* e);

+

Inserts the text associated with the key c.

int kf_delete(int c, Fl_Text_Editor* e);

+

Does a delete of selected text or the current character in +the current buffer.

int kf_down(int c, Fl_Text_Editor* e);

+

Moves the text cursor down one line.

int kf_end(int c, Fl_Text_Editor* e);

+

Moves the text cursor to the end of the current line.

int kf_enter(int c, Fl_Text_Editor* e);

+

Inserts a newline at the current cursor position.

int kf_home(int c, Fl_Text_Editor* e);

+

Moves the text cursor to the beginning of the current line.

int kf_ignore(int c, Fl_Text_Editor* e);

+

Ignores the keypress.

int kf_insert(int c, Fl_Text_Editor* e);

+

Toggles the insert mode in the text editor.

int kf_left(int c, Fl_Text_Editor* e);

+

Moves the text cursor to the left in the buffer.

int kf_move(int c, Fl_Text_Editor* e);

+

Moves the text cursor in the direction indicated by key +c.

int kf_page_down(int c, Fl_Text_Editor* e);

+

Moves the text cursor down one page.

int kf_page_up(int c, Fl_Text_Editor* e);

+

Moves the text cursor up one page.

int kf_paste(int c, Fl_Text_Editor* e);

+

Pastes the contents of the clipboard at the current text cursor position.

int kf_right(int c, Fl_Text_Editor* e);

+

Moves the text cursor one character to the right.

int kf_select_all(int c, Fl_Text_Editor* e);

+

Selects all text in the buffer.

int kf_shift_move(int c, Fl_Text_Editor* e);

+

Extends the current selection in the direction of key c.

int kf_up(int c, Fl_Text_Editor* e);

+

Moves the text cursor up one line.

void remove_all_key_bindings(Key_Binding** list);
void remove_all_key_bindings();

+

Removes all of the key bindings associated with the text editor or list.

void remove_key_binding(int key, int state, Key_Binding** list);
void remove_key_binding(int key, int state);

+

Removes a single key binding from the text editor or list. diff --git a/documentation/basics.html b/documentation/basics.html index a92f67f75..10a6b58d0 100644 --- a/documentation/basics.html +++ b/documentation/basics.html @@ -216,6 +216,22 @@ CC ... -L/usr/local/lib -lfltk -lXext -lX11 -lm gcc ... -L/usr/local/lib -lfltk -lXext -lX11 -lm +

Aside from the "fltk" library, there is also a "fltk_forms" +library for the XForms compatibility classes, "fltk_gl" for the +OpenGL and GLUT classes, and "fltk_images" for the image file +classes, Fl_Help_Dialog +widget, and system icon support. + +

+ + + +
Note: +

The libraries are named "fltk.lib", "fltkgl.lib", "fltkforms.lib", + and "fltkimages.lib", respectively under Windows. +

+

As before, the fltk-config script included with FLTK can be used to get the options that are required by your linker:

-- cgit v1.2.3