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
This commit is contained in:
Michael R Sweet 2002-10-04 02:30:34 +00:00
parent 14f4321330
commit 5610521910
6 changed files with 119 additions and 18 deletions

View File

@ -1,5 +1,5 @@
README.mac - 12/20/2001 - Building FLTK under MacOS 8, 9, and X
---------------------------------------------------------------
README.mac - 10/03/2002 - Building FLTK under MacOS X
-----------------------------------------------------
CONTENTS
@ -14,23 +14,14 @@ CONTENTS
INTRODUCTION
FLTK for MacOS X is in beta stage. Expect rapid changes to
the source code and build environment.
FLTK currently supports the following development
environments on the MacOS X platform:
- GCC
- (Metrowerks CodeWarrior - future releases)
- Metrowerks CodeWarrior
- (Apple Project Builder - future releases)
- (MPW - future releases)
FLTK for Mac is fully carbonized, i.e. all applications
should run on MacOS 8.1 and higher and OS X without
changes. Note, however, that applications compiled using
GCC will only run under MacOS X since they use a different
executable format.
HOW TO BUILD USING GCC (MacOS X)
@ -91,7 +82,6 @@ KNOWN MacFLTK BUGS
- Sub-sub-subwindow not tested.
- Image transparency is implemented as "screen-door" only
- The 'shiny' demo needs work (flush/aglFlush).
- Threads are not implemented.
- OpenGL subwindow during window resize changes position
@ -139,5 +129,4 @@ FLTK 1.0.X FOR MAC
5 and 6.
FLTK 1.0.6 for Mac is not supported by the FLTK team and
will not be further developed by the author. Instead it
will be replaced by FLTK 1.1.x for Mac in the near future.
will not be further developed by the author.

View File

@ -1,4 +1,4 @@
README.win32 - 01/01/2002 - Building FLTK under Windows
README.win32 - 10/03/2002 - Building FLTK under Windows
-------------------------------------------------------
INTRODUCTION

View File

@ -72,98 +72,152 @@ class.
<H4><A NAME="Fl_Text_Display.Fl_Text_Display">Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0);</A></H4>
<P>Creates a new text display widget.
<H4><A NAME="Fl_Text_Display.~Fl_Text_Display">~Fl_Text_Display();</A></H4>
<P>Destroys a text display widget.
<H4><A NAME="Fl_Text_Display.buffer">void buffer(Fl_Text_Buffer* buf);<BR>
void buffer(Fl_Text_Buffer&amp; buf);<BR>
Fl_Text_Buffer* buffer();</A></H4>
<P>Sets or gets the current text buffer associated with the text widget.
Multiple text widgets can be associated with the same text buffer.
<H4><A NAME="Fl_Text_Display.cursor_style">void cursor_style(int style);</A></H4>
<P>Sets the text cursor style to one of the following:
<UL>
<LI><CODE>Fl_Text_Display::NORMAL_CURSOR</CODE> - Shows an I beam.
<LI><CODE>Fl_Text_Display::CARET_CURSOR</CODE> - Shows a caret under the text.
<LI><CODE>Fl_Text_Display::DIM_CURSOR</CODE> - Shows a dimmed I beam.
<LI><CODE>Fl_Text_Display::BLOCK_CURSOR</CODE> - Shows an unfilled box around the current
character.
<LI><CODE>Fl_Text_Display::HEAVY_CURSOR</CODE> - Shows a thick I beam.
</UL>
<H4><A NAME="Fl_Text_Display.hide_cursor">void hide_cursor();</A></H4>
<P>Hides the text cursor.
<H4><A NAME="Fl_Text_Display.highlight_data">void highlight_data(Fl_Text_Buffer *styleBuffer,
Style_Table_Entry *styleTable, int nStyles, char
unfinishedStyle, Unfinished_Style_Cb unfinishedHighlightCB, void
*cbArg);</A></H4>
<P>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 <A HREF="editor.html">Chapter 4</A>
shows how to use the <CODE>highlight_data()</CODE> method.
<H4><A NAME="Fl_Text_Display.in_selection">int in_selection(int x, int y);</A></H4>
<P>Returns non-zero if the specified mouse position is inside the current
selection.
<H4><A NAME="Fl_Text_Display.insert">void insert(const char* text);</A></H4>
<P>Inserts text at the current insert position.
<H4><A NAME="Fl_Text_Display.insert_position">void insert_position(int newPos);<BR>
int insert_position()</A></H4>
<P>Sets or gets the current insert position.
<H4><A NAME="Fl_Text_Display.move_down">int move_down();</A></H4>
<P>Moves the current insert position down one line.
<H4><A NAME="Fl_Text_Display.move_left">int move_left();</A></H4>
<P>Moves the current insert position left one character.
<H4><A NAME="Fl_Text_Display.move_right">int move_right();</A></H4>
<P>Moves the current insert position right one character.
<H4><A NAME="Fl_Text_Display.move_up">int move_up();</A></H4>
<P>Moves the current insert position up one line.
<H4><A NAME="Fl_Text_Display.next_word">void next_word(void);</A></H4>
<P>Moves the current insert position right one word.
<H4><A NAME="Fl_Text_Display.overstrike">void overstrike(const char* text);</A></H4>
<P>Replaces text at the current insert position.
<H4><A NAME="Fl_Text_Display.position_style">int position_style(int lineStartPos, int lineLen, int lineIndex,
int dispIndex);</A></H4>
<P>Returns the style associated with the character at position
<CODE>lineStartPos + lineIndex</CODE>.
<H4><A NAME="Fl_Text_Display.previous_word">void previous_word(void);</A></H4>
<P>Moves the current insert position left one word.
<H4><A NAME="Fl_Text_Display.redisplay_range">void redisplay_range(int start, int end);</A></H4>
<P>Marks text from <CODE>start</CODE> to <CODE>end</CODE> as needing a redraw.
<H4><A NAME="Fl_Text_Display.scrollbar_align">void scrollbar_align(Fl_Align a);<BR>
Fl_Align scrollbar_align();</A></H4>
<P>Sets or gets where scrollbars are attached to the widget -
<CODE>FL_ALIGN_LEFT</CODE> and <CODE>FL_ALIGN_RIGHT</CODE> for
the vertical scrollbar and <CODE>FL_ALIGN_TOP</CODE> and
<CODE>FL_ALIGN_BOTTOM</CODE> for the horizontal scrollbar.
<H4><A NAME="Fl_Text_Display.scrollbar_width">void scrollbar_width(int w);<BR>
int scrollbar_width();</A></H4>
<P>Sets or gets the width/height of the scrollbars.
<H4><A NAME="Fl_Text_Display.scroll">void scroll(int topLineNum, int horizOffset);</A></H4>
<P>Scrolls the current buffer to start at the specified line and column.
<H4><A NAME="Fl_Text_Display.show_cursor">void show_cursor(int b = 1);</A></H4>
<P>Shows or hides the text cursor.
<H4><A NAME="Fl_Text_Display.show_insert_position">void show_insert_position();</A></H4>
<P>Scrolls the text buffer to show the current insert position.
<H4><A NAME="Fl_Text_Display.textcolor">void textcolor(unsigned n);<BR>
Fl_Color textcolor() const;</A></H4>
<P>Sets or gets the default color of text in the widget.
<H4><A NAME="Fl_Text_Display.textfont">void textfont(uchar s);<BR>
Fl_Font textfont() const;</A></H4>
<P>Sets or gets the default font used when drawing text in the widget.
<H4><A NAME="Fl_Text_Display.textsize">void textsize(uchar s);<BR>
uchar textsize() const;</A></H4>
<P>Sets or gets the default size of text in the widget.
<H4><A NAME="Fl_Text_Display.word_end">int word_end(int pos);</A></H4>
<P>Moves the insert position to the end of the current word.
<H4><A NAME="Fl_Text_Display.word_start">int word_start(int pos);</A></H4>
<P>Moves the insert position to the beginning of the current word.
</BODY>
</HTML>

View File

@ -73,101 +73,138 @@ class.
<H4><A NAME="Fl_Text_Editor.Fl_Text_Editor">Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0);</A></H4>
<P>The constructor creates a new text editor widget.
<H4><A NAME="Fl_Text_Editor.~Fl_Text_Editor">~Fl_Text_Editor();</A></H4>
<P>The destructor frees all memory used by the text editor widget.
<H4><A NAME="Fl_Text_Editor.add_default_key_bindings">void add_default_key_bindings(Key_Binding** list);</A></H4>
<P>Adds all of the default editor key bindings to the specified key binding list.
<H4><A NAME="Fl_Text_Editor.add_key_binding">void add_key_binding(int key, int state, Key_Func f, Key_Binding** list);<BR>
void add_key_binding(int key, int state, Key_Func f);</A></H4>
<P>Adds a single key binding to the specified or current key binding list.
<H4><A NAME="Fl_Text_Editor.bound_key_function">Key_Func bound_key_function(int key, int state, Key_Binding* list);<BR>
Key_Func bound_key_function(int key, int state);</A></H4>
<P>Returns the function associated with a key binding.
<H4><A NAME="Fl_Text_Editor.default_key_function">void default_key_function(Key_Func f);</A></H4>
<P>Sets the default key function for unassigned keys.
<H4><A NAME="Fl_Text_Editor.insert_mode">void insert_mode(int b);<BR>
int insert_mode();</A></H4>
<P>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.
<H4><A NAME="Fl_Text_Editor.kf_backspace">int kf_backspace(int c, Fl_Text_Editor* e);</A></H4>
<P>Does a backspace in the current buffer.
<H4><A NAME="Fl_Text_Editor.kf_copy">int kf_copy(int c, Fl_Text_Editor* e);</A></H4>
<P>Does a copy of selected text in the current buffer.
<H4><A NAME="Fl_Text_Editor.kf_c_s_move">int kf_c_s_move(int c, Fl_Text_Editor* e);</A></H4>
<P>Extends the current selection in the direction indicated by
control key <CODE>c</CODE>.
<H4><A NAME="Fl_Text_Editor.kf_ctrl_move">int kf_ctrl_move(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the current text cursor in the direction indicated by
control key <CODE>c</CODE>.
<H4><A NAME="Fl_Text_Editor.kf_cut">int kf_cut(int c, Fl_Text_Editor* e);</A></H4>
<P>Does a cut of selected text in the current buffer.
<H4><A NAME="Fl_Text_Editor.kf_default">int kf_default(int c, Fl_Text_Editor* e);</A></H4>
<P>Inserts the text associated with the key <CODE>c</CODE>.
<H4><A NAME="Fl_Text_Editor.kf_delete">int kf_delete(int c, Fl_Text_Editor* e);</A></H4>
<P>Does a delete of selected text or the current character in
the current buffer.
<H4><A NAME="Fl_Text_Editor.kf_down">int kf_down(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor down one line.
<H4><A NAME="Fl_Text_Editor.kf_end">int kf_end(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor to the end of the current line.
<H4><A NAME="Fl_Text_Editor.kf_enter">int kf_enter(int c, Fl_Text_Editor* e);</A></H4>
<P>Inserts a newline at the current cursor position.
<H4><A NAME="Fl_Text_Editor.kf_home">int kf_home(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor to the beginning of the current line.
<H4><A NAME="Fl_Text_Editor.kf_ignore">int kf_ignore(int c, Fl_Text_Editor* e);</A></H4>
<P>Ignores the keypress.
<H4><A NAME="Fl_Text_Editor.kf_insert">int kf_insert(int c, Fl_Text_Editor* e);</A></H4>
<P>Toggles the insert mode in the text editor.
<H4><A NAME="Fl_Text_Editor.kf_left">int kf_left(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor to the left in the buffer.
<H4><A NAME="Fl_Text_Editor.kf_move">int kf_move(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor in the direction indicated by key
<CODE>c</CODE>.
<H4><A NAME="Fl_Text_Editor.kf_page_down">int kf_page_down(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor down one page.
<H4><A NAME="Fl_Text_Editor.kf_page_up">int kf_page_up(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor up one page.
<H4><A NAME="Fl_Text_Editor.kf_paste">int kf_paste(int c, Fl_Text_Editor* e);</A></H4>
<P>Pastes the contents of the clipboard at the current text cursor position.
<H4><A NAME="Fl_Text_Editor.kf_right">int kf_right(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor one character to the right.
<H4><A NAME="Fl_Text_Editor.kf_select_all">int kf_select_all(int c, Fl_Text_Editor* e);</A></H4>
<P>Selects all text in the buffer.
<H4><A NAME="Fl_Text_Editor.kf_shift_move">int kf_shift_move(int c, Fl_Text_Editor* e);</A></H4>
<P>Extends the current selection in the direction of key <CODE>c</CODE>.
<H4><A NAME="Fl_Text_Editor.kf_up">int kf_up(int c, Fl_Text_Editor* e);</A></H4>
<P>Moves the text cursor up one line.
<H4><A NAME="Fl_Text_Editor.remove_all_key_bindings">void remove_all_key_bindings(Key_Binding** list);<BR>
void remove_all_key_bindings();</A></H4>
<P>Removes all of the key bindings associated with the text editor or list.
<H4><A NAME="Fl_Text_Editor.remove_key_binding">void remove_key_binding(int key, int state, Key_Binding** list);<BR>
void remove_key_binding(int key, int state);</A></H4>
<P>Removes a single key binding from the text editor or list.
</BODY>
</HTML>

View File

@ -216,6 +216,22 @@ CC ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
gcc ... -L/usr/local/lib -lfltk -lXext -lX11 -lm
</PRE></UL>
<P>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, <A
HREF="Fl_Help_Dialog.html#Fl_Help_Dialog"><CODE>Fl_Help_Dialog</CODE></A>
widget, and system icon support.
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="10" BGCOLOR="#cccccc">
<TR>
<TD><B>Note:</B>
<P>The libraries are named "fltk.lib", "fltkgl.lib", "fltkforms.lib",
and "fltkimages.lib", respectively under Windows.
</TD>
</TR>
</TABLE></CENTER>
<P>As before, the <TT>fltk-config</TT> script included with FLTK can be
used to get the options that are required by your linker:</P>

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Wizard.cxx,v 1.1.2.2 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_Wizard.cxx,v 1.1.2.3 2002/10/04 02:30:34 easysw Exp $"
//
// Fl_Wizard widget routines.
//
@ -194,9 +194,14 @@ Fl_Wizard::value(Fl_Widget *kid)
else
(*kids)->hide();
}
// This will restore the mouse pointer to the window's default cursor
// whenever the wizard pane is changed. Otherwise text widgets that
// show the next pane may leave the cursor set to the I beam, etc...
window()->cursor(FL_CURSOR_DEFAULT);
}
//
// End of "$Id: Fl_Wizard.cxx,v 1.1.2.2 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_Wizard.cxx,v 1.1.2.3 2002/10/04 02:30:34 easysw Exp $".
//