diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-28 20:43:44 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-28 20:43:44 +0000 |
| commit | c78dcd55ec0b09329c509668507922683f90aab4 (patch) | |
| tree | eb15853a514fce714728ba7150d010109eb2d083 | |
| parent | 6cb1b5c7bda9211da0dfc9abacbb403791b67cee (diff) | |
More doco updates.
Enable tooltips by default, and don't enable them when setting the
tooltip value, since that will negate any changes a program might
make when displaying the file chooser dialog, etc.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/Enumerations.H | 4 | ||||
| -rw-r--r-- | FL/Fl.H | 18 | ||||
| -rw-r--r-- | FL/Fl_Widget.H | 6 | ||||
| -rw-r--r-- | configure.in | 26 | ||||
| -rw-r--r-- | documentation/Fl.html | 1024 | ||||
| -rw-r--r-- | documentation/Fl_Text_Display.html | 463 | ||||
| -rw-r--r-- | documentation/Fl_Text_Editor.html | 471 | ||||
| -rw-r--r-- | documentation/Fl_Tooltip.html | 87 | ||||
| -rw-r--r-- | documentation/Makefile | 6 | ||||
| -rw-r--r-- | documentation/fltk.book | 1 | ||||
| -rw-r--r-- | documentation/functions.html | 863 | ||||
| -rw-r--r-- | documentation/widgets.html | 334 | ||||
| -rw-r--r-- | src/Fl.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_Tooltip.cxx | 8 | ||||
| -rw-r--r-- | src/Fl_Widget.cxx | 9 | ||||
| -rw-r--r-- | src/gl_start.cxx | 6 |
16 files changed, 1640 insertions, 1692 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 67f49f348..860977f7c 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -1,5 +1,5 @@ // -// "$Id: Enumerations.H,v 1.18.2.14.2.7 2001/11/28 15:55:33 easysw Exp $" +// "$Id: Enumerations.H,v 1.18.2.14.2.8 2001/11/28 20:43:44 easysw Exp $" // // Enumerations for the Fast Light Tool Kit (FLTK). // @@ -364,5 +364,5 @@ enum Fl_Damage { #endif // -// End of "$Id: Enumerations.H,v 1.18.2.14.2.7 2001/11/28 15:55:33 easysw Exp $". +// End of "$Id: Enumerations.H,v 1.18.2.14.2.8 2001/11/28 20:43:44 easysw Exp $". // @@ -1,5 +1,5 @@ // -// "$Id: Fl.H,v 1.8.2.11.2.5 2001/11/28 18:00:16 easysw Exp $" +// "$Id: Fl.H,v 1.8.2.11.2.6 2001/11/28 20:43:44 easysw Exp $" // // Main header file for the Fast Light Tool Kit (FLTK). // @@ -24,12 +24,12 @@ // #ifndef Fl_H -#define Fl_H +# define Fl_H -#include "Enumerations.H" -#ifndef Fl_Object -#define Fl_Object Fl_Widget -#endif +# include "Enumerations.H" +# ifndef Fl_Object +# define Fl_Object Fl_Widget +# endif class Fl_Widget; class Fl_Window; @@ -70,7 +70,7 @@ public: // should be private! public: // API version number - static double version(); + static FL_EXPORT double version(); // argument parsers: static FL_EXPORT int arg(int, char**, int&); @@ -222,8 +222,8 @@ public: static int visible_focus() { return visible_focus_; } }; -#endif +#endif // !Fl_H // -// End of "$Id: Fl.H,v 1.8.2.11.2.5 2001/11/28 18:00:16 easysw Exp $". +// End of "$Id: Fl.H,v 1.8.2.11.2.6 2001/11/28 20:43:44 easysw Exp $". // diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 795b72bde..352948488 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget.H,v 1.6.2.4.2.10 2001/11/03 05:11:34 easysw Exp $" +// "$Id: Fl_Widget.H,v 1.6.2.4.2.11 2001/11/28 20:43:44 easysw Exp $" // // Widget header file for the Fast Light Tool Kit (FLTK). // @@ -143,7 +143,7 @@ public: void deimage(Fl_Image* a) {label_.deimage=a;} void deimage(Fl_Image& a) {label_.deimage=&a;} const char *tooltip() const {return tooltip_;} - void tooltip(const char *t); + void tooltip(const char *t) {tooltip_=t;} Fl_Callback_p callback() const {return callback_;} void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;} void callback(Fl_Callback* c) {callback_=c;} @@ -207,5 +207,5 @@ public: #endif // -// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.10 2001/11/03 05:11:34 easysw Exp $". +// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.11 2001/11/28 20:43:44 easysw Exp $". // diff --git a/configure.in b/configure.in index 1a854f99c..6200ae55a 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl -*- sh -*- dnl the "configure" script is made from this by running GNU "autoconf" dnl -dnl "$Id: configure.in,v 1.33.2.31.2.29 2001/11/27 22:03:29 easysw Exp $" +dnl "$Id: configure.in,v 1.33.2.31.2.30 2001/11/28 20:43:43 easysw Exp $" dnl dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl @@ -99,6 +99,15 @@ AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [defau if test x$enable_shared = xyes; then PICFLAG=1 case $uname in + *BSD* | Darwin*) + DSONAME="libfltk.$FL_API_VERSION.dylib" + GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib" + DSOCOMMAND="ld $DSOFLAGS -dylib /usr/lib/dylib1.o -lc" + if test "$libdir" != "/usr/lib"; then + DSOLINK="-Wl,-rpath,$libdir" + fi + ;; + SunOS* | UNIX_S*) DSONAME="libfltk.so.$FL_API_VERSION" GLDSONAME="libfltk_gl.so.$FL_API_VERSION" @@ -240,17 +249,19 @@ AC_CHECK_HEADER(png.h, dnl Restore original LIBS settings... LIBS="$SAVELIBS" +dnl See if we are compiling with CygWin or MingW32... +AC_CYGWIN +AC_EXEEXT + dnl Check for standard graphics API and OpenGL... -EXEEXT= HLINKS= case $uname in CYGWIN*) dnl Cygwin environment... - LIBS="$LIBS -lgdi32 -lwsock32" - CFLAGS="$CFLAGS -DWIN32" - CXXFLAGS="$CXXFLAGS -DWIN32" - EXEEXT=".exe" + LIBS="$LIBS -mwindows -lgdi32 -lwsock32" + CFLAGS="$CFLAGS -mwindows -DWIN32" + CXXFLAGS="$CXXFLAGS -mwindows -DWIN32" HLINKS="#" if test x$enable_gl != xno; then AC_CHECK_HEADER(GL/gl.h, @@ -349,7 +360,6 @@ case $uname in fi) esac -AC_SUBST(EXEEXT) AC_SUBST(HLINKS) AC_SUBST(GLDEMOS) AC_SUBST(GLLIB) @@ -568,5 +578,5 @@ AC_OUTPUT(makeinclude fltk.list fltk-config FL/Makefile FL/Enumerations.H) chmod +x fltk-config dnl -dnl End of "$Id: configure.in,v 1.33.2.31.2.29 2001/11/27 22:03:29 easysw Exp $". +dnl End of "$Id: configure.in,v 1.33.2.31.2.30 2001/11/28 20:43:43 easysw Exp $". dnl diff --git a/documentation/Fl.html b/documentation/Fl.html index 010fcc73a..8ca85427f 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -3,49 +3,1039 @@ <!-- NEW PAGE --> -<H2><A name=Fl_Bitmap>class Fl_Bitmap</A></H2> +<H2><A name="Fl">class Fl</A></H2> <HR> <H3>Class Hierarchy</H3> <UL><PRE> -<A href="Fl_Image.html">Fl_Image</A> - | - +----<B>Fl_Bitmap</B> - | - +----<A href="Fl_XBM_Image.html">Fl_XBM_Image</A> +<B>Fl</B> </PRE></UL> <H3>Include Files</H3> <UL><PRE> -#include <FL/Fl_Bitmap.H> +#include &lt;FL/Fl.H&gt; </PRE></UL> <H3>Description</H3> -<P>The <TT>Fl_Bitmap</TT> class supports caching and drawing of mono-color -(bitmap) images. Images are drawn using the current color.</P> +<P>The <TT>Fl</TT> class is the FLTK global (static) class containing +state information and global methods for the current application.</P> <H3>Methods</H3> <UL> - <LI><A href="#Fl_Bitmap.Fl_Bitmap">Fl_Bitmap</A></LI> + <LI><A HREF="#Fl.add_check">add_check</A></LI> + <LI><A HREF="#Fl.add_fd">add_fd</A></LI> + <LI><A HREF="#Fl.add_handler">add_handler</A></LI> + <LI><A HREF="#Fl.add_idle">add_idle</A></LI> + <LI><A HREF="#Fl.add_timeout">add_timeout</A></LI> + <LI><A HREF="#Fl.arg">arg</A></LI> + <LI><A HREF="#Fl.args">args</A></LI> + <LI><A HREF="#Fl.atclose">atclose</A></LI> + <LI><A HREF="#Fl.background2">background2</A></LI> + <LI><A HREF="#Fl.background">background</A></LI> + <LI><A HREF="#Fl.belowmouse">belowmouse</A></LI> + <LI><A HREF="#Fl.box_dh">box_dh</A></LI> + <LI><A HREF="#Fl.box_dw">box_dw</A></LI> + <LI><A HREF="#Fl.box_dx">box_dx</A></LI> + <LI><A HREF="#Fl.box_dy">box_dy</A></LI> + <LI><A HREF="#Fl.check">check</A></LI> + <LI><A HREF="#Fl.compose">compose</A></LI> + <LI><A HREF="#Fl.compose_reset">compose_reset</A></LI> + <LI><A HREF="#Fl.damage">damage</A></LI> + <LI><A HREF="#Fl.default_atclose">default_atclose</A></LI> + <LI><A HREF="#Fl.display">display</A></LI> + <LI><A HREF="#Fl.error">error</A></LI> + <LI><A HREF="#Fl.event_alt">event_alt</A></LI> + <LI><A HREF="#Fl.event_button1">event_button1</A></LI> + <LI><A HREF="#Fl.event_button2">event_button2</A></LI> + <LI><A HREF="#Fl.event_button3">event_button3</A></LI> + <LI><A HREF="#Fl.event_button">event_button</A></LI> + <LI><A HREF="#Fl.event_buttons">event_buttons</A></LI> + <LI><A HREF="#Fl.event_clicks">event_clicks</A></LI> + <LI><A HREF="#Fl.event_ctrl">event_ctrl</A></LI> + <LI><A HREF="#Fl.event">event</A></LI> + <LI><A HREF="#Fl.event_inside">event_inside</A></LI> + <LI><A HREF="#Fl.event_is_click">event_is_click</A></LI> + <LI><A HREF="#Fl.event_key">event_key</A></LI> + <LI><A HREF="#Fl.event_length">event_length</A></LI> + <LI><A HREF="#Fl.event_shift">event_shift</A></LI> + <LI><A HREF="#Fl.event_state">event_state</A></LI> + <LI><A HREF="#Fl.event_x">event_x</A></LI> + <LI><A HREF="#Fl.event_x_root">event_x_root</A></LI> + <LI><A HREF="#Fl.event_y">event_y</A></LI> + <LI><A HREF="#Fl.event_y_root">event_y_root</A></LI> + <LI><A HREF="#Fl.fatal">fatal</A></LI> + <LI><A HREF="#Fl.first_window">first_window</A></LI> + <LI><A HREF="#Fl.flush">flush</A></LI> + <LI><A HREF="#Fl.focus">focus</A></LI> + <LI><A HREF="#Fl.foreground">foreground</A></LI> + <LI><A HREF="#Fl.free_color">free_color</A></LI> + <LI><A HREF="#Fl.get_color">get_color</A></LI> + <LI><A HREF="#Fl.get_font">get_font</A></LI> + <LI><A HREF="#Fl.get_font_name">get_font_name</A></LI> + <LI><A HREF="#Fl.get_font_sizes">get_font_sizes</A></LI> + <LI><A HREF="#Fl.get_key">get_key</A></LI> + <LI><A HREF="#Fl.get_mouse">get_mouse</A></LI> + <LI><A HREF="#Fl.get_system_colors">get_system_colors</A></LI> + <LI><A HREF="#Fl.gl_visual">gl_visual</A></LI> + <LI><A HREF="#Fl.grab">grab</A></LI> + <LI><A HREF="#Fl.h">h</A></LI> + <LI><A HREF="#Fl.handle">handle</A></LI> + <LI><A HREF="#Fl.has_check">has_check</A></LI> + <LI><A HREF="#Fl.has_idle">has_idle</A></LI> + <LI><A HREF="#Fl.has_timeout">has_timeout</A></LI> + <LI><A HREF="#Fl.modal">modal</A></LI> + <LI><A HREF="#Fl.next_window">next_window</A></LI> + <LI><A HREF="#Fl.own_colormap">own_colormap</A></LI> + <LI><A HREF="#Fl.paste">paste</A></LI> + <LI><A HREF="#Fl.pushed">pushed</A></LI> + <LI><A HREF="#Fl.readqueue">readqueue</A></LI> + <LI><A HREF="#Fl.ready">ready</A></LI> + <LI><A HREF="#Fl.redraw">redraw</A></LI> + <LI><A HREF="#Fl.release">release</A></LI> + <LI><A HREF="#Fl.remove_check">remove_check</A></LI> + <LI><A HREF="#Fl.remove_fd">remove_fd</A></LI> + <LI><A HREF="#Fl.remove_idle">remove_idle</A></LI> + <LI><A HREF="#Fl.remove_timeout">remove_timeout</A></LI> + <LI><A HREF="#Fl.repeat_timeout">repeat_timeout</A></LI> + <LI><A HREF="#Fl.run">run</A></LI> + <LI><A HREF="#Fl.selection_owner">selection_owner</A></LI> + <LI><A HREF="#Fl.selection">selection</A></LI> + <LI><A HREF="#Fl.set_abort">set_abort</A></LI> + <LI><A HREF="#Fl.set_atclose">set_atclose</A></LI> + <LI><A HREF="#Fl.set_boxtype">set_boxtype</A></LI> + <LI><A HREF="#Fl.set_color">set_color</A></LI> + <LI><A HREF="#Fl.set_font">set_font</A></LI> + <LI><A HREF="#Fl.set_fonts">set_fonts</A></LI> + <LI><A HREF="#Fl.set_idle">set_idle</A></LI> + <LI><A HREF="#Fl.set_labeltype">set_labeltype</A></LI> + <LI><A HREF="#Fl.test_shortcut">test_shortcut</A></LI> + <LI><A HREF="#Fl.version">version</A></LI> + <LI><A HREF="#Fl.visible_focus">visible_focus</A></LI> + <LI><A HREF="#Fl.visual">visual</A></LI> + <LI><A HREF="#Fl.wait">wait</A></LI> + <LI><A HREF="#Fl.warning">warning</A></LI> + <LI><A HREF="#Fl.w">w</A></LI> + <LI><A HREF="#Fl.x">x</A></LI> + <LI><A HREF="#Fl.y">y</A></LI> - <LI><A href="#Fl_Bitmap.~Fl_Bitmap">~Fl_Bitmap</A></LI> +</UL> + +<H4><A NAME="Fl.add_check">void add_check(Fl_Timeout_Handler, void* = 0);</A></H4> + +<P>FLTK will call this callback just before it flushes the display and +waits for events. This is different than an idle callback because it +is only called once, then FLTK calls the system and tells it not to +return until an event happens. + +<p>This can be used by code that wants to monitor the +application's state, such as to keep a display up to date. The +advantage of using a check callback is that it is called only when no +events are pending. If events are coming in quickly, whole blocks of +them will be processed before this is called once. This can save +significant time and avoid the application falling behind the events. + +<p>Sample code: + +<UL><PRE> +bool state_changed; // anything that changes the display turns this on + +void callback(void*) { + if (!state_changed) return; + state_changed = false; + do_expensive_calculation(); + widget->redraw(); +} + +main() { + Fl::add_check(1.0,callback); + return Fl::run(); +} +</PRE></UL> + +<H4><A NAME="Fl.add_fd">void add_fd(int fd, int when, void (*cb)(int,void*),void* =0);<BR> +void add_fd(int fd, void (*cb)(int, void*), void* = 0);</A></H4> + +<P>Add file descriptor <tt>fd</tt> to listen to. When the <tt>fd</tt> +becomes ready for reading <tt>Fl::wait()</tt> will call the callback +and then return. The callback is +passed the <tt>fd</tt> and the arbitrary <tt>void*</tt> argument.</P> + +<P>The second version takes a <tt>when</tt> bitfield, with the bits +<tt>FL_READ</tt>, <tt>FL_WRITE</tt>, and <tt>FL_EXCEPT</tt> defined, +to indicate when the callback should be done. + +<P>There can only be one callback of each type for a file descriptor. <tt> +Fl::remove_fd()</tt> gets rid of <I>all</I> the callbacks for a given +file descriptor. + +<P>Under UNIX <I>any</I> file descriptor can be monitored (files, +devices, pipes, sockets, etc.) Due to limitations in Microsoft Windows, +WIN32 applications can only monitor sockets. + +<H4><A NAME="Fl.add_handler">void add_handler(int (*h)(int));</A></H4> + +<P>Install a function to parse unrecognized events. If FLTK cannot +figure out what to do with an event, it calls each of these functions +(most recent first) until one of them returns non-zero. If none of +them returns non zero then the event is ignored. Events that cause +this to be called are: + +<UL> +<LI><tt>FL_SHORTCUT</tt> events that are not recognized by any widget. +This lets you provide global shortcut keys. </LI> +<LI>System events that FLTK does not recognize. See <A href=osissues.html#fl_xevent> +<tt>fl_xevent</tt></A>. </LI> +<LI><I>Some</I> other events when the widget FLTK selected returns +zero from its <tt>handle()</tt> method. Exactly which ones may change +in future versions, however. </LI> +</UL> + +<H4><A NAME="Fl.add_idle">void add_idle(void (*cb)(void*), void* = 0);</A></H4> + +<P>Adds a callback function that is called every time by +<tt>Fl::wait()</tt> and also makes it act as though the timeout is +zero (this makes <tt>Fl::wait()</tt> return immediately, so if it is +in a loop it is called repeatedly, and thus the idle fucntion is +called repeatedly). The idle function can be used to get background +processing done. + +<P>You can have multiple idle callbacks. To remove an idle callback use <A +href=#remove_idle><tt>Fl::remove_idle()</tt></A>. + +<P><tt>Fl::wait()</tt> and <tt>Fl::check()</tt> call idle callbacks, +but <tt>Fl::ready()</tt> does not. + +<P>The idle callback can call any FLTK functions, including +<tt>Fl::wait()</tt>, <tt>Fl::check()</tt>, and <tt>Fl::ready()</tt>. +FLTK will not recursively call the idle callback. + +<H4><A NAME="Fl.add_timeout">void add_timeout(double t, Fl_Timeout_Handler,void* = 0);</A></H4> + +<P>Add a one-shot timeout callback. The function will be called by +<tt>Fl::wait()</tt> at <i>t</i> seconds after this function is called. +The optional <tt>void*</tt> argument is passed to the callback. + +<H4><A NAME="Fl.arg">int arg(int, char**, int&);</A></H4> + +<P>Consume a single switch from <tt>argv</tt>, starting at word i. +Returns the number of words eaten (1 or 2, or 0 if it is not +recognized) and adds the same value to <tt>i</tt>. You can use this +function if you prefer to control the incrementing through the +arguments yourself. + +<H4><A NAME="Fl.args">int args(int, char**, int&, int (*)(int,char**,int&) = 0);</A></H4> + +<P>FLTK provides an <I>entirely optional</I> command-line switch parser. +You don't have to call it if you don't like them! Everything it can do +can be done with other calls to FLTK. + +<P>To use the switch parser, call <tt>Fl::args(...)</tt> near the start +of your program. This does <I>not</I> open the display, instead +switches that need the display open are stashed into static variables. +Then you <I>must</I> display your first window by calling <A href=Fl_Window.html#Fl_Window.show> +window->show(argc,argv)</A>, which will do anything stored in the +static variables. + +<P><tt>callback</tt> lets you define your own switches. It is called +with the same <tt>argc</tt> and <tt>argv</tt>, and with <tt>i</tt> the +index of each word. The callback should return zero if the switch is +unrecognized, and not change <tt>i</tt>. It should return non-zero if +the switch is recognized, and add at least 1 to <tt>i</tt> (it can add +more to consume words after the switch). This function is called +<i>before</i> any other tests, so <i>you can override any FLTK +switch</i> (this is why FLTK can use very short switches instead of +the long ones all other toolkits force you to use). + +<P>On return <tt>i</tt> is set to the index of the first non-switch. +This is either: + +<UL> +<LI>The first word that does not start with '-'. </LI> +<LI>The word '-' (used by many programs to name stdin as a file) </LI> +<LI>The first unrecognized switch (return value is 0). </LI> +<LI><tt>argc</tt></LI> +</UL> + +<P>The return value is <tt>i</tt> unless an unrecognized switch is found, +in which case it is zero. If your program takes no arguments other +than switches you should produce an error if the return value is less +than <tt>argc</tt>. + +<P>All switches except -bg2 may be abbreviated one letter and case is ignored: + +<UL> +<LI><tt>-display host:n.n</tt> The X display to use (ignored under +WIN32). </LI> +<LI><tt>-geometry WxH+X+Y</tt> The window position and size will be +modified according the the standard X geometry string. </LI> +<LI><tt>-name string</tt> Fl_Window::xclass(string) will be done to +the window, possibly changing its icon. </LI> +<LI><tt>-title string</tt> Fl_Window::label(string) will be done to +the window, changing both its title and the icontitle. </LI> +<LI><tt>-iconic</tt> Fl_Window::iconize() will be done to the window. </LI> +<LI><tt>-bg color</tt> XParseColor is used to lookup the passed color +and then Fl::background() is done. Under WIN32 only color names of +the form "#xxxxxx" are understood. </LI> +<LI><tt>-bg2 color</tt> XParseColor is used to lookup the passed color +and then Fl::background2() is done. </LI> +<LI><tt>-fg color</tt> XParseColor is used to lookup the passed color +and then Fl::foreground() is done. </LI> +</UL> + +<P>The second form of <tt>Fl::args()</tt> is useful if your program does +not have command line switches of its own. It parses all the switches, +and if any are not recognized it calls <tt>Fl::abort(Fl::help)</tt>. + +<P>A usage string is displayed if <tt>Fl::args()</tt> detects an invalid +argument on the command-line. You can change the message by setting the +<TT>Fl::help</TT> pointer. + +<H4><A NAME="Fl.atclose">void (*atclose)(Fl_Window*,void*);</A></H4> + +<H4><A NAME="Fl.background2">void background2(uchar, uchar, uchar);</A></H4> + +<P>Changes <tt>fl_color(FL_WHITE)</tt> and the same colors as <tt> +Fl::foreground()</tt>. This color is used as a background by <tt> +Fl_Input</tt> and other text widgets. + +<H4><A NAME="Fl.background">void background(uchar, uchar, uchar);</A></H4> + +<P>Changes <tt>fl_color(FL_GRAY)</tt> to the given color, and changes the +gray ramp from 32 to 56 to black to white. These are the colors used +as backgrounds by almost all widgets and used to draw the edges of all +the boxtypes. + +<H4><A NAME="Fl.belowmouse">Fl_Widget* belowmouse();<BR> +void belowmouse(Fl_Widget*);</A></H4> + +<P>Get or set the widget that is below the mouse. This is for +highlighting buttons. It is not used to send <tt>FL_PUSH</tt> or <tt> +FL_MOVE</tt> directly, for several obscure reasons, but those events +typically go to this widget. This is also the first widget tried for <tt> +FL_SHORTCUT</tt> events. + +<P>If you change the belowmouse widget, the previous one and all +parents (that don't contain the new widget) are sent <tt>FL_LEAVE</tt> +events. Changing this does <I>not</I> send <tt>FL_ENTER</tt> to this +or any widget, because sending <tt>FL_ENTER</tt> is supposed to <I>test</I> +if the widget wants the mouse (by it returning non-zero from <tt> +handle()</tt>). + +<H4><A NAME="Fl.box_dh">int box_dh(Fl_Boxtype);</A></H4> + +<P>Returns the height offset for the given boxtype. + +<H4><A NAME="Fl.box_dw">int box_dw(Fl_Boxtype);</A></H4> + +<P>Returns the width offset for the given boxtype. + +<H4><A NAME="Fl.box_dx">int box_dx(Fl_Boxtype);</A></H4> + +<P>Returns the X offset for the given boxtype. + +<H4><A NAME="Fl.box_dy">int box_dy(Fl_Boxtype);</A></H4> + +<P>Returns the Y offset for the given boxtype. + +<H4><A NAME="Fl.check">int check();</A></H4> + +<P>Same as <tt>Fl::wait(0)</tt>. Calling this during a big calculation +will keep the screen up to date and the interface responsive: + +<UL><PRE> +while (!calculation_done()) { + calculate(); + Fl::check(); + if (user_hit_abort_button()) break; +} +</PRE></UL> + +<P>The returns non-zero if any windows are displayed, and 0 if no +windows are displayed (this is likely to change in future versions of +FLTK). + +<H4><A NAME="Fl.compose">int compose(int &del);</A></H4> + +<H4><A NAME="Fl.compose_reset">void compose_reset();</A></H4> + +<H4><A NAME="Fl.damage">int damage();<BR> +void damage(int x);</A></H4> + +<P>If true then <A href=#flush><tt>flush()</tt></A> will do something. + +<H4><A NAME="Fl.default_atclose">void default_atclose(Fl_Window*,void*);</A></H4> + +<H4><A NAME="Fl.display">void display(const char*);</A></H4> + +<P>Sets the X display to use for all windows. Actually this just sets +the environment variable $DISPLAY to the passed string, so this only +works before you show() the first window or otherwise open the display, +and does nothing useful under WIN32. + +<H4><A NAME="Fl.error">void (*error)(const char*, ...);</A></H4> + +<P>FLTK calls this to print a normal error message. You can +override the behavior by setting the function pointer to your +own routine. + +<P><tt>Fl::error</tt> means there is a recoverable error such as +the inability to read an image file. The default implementation +prints the error message to <TT>stderr</TT> and returns. + +<H4><A NAME="Fl.event_alt">int event_alt();</A></H4> + +<H4><A NAME="Fl.event_button1">int event_button1();</A></H4> + +<H4><A NAME="Fl.event_button2">int event_button2();</A></H4> + +<H4><A NAME="Fl.event_button3">int event_button3();</A></H4> + +<H4><A NAME="Fl.event_button">int event_button();</A></H4> + +<P>Returns which mouse button was pressed. This returns garbage if the +most recent event was not a <tt>FL_PUSH</tt> or <tt>FL_RELEASE</tt> +event. + +<H4><A NAME="Fl.event_buttons">int event_buttons();</A></H4> + +<H4><A NAME="Fl.event_clicks">int event_clicks();</A></H4> + +<P>The first form returns non-zero if the most recent <tt>FL_PUSH</tt> or +<tt>FL_KEYBOARD</tt> was a "double click". Returns N-1 for +N clicks. A double click is counted if the same button is pressed +again while <tt>event_is_click()</tt> is true. + +<P>The second form directly sets the number returned by <tt> +Fl::event_clicks()</tt>. This can be used to set it to zero so that +later code does not think an item was double-clicked. + +<H4><A NAME="Fl.event_ctrl">int event_ctrl();</A></H4> + +<H4><A NAME="Fl.event">int event();</A></H4> + +<H4><A NAME="Fl.event_inside">int event_inside(int,int,int,int);<BR> +int event_inside(const Fl_Widget*);</A></H4> + +<P>Returns non-zero if the current <tt>event_x</tt> and <tt>event_y</tt> +put it inside the widget or inside an arbitrary bounding box. You +should always call this rather than doing your own comparison so you +are consistent about edge effects. + +<H4><A NAME="Fl.event_is_click">int event_is_click();<BR> +void event_is_click(0);</A></H4> + +<P>The first form returns non-zero if the mouse has not moved far enough +and not enough time has passed since the last <tt>FL_PUSH</tt> or <tt> +FL_KEYBOARD</tt> event for it to be considered a "drag" rather than a +"click". You can test this on <tt>FL_DRAG</tt>, <tt>FL_RELEASE</tt>, +and <tt>FL_MOVE</tt> events. The second form clears the value returned +by <tt>Fl::event_is_click()</tt>. Useful to prevent the <I>next</I> +click from being counted as a double-click or to make a popup menu +pick an item with a single click. Don't pass non-zero to this. + +<H4><A NAME="Fl.event_key">int event_key();<BR> +int event_key(int s);</A></H4> + +<P><tt>Fl::event_key()</tt> returns which key on the keyboard was last +pushed. It returns zero if the last event was not a key press or release. + +<P><tt>Fl::event_key(int)</tt> returns true if the given key was held +down (or pressed) <I>during</I> the last event. This is constant until +the next event is read from the server. +<P><tt>Fl::get_key(int)</tt> returns true if the given key is held down <I> +now</I>. Under X this requires a round-trip to the server and is <I> +much</I> slower than <tt>Fl::event_key(int)</tt>. + +<P>Keys are identified by the <I>unshifted</I> values. FLTK defines a +set of symbols that should work on most modern machines for every key +on the keyboard: + +<UL> +<LI>All keys on the main keyboard producing a printable ASCII +character use the value of that ASCII character (as though shift, +ctrl, and caps lock were not on). The space bar is 32. </LI> +<LI>All keys on the numeric keypad producing a printable ASCII +character use the value of that ASCII character plus <tt>FL_KP</tt>. +The highest possible value is <tt>FL_KP_Last</tt> so you can +range-check to see if something is on the keypad. </LI> +<LI>All numbered function keys use the number on the function key plus <tt> +FL_F</tt>. The highest possible number is <tt>FL_F_Last</tt>, so you +can range-check a value. </LI> +<LI>Buttons on the mouse are considered keys, and use the button +number (where the left button is 1) plus <tt>FL_Button</tt>. </LI> +<LI>All other keys on the keypad have a symbol: <tt>FL_Escape, +FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause, +FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down, +FL_Left, FL_Up, FL_Right, FL_Down, FL_Shift_L, FL_Shift_R, +FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R, +FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter</tt>. Be +careful not to confuse these with the very similar, but all-caps, +symbols used by <A href="#event_state"><tt>Fl::event_state()</tt> +</A>. </LI> +</UL> + +<P>On X <tt>Fl::get_key(FL_Button+n)</tt> does not work. + +<P>On WIN32 <tt>Fl::get_key(FL_KP_Enter)</tt> and <tt> +Fl::event_key(FL_KP_Enter)</tt> do not work. + +<H4><A NAME="Fl.event_length">int event_length();</A></H4> + +<P>Returns the length of the text in <tt>Fl::event_text()</tt>. There +will always be a nul at this position in the text. However there may +be a nul before that if the keystroke translates to a nul character or +you paste a nul character. + +<H4><A NAME="Fl.event_shift">int event_shift();</A></H4> + +<H4><A NAME="Fl.event_state">int event_state();<BR> +int event_state(int i);</A></H4> + +<P>This is a bitfield of what shift states were on and what mouse buttons +were held down during the most recent event. The second version +returns non-zero if any of the passed bits are turned on. The legal +bits are: + +<UL> +<LI><tt>FL_SHIFT</tt></LI> +<LI><tt>FL_CAPS_LOCK</tt></LI> +<LI><tt>FL_CTRL</tt></LI> +<LI><tt>FL_ALT</tt></LI> +<LI><tt>FL_NUM_LOCK</tt></LI> +<LI><tt>FL_META</tt></LI> +<LI><tt>FL_SCROLL_LOCK</tt></LI> +<LI><tt>FL_BUTTON1</tt></LI> +<LI><tt>FL_BUTTON2</tt></LI> +<LI><tt>FL_BUTTON3</tt></LI> </UL> -<H4><A name="Fl_Bitmap.Fl_Bitmap">Fl_Bitmap::Fl_Bitmap(const char *array, int W, int H);<BR> -Fl_Bitmap::Fl_Bitmap(const unsigned char *array, int W, int H);</A></H4> +<P>X servers do not agree on shift states, and FL_NUM_LOCK, FL_META, and +FL_SCROLL_LOCK may not work. The values were selected to match the +XFree86 server on Linux. In addition there is a bug in the way X works +so that the shift state is not correctly reported until the first event <I> +after</I> the shift key is pressed or released. + +<H4><A NAME="Fl.event_x">int event_x();</A></H4> + +<P>Returns the mouse position of the event relative to the <tt>Fl_Window</tt> +it was passed to. + +<H4><A NAME="Fl.event_x_root">int event_x_root();</A></H4> + +<P>Returns the mouse position on the screen of the event. To find the +absolute position of an <tt>Fl_Window</tt> on the screen, use the +difference between <tt>event_x_root(),event_y_root()</tt> and <tt> +event_x(),event_y()</tt>. + +<H4><A NAME="Fl.event_y">int event_y();</A></H4> + +<P>Returns the mouse position of the event relative to the <tt>Fl_Window</tt> +it was passed to. + +<H4><A NAME="Fl.event_y_root">int event_y_root();</A></H4> + +<P>Returns the mouse position on the screen of the event. To find the +absolute position of an <tt>Fl_Window</tt> on the screen, use the +difference between <tt>event_x_root(),event_y_root()</tt> and <tt> +event_x(),event_y()</tt>. + +<H4><A NAME="Fl.fatal">void (*fatal)(const char*, ...);</A></H4> + +<P>FLTK calls this to print a fatal error message. You can +override the behavior by setting the function pointer to your +own routine. + +<P><tt>Fl::fatal</tt> must not return, as FLTK is in an unusable +state, however your version may be able to use <tt>longjmp</tt> +or an exception to continue, as long as it does not call FLTK +again. The default implementation prints the error message to +<TT>stderr</TT> and exits with status 1. + +<H4><A NAME="Fl.first_window">Fl_Window* first_window();<BR> +void first_window(Fl_Window*);</A></H4> + +<P>Returns the first top-level window in the list of shown() windows. If +a modal() window is shown this is the top-most modal window, otherwise +it is the most recent window to get an event. + +<P>The second form sets the window that is returned by +first_window. The window is removed from wherever it is in the +list and inserted at the top. This is not done if Fl::modal() +is on or if the window is not shown(). Because the first window +is used to set the "parent" of modal windows, this is often +useful. + +<H4><A NAME="Fl.flush">void flush();</A></H4> + +<P>Causes all the windows that need it to be redrawn and graphics forced +out through the pipes. This is what <tt>wait()</tt> does before +looking for events. + +<H4><A NAME="Fl.focus">Fl_Widget* focus();<BR> +void focus(Fl_Widget*);</A></H4> + +<P>Get or set the widget that will receive <tt>FL_KEYBOARD</tt> events. + +<P>If you change <tt>Fl::focus()</tt>, the previous widget and all +parents (that don't contain the new widget) are sent <tt>FL_UNFOCUS</tt> +events. Changing the focus does <I>not</I> send <tt>FL_FOCUS</tt> to +this or any widget, because sending <tt>FL_FOCUS</tt> is supposed to <I> +test</I> if the widget wants the focus (by it returning non-zero from +<tt>handle()</tt>). + +<H4><A NAME="Fl.foreground">void foreground(uchar, uchar, uchar);</A></H4> + +<P>Changes <tt>fl_color(FL_BLACK)</tt>. Also changes <tt> +FL_INACTIVE_COLOR</tt> and <tt>FL_SELECTION_COLOR</tt> to be a ramp +between this and <tt>FL_WHITE</tt>. + +<H4><A NAME="Fl.free_color">void free_color(Fl_Color c, int overlay = 0);</A></H4> + +<P>Frees the specified color from the colormap, if applicable. +If <tt>overlay</tt> is non-zero then the color is freed from the +overlay colormap. + +<H4><A NAME="Fl.get_color">unsigned get_color(Fl_Color c);<BR> +void get_color(Fl_Color c, uchar&r, uchar&g, uchar&b);</A></H4> + +<P>Returns the color index or RGB value for the given FLTK color index. + +<H4><A NAME="Fl.get_font">const char* get_font(Fl_Font);</A></H4> + +<P>Get the string for this face. This string is different for each +face. Under X this value is passed to XListFonts to get all the sizes +of this face. + +<H4><A NAME="Fl.get_font_name">const char* get_font_name(Fl_Font, int* attributes = 0);</A></H4> + +<P>Get a human-readable string describing the family of this face. This +is useful if you are presenting a choice to the user. There is no +guarantee that each face has a different name. The return value points +to a static buffer that is overwritten each call. + +<P>The integer pointed to by <tt>attributes</tt> (if the pointer is not +zero) is set to zero, <tt>FL_BOLD</tt> or <tt>FL_ITALIC</tt> or <tt> +FL_BOLD | FL_ITALIC</tt>. To locate a "family" of fonts, search +forward and back for a set with non-zero attributes, these faces along +with the face with a zero attribute before them constitute a family. + +<H4><A NAME="Fl.get_font_sizes">int get_font_sizes(Fl_Font, int*& sizep);</A></H4> + +<P>Return an array of sizes in <tt>sizep</tt>. The return value is the +length of this array. The sizes are sorted from smallest to largest +and indicate what sizes can be given to <tt>fl_font()</tt> that will +be matched exactly (<tt>fl_font()</tt> will pick the closest size for +other sizes). A zero in the first location of the array indicates a +scalable font, where any size works, although the array may list sizes +that work "better" than others. Warning: the returned array +points at a static buffer that is overwritten each call. Under X this +will open the display. + +<H4><A NAME="Fl.get_key">int get_key(int);</A></H4> + +<H4><A NAME="Fl.get_mouse">void get_mouse(int &x,int &y);</A></H4> + +<P>Return where the mouse is on the screen by doing a round-trip query to +the server. You should use <tt>Fl::event_x_root()</tt> and <tt> +Fl::event_y_root()</tt> if possible, but this is necessary if you are +not sure if a mouse event has been processed recently (such as to +position your first window). If the display is not open, this will +open it. + +<H4><A NAME="Fl.get_system_colors">void get_system_colors();</A></H4> + +<P>Read the user preference colors from the system and use them to call +<tt> Fl::foreground()</tt>, <tt>Fl::background()</tt>, and <tt> +Fl::background2()</tt>. This is done by +<tt>Fl_Window::show(argc,argv)</tt> before applying the -fg and -bg +switches. + +<P>On X this reads some common values from the Xdefaults database. +KDE users can set these values by running the "krdb" program, and +newer versions of KDE set this automatically if you check the "apply +style to other X programs" switch in their control panel. + +<H4><A NAME="Fl.gl_visual">int gl_visual(int, int *alist=0);</A></H4> + +<P>This does the same thing as +<A href="#Fl.visual"><tt>Fl::visual(int)</tt></A> but also +requires OpenGL drawing to work. This <I>must</I> be done if +you want to draw in normal windows with OpenGL with <A +href=opengl.html#gl_start> <tt>gl_start()</tt></A> and +<tt>gl_end()</tt>. It may be useful to call this so your X +windows use the same visual as an +<A href="Fl_Gl_Window.html"><tt>Fl_Gl_Window</tt></A>, which on +some servers will reduce colormap flashing. + +<P>See <A href="Fl_Gl_Window.html#Fl_Gl_Window.mode"><tt>Fl_Gl_Window</tt></A> +for a list of additional values for the argument. + +<H4><A NAME="Fl.grab">Fl_Window* grab();<BR> +void grab(Fl_Window&w) {grab(&w);}</A></H4> + +<P>This is used when pop-up menu systems are active. Send all events to +the passed window no matter where the pointer or focus is (including +in other programs). The window <I>does not have to be +<tt>shown()</tt></I> , this lets the <tt>handle()</tt> method of a +"dummy" window override all event handling and allows you to +map and unmap a complex set of windows (under both X and WIN32 +<I>some</I> window must be mapped because the system interface needs a +window id). + +<P>If <tt>grab()</tt> is on it will also affect show() of windows by +doing system-specific operations (on X it turns on +override-redirect). These are designed to make menus popup reliably +and faster on the system. + +<P>To turn off grabbing do <tt>Fl::grab(0)</tt>. + +<P><I>Be careful that your program does not enter an infinite loop +while <tt>grab()</tt> is on. On X this will lock up your screen!</I> + +<H4><A NAME="Fl.h">int h();</A></H4> + +<P>Returns the height of the screen in pixels. + +<H4><A NAME="Fl.handle">int handle(int, Fl_Window*);</A></H4> + +<P>Sends the event to a window for processing. Returns non-zero if any +widget uses the event. + +<H4><A NAME="Fl.has_check">int has_check(Fl_Timeout_Handler, void* = 0);</A></H4> + +<P>Returns true if the check exists and has not been called yet. + +<H4><A NAME="Fl.has_idle">int has_idle(void (*cb)(void*), void* = 0);</A></H4> + +<P>Returns true if the specified idle callback is currently installed. + +<H4><A NAME="Fl.has_timeout">int has_timeout(Fl_Timeout_Handler, void* = 0);</A></H4> + +<P>Returns true if the timeout exists and has not been called yet. + +<H4><A NAME="Fl.modal">Fl_Window* modal();</A></H4> + +<P>Returns the top-most <tt>modal()</tt> window currently shown. +This is the most recently <tt> +shown()</tt> window with <A href=Fl_Window.html#Fl_Window.modal><tt> +modal()</tt></A> true, or <tt>NULL</tt> if there are no <tt>modal()</tt> +windows <tt>shown()</tt>. +The <tt>modal()</tt> window has its <tt>handle()</tt> method called +for all events, and no other windows will have <tt>handle()</tt> +called (<A href=#grab><tt>grab()</tt></A> overrides this). + +<H4><A NAME="Fl.next_window">Fl_Window* next_window(const Fl_Window*);</A></H4> + +<P>Returns the next top-level window in the list of shown() windows. You can +use this call to iterate through all the windows that are shown(). + +<H4><A NAME="Fl.own_colormap">void own_colormap();</A></H4> + +<P>Makes FLTK use its own colormap. This may make FLTK display better +and will reduce conflicts with other programs that want lots of colors. +However the colors may flash as you move the cursor between windows. + +<P>This does nothing if the current visual is not colormapped. + +<H4><A NAME="Fl.paste">void paste(Fl_Widget &receiver);</A></H4> + +<P>Set things up so the receiver widget will be called with an <A href="enumerations.html#events"> +<tt>FL_PASTE</tt></A> event some time in the future. The reciever +should be prepared to be called <I>directly</I> by this, or for it to +happen <I>later</I>, or possibly <I>not at all</I>. This allows the +window system to take as long as necessary to retrieve the paste buffer +(or even to screw up completely) without complex and error-prone +synchronization code in FLTK. + +<H4><A NAME="Fl.pushed">Fl_Widget* pushed();<BR> +void pushed(Fl_Widget*);</A></H4> + +<P>Get or set the widget that is being pushed. <tt>FL_DRAG</tt> or <tt> +FL_RELEASE</tt> (and any more <tt>FL_PUSH</tt>) events will be sent to +this widget. + +<P>If you change the pushed widget, the previous one and all parents +(that don't contain the new widget) are sent <tt>FL_RELEASE</tt> +events. Changing this does <I>not</I> send <tt>FL_PUSH</tt> to this +or any widget, because sending <tt>FL_PUSH</tt> is supposed to <I>test</I> +if the widget wants the mouse (by it returning non-zero from <tt> +handle()</tt>). + +<H4><A NAME="Fl.readqueue">Fl_Widget* readqueue();</A></H4> + +<P>All <tt>Fl_Widgets</tt> that don't have a callback defined use a +default callback that puts a pointer to the widget in this queue, and +this method reads the oldest widget out of this queue. + +<H4><A NAME="Fl.ready">int ready();</A></H4> + +<P>This is similar to <tt>Fl::check()</tt> except this does <I>not</I> +call <tt>Fl::flush()</tt> or any callbacks, which is useful if your +program is in a state where such callbacks are illegal. This returns +true if <tt>Fl::check()</tt> would do anything (it will continue to +return true until you call <tt>Fl::check()</tt> or <tt>Fl::wait()</tt>). + +<UL><PRE> +while (!calculation_done()) { + calculate(); + if (Fl::ready()) { + do_expensive_cleanup(); + Fl::check(); + if (user_hit_abort_button()) break; + } +} +</PRE></UL> + +<H4><A NAME="Fl.redraw">void redraw();</A></H4> + +<P>Redraws all widgets. + +<H4><A NAME="Fl.release">void release();</A></H4> + +<H4><A NAME="Fl.remove_check">void remove_check(Fl_Timeout_Handler, void* = 0);</A></H4> + +<P>Removes a check callback. It is harmless to remove a check +callback that no longer exists. + +<H4><A NAME="Fl.remove_fd">void remove_fd(int, int when);<BR> +void remove_fd(int);</A></H4> + +<H4><A NAME="Fl.remove_idle">void remove_idle(void (*cb)(void*), void* = 0);</A></H4> + +<P>Removes the specified idle callback, if it is installed. + +<H4><A NAME="Fl.remove_timeout">void remove_timeout(Fl_Timeout_Handler, void* = 0);</A></H4> + +<P>Removes a timeout callback. It is harmless to remove a timeout +callback that no longer exists. + +<H4><A NAME="Fl.repeat_timeout">void repeat_timeout(double t, Fl_Timeout_Handler,void* = 0);</A></H4> + +<P>Inside a timeout callback you can call this to add another timeout. +Rather than the time being measured from "now", it is measured from +when the system call elapsed that caused this timeout to be called. This +will result in far more accurate spacing of the timeout callbacks, it +also has slightly less system call overhead. (It will also use all +your machine time if your timeout code and FLTK's overhead take more +than <i>t</i> seconds, as the real timeout will be reduced to zero). + +<p>It is undefined what this does if called from outside a timeout +callback. + +<P>This code will print "TICK" each second on stdout, with a +fair degree of accuracy: + +<UL><PRE> +void callback(void*) { + printf("TICK\n"); + Fl::repeat_timeout(1.0,callback); +} + +main() { + Fl::add_timeout(1.0,callback); + return Fl::run(); +} +</PRE></UL> + +<H4><A NAME="Fl.run">int run();</A></H4> + +<P>As long as any windows are displayed this calls <tt>Fl::wait()</tt> +repeatedly. When all the windows are closed it returns zero +(supposedly it would return non-zero on any errors, but FLTK calls +exit directly for these). A normal program will end <tt>main()</tt> +with <tt>return Fl::run();</tt>. + +<H4><A NAME="Fl.selection">void selection(Fl_Widget &owner, const char* stuff, int len);</A></H4> + +<P>Changes the current selection. The block of text is +copied to an internal buffer by FLTK (be careful if doing this in +response to an <tt>FL_PASTE</tt> as this <I>may</I> be the same buffer +returned by <tt>event_text()</tt>). The <tt>selection_owner()</tt> +widget is set to the passed owner (possibly sending <tt> +FL_SELECTIONCLEAR</tt> to the previous owner). + +<H4><A NAME="Fl.selection_owner">Fl_Widget* selection_owner();<BR> +void selection_owner(Fl_Widget*);</A></H4> + +<P>The single-argument <tt>selection_owner(x)</tt> call can be used to +move the selection to another widget or to set the owner to +<tt>NULL</tt>, without changing the actual text of the +selection. <tt>FL_SELECTIONCLEAR</tt> is sent to the previous +selection owner, if any. + +<P><I>Copying the buffer every time the selection is changed is +obviously wasteful, especially for large selections. An interface will +probably be added in a future version to allow the selection to be made +by a callback function. The current interface will be emulated on top +of this.</I> + +<H4><A NAME="Fl.set_abort">void set_abort(void (*f)(const char*,...));</A></H4> + +<H4><A NAME="Fl.set_atclose">void set_atclose(void (*f)(Fl_Window*,void*));</A></H4> + +<H4><A NAME="Fl.set_boxtype">void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);<BR> +void set_boxtype(Fl_Boxtype, Fl_Boxtype from);</A></H4> + +<P>The first form sets the function to call to draw a specific boxtype. + +<P>The second form copies the <tt>from</tt> boxtype. + +<H4><A NAME="Fl.set_color">void set_color(Fl_Color, uchar, uchar, uchar);<BR> +void set_color(Fl_Color, unsigned);</A></H4> + +<P>Sets an entry in the <tt>fl_color</tt> index table. You can set it to +any 8-bit RGB color. The color is not allocated until <tt>fl_color(i)</tt> +is used. + +<H4><A NAME="Fl.set_font">void set_font(Fl_Font, const char*);<BR> +void set_font(Fl_Font, Fl_Font);</A></H4> + +<P>The first form changes a face. The string pointer is simply stored, +the string is not copied, so the string must be in static memory. + +<P>The second form copies one face to another. + +<H4><A NAME="Fl.set_fonts">Fl_Font set_fonts(const char* = 0);</A></H4> + +<P>FLTK will open the display, and add every font on the server to the +face table. It will attempt to put "families" of faces together, so +that the normal one is first, followed by bold, italic, and bold +italic. + +<P>The optional argument is a string to describe the set of fonts to +add. Passing <tt>NULL</tt> will select only fonts that have the +ISO8859-1 character set (and are thus usable by normal text). Passing +"-*" will select all fonts with any encoding as long as they have +normal X font names with dashes in them. Passing "*" will list every +font that exists (on X this may produce some strange output). Other +values may be useful but are system dependent. With WIN32 <tt>NULL</tt> +selects fonts with ISO8859-1 encoding and non-<tt>NULL</tt> selects +all fonts. + +<P>The return value is how many faces are in the table after this is +done. + +<H4><A NAME="Fl.set_idle">void set_idle(void (*cb)());</A></H4> + +<H4><A NAME="Fl.set_labeltype">void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);<BR> +void set_labeltype(Fl_Labeltype, Fl_Labeltype from);</A></H4> + +<P>The first form sets the functions to call to draw and measure a +specific labeltype. + +<P>The second form copies the <tt>from</tt> labeltype. + +<H4><A NAME="Fl.test_shortcut">int test_shortcut(int);</A></H4> + +<P>Test the current event, which must be an <tt>FL_KEYBOARD</tt> or <tt> +FL_SHORTCUT</tt>, against a shortcut value (described in <A href=Fl_Button.html#Fl_Button.shortcut> +<tt>Fl_Button</tt></A>). Returns non-zero if there is a match. Not to +be confused with <A href="subclassing.html#test_shortcut"><tt> +Fl_Widget::test_shortcut()</tt></A>. + +<H4><A NAME="Fl.version">double version();</A></H4> + +<P>Returns the compiled-in value of the FL_VERSION constant. This +is useful for checking the version of a shared library. + +<H4><A NAME="Fl.visible_focus">void visible_focus(int v);<BR> +int visible_focus();</A></H4> + +<P>Gets or sets the visible keyboard focus on buttons and other +non-text widgets. The default mode is to enable keyboard focus +for all widgets. + +<H4><A NAME="Fl.visual">int visual(int);</A></H4> + +<P>Selects a visual so that your graphics are drawn correctly. This is +only allowed before you call show() on any windows. This does nothing +if the default visual satisfies the capabilities, or if no visual +satisfies the capabilities, or on systems that don't have such +brain-dead notions. + +<P>Only the following combinations do anything useful: + +<UL> +<LI><tt>Fl::visual(FL_RGB)</tt> +<BR>Full/true color (if there are several depths FLTK chooses the +largest). Do this if you use <A href="drawing.html#fl_draw_image"><tt>fl_draw_image</tt> +</A> for much better (non-dithered) output. +<BR> </LI> +<LI><tt>Fl::visual(FL_RGB8)</tt> +<BR>Full color with at least 24 bits of color. <tt>FL_RGB</tt> will +always pick this if available, but if not it will happily return a +less-than-24 bit deep visual. This call fails if 24 bits are not +available. +<BR> </LI> +<LI><tt>Fl::visual(FL_DOUBLE|FL_INDEX)</tt> +<BR>Hardware double buffering. Call this if you are going to use <A href=Fl_Double_Window.html#Fl_Double_Window> +<tt>Fl_Double_Window</tt></A>. +<BR> </LI> +<LI><tt>Fl::visual(FL_DOUBLE|FL_RGB)</tt></LI> +<LI><tt>Fl::visual(FL_DOUBLE|FL_RGB8)</tt> +<BR>Hardware double buffering and full color. +</UL> + +<P>This returns true if the system has the capabilities by default or +FLTK suceeded in turing them on. Your program will still work even if +this returns false (it just won't look as good). + +<H4><A NAME="Fl.w">int w();</A></H4> + +<P>Returns the width of the screen in pixels. + +<H4><A NAME="Fl.wait">int wait();<BR> +double wait(double time);</A></H4> + +<P>Waits until "something happens" and then returns. Call this +repeatedly to "run" your program. You can also check what happened +each time after this returns, which is quite useful for managing +program state. + +<P>What this really does is call all idle callbacks, all elapsed +timeouts, call <tt>Fl::flush()</tt> to get the screen to update, and +then wait some time (zero if there are idle callbacks, the shortest of +all pending timeouts, or infinity), for any events from the user or +any <tt>Fl::add_fd()</tt> callbacks. It then handles the events and +calls the callbacks and then returns. + +<P>The return value of the first form is non-zero if there are +any visible windows - this may change in future versions of +FLTK. + +<P>The second form waits a maximum of <i>time</i> +seconds. <i>It can return much sooner if something happens.</i> + +<P>The return value is positive if an event or fd happens before the +time elapsed. It is zero if nothing happens (on Win32 this will only +return zero if <i>time</i> is zero). It is negative if an error +occurs (this will happen on Unix if a signal happens). + +<H4><A NAME="Fl.warning">void (*warning)(const char*, ...);</A></H4> + +<P>FLTK calls this to print a warning message. You can +override the behavior by setting the function pointer to your +own routine. + +<P><tt>Fl::warning</tt> means that there was a recoverable +problem, the display may be messed up but the user can probably +keep working - all X protocol errors call this, for example. + +<H4><A NAME="Fl.x">int x();</A></H4> -<P>The constructors create a new bitmap from the specified bitmap data.</P> +<P>Returns the origin of the current screen, where 0 indicates +the left side of the screen. -<H4><A name="Fl_Bitmap.~Fl_Bitmap">Fl_Bitmap::~Fl_Bitmap();</A></H4> +<H4><A NAME="Fl.y">int y();</A></H4> -<P>The destructor free all memory and server resources that are used by -the bitmap.</P> +<P>Returns the origin of the current screen, where 0 indicates +the top edge of the screen. </BODY> </HTML> diff --git a/documentation/Fl_Text_Display.html b/documentation/Fl_Text_Display.html index a99da8d93..68ddd6db9 100644 --- a/documentation/Fl_Text_Display.html +++ b/documentation/Fl_Text_Display.html @@ -1,336 +1,169 @@ -<HTML><BODY> +<HTML> +<BODY> + <!-- NEW PAGE --> + <H2><A name=Fl_Input>class Fl_Input</A></H2> + <HR> + <H3>Class Hierarchy</H3> + <UL> <PRE> -<A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A> +<A href="Fl_Group.html">Fl_Group</A> | - +----<B>Fl_Input</B> + +----<B>Fl_Text_Display</B>----<A HREF="Fl_Text_Buffer.html">Fl_Text_Buffer</A> | - +----<A href=Fl_Float_Input.html#Fl_Float_Input>Fl_Float_Input</A>, <A href=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A>, - <A href=Fl_Multiline_Input.html#Fl_Multiline_Input>Fl_Multiline_Input</A>, <A href=Fl_Secret_Input.html#Fl_Secret_Input>Fl_Secret_Input</A> + +----<A href="Fl_Text_Editor.html">Fl_Text_Editor</A> </PRE> </UL> <H3>Include Files</H3> + <UL> <PRE> -#include <FL/Fl_Input.H> +#include <FL/Fl_Text_Display.H> </PRE> </UL> + <H3>Description</H3> -<P>This is the FLTK text input widget. It displays a single line of text -and lets the user edit it. Normally it is drawn with an inset box and -a white background. The text may contain any characters (even 0), and -will correctly display anything, using ^X notation for unprintable -control characters and \nnn notation for unprintable characters with -the high bit set. It assumes the font can draw any characters in the -ISO-8859-1 character set. - -<CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings."> - -<TR><TD WIDTH=200><B>Mouse button 1</B></TD><TD>Moves the cursor to - this point. Drag selects characters. Double click selects words. - Triple click selects all text. Shift+click extends the selection. - When you select text it is automatically copied to the clipboard. -</TD></TR> - -<TR><TD><B>Mouse button 2</B></TD><TD>Insert the clipboard at -the point clicked. You can also select a region and replace it with the -clipboard by selecting the region with mouse button 2. -</TD></TR> - -<TR><TD><B>Mouse button 3</B></TD><TD>Currently acts like button 1.</TD></TR> - -<TR><TD><B>Backspace</B></TD><TD>Deletes one character to the left, or -deletes the selected region.</TD></TR> -<TR><TD><B>Enter</B></TD><TD>May cause the callback, see when().</TD></TR> -<TR><TD><B>^A or Home</B></TD><TD>Go to start of line.</TD></TR> -<TR><TD><B>^B or Left</B></TD><TD>Move left</TD></TR> -<TR><TD><B>^C</B></TD><TD>Copy the selection to the clipboard</TD></TR> -<TR><TD><B>^D or Delete</B></TD><TD>Deletes one character to the right -or deletes the selected region.</TD></TR> -<TR><TD><B>^E or End</B></TD><TD>Go to the end of line.</TD></TR> -<TR><TD><B>^F or Right</B></TD><TD>Move right</TD></TR> -<TR><TD><B>^K</B></TD><TD>Delete to the end of line (next \n character) -or deletes a single \n character. These deletions are all concatenated -into the clipboard.</TD></TR> -<TR><TD><B>^N or Down</B></TD><TD>Move down (for Fl_Multiline_Input -only, otherwise it moves to the next input field).</TD></TR> -<TR><TD><B>^P or Up</B></TD><TD>Move up (for Fl_Multiline_Input only, -otherwise it moves to the previous input field).</TD></TR> -<TR><TD><B>^U</B></TD><TD>Delete everything.</TD></TR> -<TR><TD><B>^V or ^Y</B></TD><TD>Paste the clipboard</TD></TR> -<TR><TD><B>^X or ^W</B></TD><TD>Copy the region to the clipboard and -delete it.</TD></TR> -<TR><TD><B>^Z or ^_</B></TD><TD>Undo. This is a single-level undo -mechanism, but all adjacent deletions and insertions are concatenated -into a single "undo". Often this will undo a lot more than you -expected.</TD></TR> -<TR><TD><B>Shift+move</B></TD><TD>Move the cursor but also extend the -selection.</TD></TR> - -<TR><TD><B>RightCtrl or -<BR>Compose</B></TD><TD><a name=compose>Start</A> -a <A href="events.html#compose">compose-character</A> -sequence. The next one or two keys typed define the character to -insert (see table that follows.) - -<p>For instance, to type "á" type [compose][a]['] or [compose]['][a]. - -<P>The character "nbsp" (non-breaking space) is typed by using -[compose][space]. - -<P>The single-character sequences may be followed by a space if -necessary to remove ambiguity. For instance, if you really want to -type "ª~" rather than "ã" you must type [compose][a][space][~]. - -<p>The same key may be used to "quote" control characters into the -text. If you need a <tt>^Q</tt> character you can get one by typing -[compose][Control+Q]. - -<p>X may have a key on the keyboard -defined as <tt>XK_Multi_key</tt>. If so this key may be used as well -as the right-hand control key. You can set this up with the program -<tt>xmodmap</tt>. - -<p>If your keyboard is set to support a foreign language you should -also be able to type "dead key" prefix characters. On X you will -actually be able to see what dead key you typed, and if you then move -the cursor without completing the sequence the accent will remain -inserted. -</TABLE></CENTER> -<!-- NEW PAGE --> -<center><table border=1 summary="Character Composition Table"> -<caption align="top">Character Composition Table</caption> -<tr> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - -</tr><tr> - <td align=center><TT>sp</TT></td><td align=center><small>nbsp</small></td> - <td align=center><TT>*</tt></td><td align=center>°</td> - <td align=center><TT>` A</tt></td><td align=center>À</td> - <td align=center><TT>D -</tt></td><td align=center>Ð</td> - <td align=center><TT>` a</tt></td><td align=center>à</td> - <td align=center><TT>d -</tt></td><td align=center>ð -</tr><tr> - <td align=center><TT>!</tt></td><td align=center>¡</td> - <td align=center><TT>+ -</tt></td><td align=center>±</td> - <td align=center><TT>' A</tt></td><td align=center>Á</td> - <td align=center><TT>~ N</tt></td><td align=center>Ñ</td> - <td align=center><TT>' a</tt></td><td align=center>á</td> - <td align=center><TT>~ n</tt></td><td align=center>ñ -</tr><tr> - <td align=center><TT>%</tt></td><td align=center>¢</td> - <td align=center><TT>2</tt></td><td align=center>²</td> - <td align=center><TT>A ^</tt></td><td align=center>Â</td> - <td align=center><TT>` O</tt></td><td align=center>Ò</td> - <td align=center><TT>^ a</tt></td><td align=center>â</td> - <td align=center><TT>` o</tt></td><td align=center>ò -</tr><tr> - <td align=center><TT>#</tt></td><td align=center>£</td> - <td align=center><TT>3</tt></td><td align=center>³</td> - <td align=center><TT>~ A</tt></td><td align=center>Ã</td> - <td align=center><TT>' O</tt></td><td align=center>Ó</td> - <td align=center><TT>~ a</tt></td><td align=center>ã</td> - <td align=center><TT>' o</tt></td><td align=center>ó -</tr><tr> - <td align=center><TT>$</tt></td><td align=center>¤</td> - <td align=center><TT>'</tt></td><td align=center>´</td> - <td align=center><TT>: A</tt></td><td align=center>Ä</td> - <td align=center><TT>^ O</tt></td><td align=center>Ô</td> - <td align=center><TT>: a</tt></td><td align=center>ä</td> - <td align=center><TT>^ o</tt></td><td align=center>ô -</tr><tr> - <td align=center><TT>y =</tt></td><td align=center>¥</td> - <td align=center><TT>u</tt></td><td align=center>µ</td> - <td align=center><TT>* A</tt></td><td align=center>Å</td> - <td align=center><TT>~ O</tt></td><td align=center>Õ</td> - <td align=center><TT>* a</tt></td><td align=center>å</td> - <td align=center><TT>~ o</tt></td><td align=center>õ -</tr><tr> - <td align=center><TT>|</tt></td><td align=center>¦</td> - <td align=center><TT>p</tt></td><td align=center>¶</td> - <td align=center><TT>A E</tt></td><td align=center>Æ</td> - <td align=center><TT>: O</tt></td><td align=center>Ö</td> - <td align=center><TT>a e</tt></td><td align=center>æ</td> - <td align=center><TT>: o</tt></td><td align=center>ö -</tr><tr> - <td align=center><TT>&</tt></td><td align=center>§</td> - <td align=center><TT>.</tt></td><td align=center>·</td> - <td align=center><TT>, C</tt></td><td align=center>Ç</td> - <td align=center><TT>x</tt></td><td align=center>×</td> - <td align=center><TT>, c</tt></td><td align=center>ç</td> - <td align=center><TT>- :</tt></td><td align=center>÷ -</tr><tr> - <td align=center><TT>:</tt></td><td align=center>¨</td> - <td align=center><TT>,</tt></td><td align=center>¸</td> - <td align=center><TT>E `</tt></td><td align=center>È</td> - <td align=center><TT>O /</tt></td><td align=center>Ø</td> - <td align=center><TT>` e</tt></td><td align=center>è</td> - <td align=center><TT>o /</tt></td><td align=center>ø -</tr><tr> - <td align=center><TT>c</tt></td><td align=center>©</td> - <td align=center><TT>1</tt></td><td align=center>¹</td> - <td align=center><TT>' E</tt></td><td align=center>É</td> - <td align=center><TT>` U</tt></td><td align=center>Ù</td> - <td align=center><TT>' e</tt></td><td align=center>é</td> - <td align=center><TT>` u</tt></td><td align=center>ù -</tr><tr> - <td align=center><TT>a</tt></td><td align=center>ª</td> - <td align=center><TT>o</tt></td><td align=center>º</td> - <td align=center><TT>^ E</tt></td><td align=center>Ê</td> - <td align=center><TT>' U</tt></td><td align=center>Ú</td> - <td align=center><TT>^ e</tt></td><td align=center>ê</td> - <td align=center><TT>' u</tt></td><td align=center>ú -</tr><tr> - <td align=center><TT>< <</tt></td><td align=center>«</td> - <td align=center><TT>> ></tt></td><td align=center>»</td> - <td align=center><TT>: E</tt></td><td align=center>Ë</td> - <td align=center><TT>^ U</tt></td><td align=center>Û</td> - <td align=center><TT>: e</tt></td><td align=center>ë</td> - <td align=center><TT>^ u</tt></td><td align=center>û -</tr><tr> - <td align=center><TT>~</tt></td><td align=center>¬</td> - <td align=center><TT>1 4</tt></td><td align=center>¼</td> - <td align=center><TT>` I</tt></td><td align=center>Ì</td> - <td align=center><TT>: U</tt></td><td align=center>Ü</td> - <td align=center><TT>` i</tt></td><td align=center>ì</td> - <td align=center><TT>: u</tt></td><td align=center>ü -</tr><tr> - <td align=center><TT>-</tt></td><td align=center></td> - <td align=center><TT>1 2</tt></td><td align=center>½</td> - <td align=center><TT>' I</tt></td><td align=center>Í</td> - <td align=center><TT>' Y</tt></td><td align=center>Ý</td> - <td align=center><TT>' i</tt></td><td align=center>í</td> - <td align=center><TT>' y</tt></td><td align=center>ý -</tr><tr> - <td align=center><TT>r</tt></td><td align=center>®</td> - <td align=center><TT>3 4</tt></td><td align=center>¾</td> - <td align=center><TT>^ I</tt></td><td align=center>Î</td> - <td align=center><TT>T H</tt></td><td align=center>Þ</td> - <td align=center><TT>^ i</tt></td><td align=center>î</td> - <td align=center><TT>t h</tt></td><td align=center>þ -</tr><tr> - <td align=center><TT>_</tt></td><td align=center>¯</td> - <td align=center><TT>?</tt></td><td align=center>¿</td> - <td align=center><TT>: I</tt></td><td align=center>Ï</td> - <td align=center><TT>s s</tt></td><td align=center>ß</td> - <td align=center><TT>: i</tt></td><td align=center>ï</td> - <td align=center><TT>: y</tt></td><td align=center>ÿ -</table></center> +<P>This is the FLTK text display widget. It allows the user to +view multiple lines of text and supports highlighting and +scrolling. The buffer that is displayed in the widget is managed +by the <A HREF="Fl_Text_Buffer.html"><TT>Fl_Text_Buffer</TT></A> +class. + <H3>Methods</H3> -<CENTER> -<TABLE width=90% summary="Fl_Input methods."> -<TR><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.Fl_Input>Fl_Input</A></LI> -<LI><A href=#Fl_Input.~Fl_Input>~Fl_Input</A></LI> -<LI><A href=#Fl_Input.cursor_color>cursor_color</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.index>index</A></LI> -<LI><A href=#Fl_Input.size>size</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.static_value>static_value</A></LI> -<LI><A href=#Fl_Input.textcolor>textcolor</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.textfont>textfont</A></LI> -<LI><A href=#Fl_Input.textsize>textsize</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.value>value</A></LI> -<LI><A href=#Fl_Input.when>when</A></LI> -</UL> -</TD></TR> -</TABLE> -</CENTER> -<H4><A name=Fl_Input.Fl_Input>Fl_Input::Fl_Input(int x, int y, int w, -int h, const char *label = 0)</A></H4> - Creates a new <TT>Fl_Input</TT> widget using the given position, size, -and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>. -<H4><A name=Fl_Input.~Fl_Input>virtual Fl_Input::~Fl_Input()</A></H4> - Destroys the widget and any value associated with it. -<H4><A name=Fl_Input.value>const char *Fl_Input::value() const -<BR> int Fl_Input::value(const char*) -<BR> int Fl_Input::value(const char*, int)</A></H4> - The first form returns the current value, which is a pointer to the -internal buffer and is valid only until the next event is handled. -<P>The second two forms change the text and set the mark and the point -to the end of it. The string is copied to the internal buffer. Passing <TT> -NULL</TT> is the same as "". This returns non-zero if the new value is -different than the current one. You can use the second version to -directly set the length if you know it already or want to put nul's in -the text. </P> -<H4><A name=Fl_Input.static_value>int Fl_Input::static_value(const -char*) -<BR> int Fl_Input::static_value(const char*, int)</A></H4> - Change the text and set the mark and the point to the end of it. The -string is <I>not</I> copied. If the user edits the string it is copied -to the internal buffer then. This can save a great deal of time and -memory if your program is rapidly changing the values of text fields, -but this will only work if the passed string remains unchanged until -either the <TT>Fl_Input</TT> is destroyed or <TT>value()</TT> is called -again. -<H4><A name=Fl_Input.size>int Fl_Input::size() const</A></H4> - Returns the number of characters in <TT>value()</TT>. This may be -greater than <TT>strlen(value())</TT> if there are nul characters in -it. -<H4><A name=Fl_Input.index>char Fl_Input::index(int) const</A></H4> - Same as <TT>value()[n]</TT>, but may be faster in plausible -implementations. No bounds checking is done. -<H4><A name=Fl_Input.when>Fl_When Fl_Widget::when() const -<BR> void Fl_Widget::when(Fl_When)</A></H4> - Controls when callbacks are done. The following values are useful, -the default value is <TT>FL_WHEN_RELEASE</TT>: + <UL> -<LI><TT>0</TT>: The callback is not done, but <TT>changed()</TT> is - turned on. </LI> -<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each time the text -is changed by the user. </LI> -<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done when this -widget loses the focus, including when the window is unmapped. This -is a useful value for text fields in a panel where doing the callback -on every change is wasteful. However the callback will also happen if -the mouse is moved out of the window, which means it should not do -anything visible (like pop up an error message). You might do better -setting this to zero, and scanning all the items for <TT>changed()</TT> - when the OK button on a panel is pressed. </LI> -<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the Enter key, the -entire text is selected, and the callback is done if the text has -changed. Normally the Enter key will navigate to the next field (or -insert a newline for a <TT>Fl_Mulitline_Input</TT>), this changes the -behavior. </LI> -<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The Enter key will -do the callback even if the text has not changed. Useful for command -fields. </LI> + + <LI><A HREF="#Fl_Text_Display.Fl_Text_Display">Fl_Text_Display</A></LI> + <LI><A HREF="#Fl_Text_Display.~Fl_Text_Display">~Fl_Text_Display</A></LI> + <LI><A HREF="#Fl_Text_Display.buffer">buffer</A></LI> + <LI><A HREF="#Fl_Text_Display.cursor_style">cursor_style</A></LI> + <LI><A HREF="#Fl_Text_Display.hide_cursor">hide_cursor</A></LI> + <LI><A HREF="#Fl_Text_Display.highlight_data">highlight_data</A></LI> + <LI><A HREF="#Fl_Text_Display.in_selection">in_selection</A></LI> + <LI><A HREF="#Fl_Text_Display.insert">insert</A></LI> + <LI><A HREF="#Fl_Text_Display.insert_position">insert_position</A></LI> + <LI><A HREF="#Fl_Text_Display.move_down">move_down</A></LI> + <LI><A HREF="#Fl_Text_Display.move_left">move_left</A></LI> + <LI><A HREF="#Fl_Text_Display.move_right">move_right</A></LI> + <LI><A HREF="#Fl_Text_Display.move_up">move_up</A></LI> + <LI><A HREF="#Fl_Text_Display.next_word">next_word</A></LI> + <LI><A HREF="#Fl_Text_Display.overstrike">overstrike</A></LI> + <LI><A HREF="#Fl_Text_Display.position_style">position_style</A></LI> + <LI><A HREF="#Fl_Text_Display.previous_word">previous_word</A></LI> + <LI><A HREF="#Fl_Text_Display.redisplay_range">redisplay_range</A></LI> + <LI><A HREF="#Fl_Text_Display.scrollbar_align">scrollbar_align</A></LI> + <LI><A HREF="#Fl_Text_Display.scrollbar_width">scrollbar_width</A></LI> + <LI><A HREF="#Fl_Text_Display.scroll">scroll</A></LI> + <LI><A HREF="#Fl_Text_Display.show_cursor">show_cursor</A></LI> + <LI><A HREF="#Fl_Text_Display.show_insert_position">show_insert_position</A></LI> + <LI><A HREF="#Fl_Text_Display.textcolor">textcolor</A></LI> + <LI><A HREF="#Fl_Text_Display.textfont">textfont</A></LI> + <LI><A HREF="#Fl_Text_Display.textsize">textsize</A></LI> + <LI><A HREF="#Fl_Text_Display.word_end">word_end</A></LI> + <LI><A HREF="#Fl_Text_Display.word_start">word_start</A></LI> + </UL> -<H4><A name=Fl_Input.textcolor>Fl_Color Fl_Input::textcolor() const -<BR> void Fl_Input::textcolor(Fl_Color)</A></H4> - Gets or sets the color of the text in the input field. -<H4><A name=Fl_Input.textfont>Fl_Font Fl_Input::textfont() const -<BR> void Fl_Input::textfont(Fl_Font)</A></H4> - Gets or sets the font of the text in the input field. -<H4><A name=Fl_Input.textsize>uchar Fl_Input::textsize() const -<BR> void Fl_Input::textsize(uchar)</A></H4> - Gets or sets the size of the text in the input field. -<H4><A name=Fl_Input.cursor_color>Fl_Color Fl_Input::cursor_color() -const -<BR> void Fl_Input::cursor_color(Fl_Color)</A></H4> - Get or set the color of the cursor. This is black by default. - -</BODY></HTML> + +<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> + + +<H4><A NAME="Fl_Text_Display.~Fl_Text_Display">~Fl_Text_Display();</A></H4> + + +<H4><A NAME="Fl_Text_Display.buffer">void buffer(Fl_Text_Buffer* buf);<BR> +void buffer(Fl_Text_Buffer& buf);<BR> +Fl_Text_Buffer* buffer();</A></H4> + +<H4><A NAME="Fl_Text_Display.cursor_style">void cursor_style(int style);</A></H4> + + +<H4><A NAME="Fl_Text_Display.hide_cursor">void hide_cursor();</A></H4> + + +<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> + + +<H4><A NAME="Fl_Text_Display.in_selection">int in_selection(int x, int y);</A></H4> + + +<H4><A NAME="Fl_Text_Display.insert">void insert(const char* text);</A></H4> + + +<H4><A NAME="Fl_Text_Display.insert_position">void insert_position(int newPos);<BR> +int insert_position()</A></H4> + + +<H4><A NAME="Fl_Text_Display.move_down">int move_down();</A></H4> + + +<H4><A NAME="Fl_Text_Display.move_left">int move_left();</A></H4> + + +<H4><A NAME="Fl_Text_Display.move_right">int move_right();</A></H4> + + +<H4><A NAME="Fl_Text_Display.move_up">int move_up();</A></H4> + + +<H4><A NAME="Fl_Text_Display.next_word">void next_word(void);</A></H4> + + +<H4><A NAME="Fl_Text_Display.overstrike">void overstrike(const char* text);</A></H4> + + +<H4><A NAME="Fl_Text_Display.position_style">int position_style(int lineStartPos, int lineLen, int lineIndex, +int dispIndex);</A></H4> + + +<H4><A NAME="Fl_Text_Display.previous_word">void previous_word(void);</A></H4> + + +<H4><A NAME="Fl_Text_Display.redisplay_range">void redisplay_range(int start, int end);</A></H4> + + +<H4><A NAME="Fl_Text_Display.scrollbar_align">void scrollbar_align(Fl_Align a);<BR> +Fl_Align scrollbar_align();</A></H4> + + +<H4><A NAME="Fl_Text_Display.scrollbar_width">void scrollbar_width(int w);<BR> +int scrollbar_width();</A></H4> + + +<H4><A NAME="Fl_Text_Display.scroll">void scroll(int topLineNum, int horizOffset);</A></H4> + + +<H4><A NAME="Fl_Text_Display.show_cursor">void show_cursor(int b = 1);</A></H4> + + +<H4><A NAME="Fl_Text_Display.show_insert_position">void show_insert_position();</A></H4> + + +<H4><A NAME="Fl_Text_Display.textcolor">void textcolor(unsigned n);<BR> +Fl_Color textcolor() const;</A></H4> + + +<H4><A NAME="Fl_Text_Display.textfont">void textfont(uchar s);<BR> +Fl_Font textfont() const;</A></H4> + + +<H4><A NAME="Fl_Text_Display.textsize">void textsize(uchar s);<BR> +uchar textsize() const;</A></H4> + + +<H4><A NAME="Fl_Text_Display.word_end">int word_end(int pos);</A></H4> + + +<H4><A NAME="Fl_Text_Display.word_start">int word_start(int pos);</A></H4> + + +</BODY> +</HTML> diff --git a/documentation/Fl_Text_Editor.html b/documentation/Fl_Text_Editor.html index a99da8d93..f849edaf4 100644 --- a/documentation/Fl_Text_Editor.html +++ b/documentation/Fl_Text_Editor.html @@ -1,336 +1,173 @@ -<HTML><BODY> +<HTML> +<BODY> + <!-- NEW PAGE --> -<H2><A name=Fl_Input>class Fl_Input</A></H2> + +<H2><A name=Fl_Text_Editor>class Fl_Text_Editor</A></H2> + <HR> + <H3>Class Hierarchy</H3> + <UL> <PRE> -<A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A> +<A href="Fl_Text_Display.html">Fl_Text_Display</A> | - +----<B>Fl_Input</B> - | - +----<A href=Fl_Float_Input.html#Fl_Float_Input>Fl_Float_Input</A>, <A href=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A>, - <A href=Fl_Multiline_Input.html#Fl_Multiline_Input>Fl_Multiline_Input</A>, <A href=Fl_Secret_Input.html#Fl_Secret_Input>Fl_Secret_Input</A> + +----<B>Fl_Text_Editor</B> </PRE> </UL> + <H3>Include Files</H3> + <UL> <PRE> -#include <FL/Fl_Input.H> +#include <FL/Fl_Text_Editor.H> </PRE> </UL> + <H3>Description</H3> -<P>This is the FLTK text input widget. It displays a single line of text -and lets the user edit it. Normally it is drawn with an inset box and -a white background. The text may contain any characters (even 0), and -will correctly display anything, using ^X notation for unprintable -control characters and \nnn notation for unprintable characters with -the high bit set. It assumes the font can draw any characters in the -ISO-8859-1 character set. - -<CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings."> - -<TR><TD WIDTH=200><B>Mouse button 1</B></TD><TD>Moves the cursor to - this point. Drag selects characters. Double click selects words. - Triple click selects all text. Shift+click extends the selection. - When you select text it is automatically copied to the clipboard. -</TD></TR> - -<TR><TD><B>Mouse button 2</B></TD><TD>Insert the clipboard at -the point clicked. You can also select a region and replace it with the -clipboard by selecting the region with mouse button 2. -</TD></TR> - -<TR><TD><B>Mouse button 3</B></TD><TD>Currently acts like button 1.</TD></TR> - -<TR><TD><B>Backspace</B></TD><TD>Deletes one character to the left, or -deletes the selected region.</TD></TR> -<TR><TD><B>Enter</B></TD><TD>May cause the callback, see when().</TD></TR> -<TR><TD><B>^A or Home</B></TD><TD>Go to start of line.</TD></TR> -<TR><TD><B>^B or Left</B></TD><TD>Move left</TD></TR> -<TR><TD><B>^C</B></TD><TD>Copy the selection to the clipboard</TD></TR> -<TR><TD><B>^D or Delete</B></TD><TD>Deletes one character to the right -or deletes the selected region.</TD></TR> -<TR><TD><B>^E or End</B></TD><TD>Go to the end of line.</TD></TR> -<TR><TD><B>^F or Right</B></TD><TD>Move right</TD></TR> -<TR><TD><B>^K</B></TD><TD>Delete to the end of line (next \n character) -or deletes a single \n character. These deletions are all concatenated -into the clipboard.</TD></TR> -<TR><TD><B>^N or Down</B></TD><TD>Move down (for Fl_Multiline_Input -only, otherwise it moves to the next input field).</TD></TR> -<TR><TD><B>^P or Up</B></TD><TD>Move up (for Fl_Multiline_Input only, -otherwise it moves to the previous input field).</TD></TR> -<TR><TD><B>^U</B></TD><TD>Delete everything.</TD></TR> -<TR><TD><B>^V or ^Y</B></TD><TD>Paste the clipboard</TD></TR> -<TR><TD><B>^X or ^W</B></TD><TD>Copy the region to the clipboard and -delete it.</TD></TR> -<TR><TD><B>^Z or ^_</B></TD><TD>Undo. This is a single-level undo -mechanism, but all adjacent deletions and insertions are concatenated -into a single "undo". Often this will undo a lot more than you -expected.</TD></TR> -<TR><TD><B>Shift+move</B></TD><TD>Move the cursor but also extend the -selection.</TD></TR> - -<TR><TD><B>RightCtrl or -<BR>Compose</B></TD><TD><a name=compose>Start</A> -a <A href="events.html#compose">compose-character</A> -sequence. The next one or two keys typed define the character to -insert (see table that follows.) - -<p>For instance, to type "á" type [compose][a]['] or [compose]['][a]. - -<P>The character "nbsp" (non-breaking space) is typed by using -[compose][space]. - -<P>The single-character sequences may be followed by a space if -necessary to remove ambiguity. For instance, if you really want to -type "ª~" rather than "ã" you must type [compose][a][space][~]. - -<p>The same key may be used to "quote" control characters into the -text. If you need a <tt>^Q</tt> character you can get one by typing -[compose][Control+Q]. - -<p>X may have a key on the keyboard -defined as <tt>XK_Multi_key</tt>. If so this key may be used as well -as the right-hand control key. You can set this up with the program -<tt>xmodmap</tt>. - -<p>If your keyboard is set to support a foreign language you should -also be able to type "dead key" prefix characters. On X you will -actually be able to see what dead key you typed, and if you then move -the cursor without completing the sequence the accent will remain -inserted. -</TABLE></CENTER> -<!-- NEW PAGE --> -<center><table border=1 summary="Character Composition Table"> -<caption align="top">Character Composition Table</caption> -<tr> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - <th>Keys</th><th>Char</th> - -</tr><tr> - <td align=center><TT>sp</TT></td><td align=center><small>nbsp</small></td> - <td align=center><TT>*</tt></td><td align=center>°</td> - <td align=center><TT>` A</tt></td><td align=center>À</td> - <td align=center><TT>D -</tt></td><td align=center>Ð</td> - <td align=center><TT>` a</tt></td><td align=center>à</td> - <td align=center><TT>d -</tt></td><td align=center>ð -</tr><tr> - <td align=center><TT>!</tt></td><td align=center>¡</td> - <td align=center><TT>+ -</tt></td><td align=center>±</td> - <td align=center><TT>' A</tt></td><td align=center>Á</td> - <td align=center><TT>~ N</tt></td><td align=center>Ñ</td> - <td align=center><TT>' a</tt></td><td align=center>á</td> - <td align=center><TT>~ n</tt></td><td align=center>ñ -</tr><tr> - <td align=center><TT>%</tt></td><td align=center>¢</td> - <td align=center><TT>2</tt></td><td align=center>²</td> - <td align=center><TT>A ^</tt></td><td align=center>Â</td> - <td align=center><TT>` O</tt></td><td align=center>Ò</td> - <td align=center><TT>^ a</tt></td><td align=center>â</td> - <td align=center><TT>` o</tt></td><td align=center>ò -</tr><tr> - <td align=center><TT>#</tt></td><td align=center>£</td> - <td align=center><TT>3</tt></td><td align=center>³</td> - <td align=center><TT>~ A</tt></td><td align=center>Ã</td> - <td align=center><TT>' O</tt></td><td align=center>Ó</td> - <td align=center><TT>~ a</tt></td><td align=center>ã</td> - <td align=center><TT>' o</tt></td><td align=center>ó -</tr><tr> - <td align=center><TT>$</tt></td><td align=center>¤</td> - <td align=center><TT>'</tt></td><td align=center>´</td> - <td align=center><TT>: A</tt></td><td align=center>Ä</td> - <td align=center><TT>^ O</tt></td><td align=center>Ô</td> - <td align=center><TT>: a</tt></td><td align=center>ä</td> - <td align=center><TT>^ o</tt></td><td align=center>ô -</tr><tr> - <td align=center><TT>y =</tt></td><td align=center>¥</td> - <td align=center><TT>u</tt></td><td align=center>µ</td> - <td align=center><TT>* A</tt></td><td align=center>Å</td> - <td align=center><TT>~ O</tt></td><td align=center>Õ</td> - <td align=center><TT>* a</tt></td><td align=center>å</td> - <td align=center><TT>~ o</tt></td><td align=center>õ -</tr><tr> - <td align=center><TT>|</tt></td><td align=center>¦</td> - <td align=center><TT>p</tt></td><td align=center>¶</td> - <td align=center><TT>A E</tt></td><td align=center>Æ</td> - <td align=center><TT>: O</tt></td><td align=center>Ö</td> - <td align=center><TT>a e</tt></td><td align=center>æ</td> - <td align=center><TT>: o</tt></td><td align=center>ö -</tr><tr> - <td align=center><TT>&</tt></td><td align=center>§</td> - <td align=center><TT>.</tt></td><td align=center>·</td> - <td align=center><TT>, C</tt></td><td align=center>Ç</td> - <td align=center><TT>x</tt></td><td align=center>×</td> - <td align=center><TT>, c</tt></td><td align=center>ç</td> - <td align=center><TT>- :</tt></td><td align=center>÷ -</tr><tr> - <td align=center><TT>:</tt></td><td align=center>¨</td> - <td align=center><TT>,</tt></td><td align=center>¸</td> - <td align=center><TT>E `</tt></td><td align=center>È</td> - <td align=center><TT>O /</tt></td><td align=center>Ø</td> - <td align=center><TT>` e</tt></td><td align=center>è</td> - <td align=center><TT>o /</tt></td><td align=center>ø -</tr><tr> - <td align=center><TT>c</tt></td><td align=center>©</td> - <td align=center><TT>1</tt></td><td align=center>¹</td> - <td align=center><TT>' E</tt></td><td align=center>É</td> - <td align=center><TT>` U</tt></td><td align=center>Ù</td> - <td align=center><TT>' e</tt></td><td align=center>é</td> - <td align=center><TT>` u</tt></td><td align=center>ù -</tr><tr> - <td align=center><TT>a</tt></td><td align=center>ª</td> - <td align=center><TT>o</tt></td><td align=center>º</td> - <td align=center><TT>^ E</tt></td><td align=center>Ê</td> - <td align=center><TT>' U</tt></td><td align=center>Ú</td> - <td align=center><TT>^ e</tt></td><td align=center>ê</td> - <td align=center><TT>' u</tt></td><td align=center>ú -</tr><tr> - <td align=center><TT>< <</tt></td><td align=center>«</td> - <td align=center><TT>> ></tt></td><td align=center>»</td> - <td align=center><TT>: E</tt></td><td align=center>Ë</td> - <td align=center><TT>^ U</tt></td><td align=center>Û</td> - <td align=center><TT>: e</tt></td><td align=center>ë</td> - <td align=center><TT>^ u</tt></td><td align=center>û -</tr><tr> - <td align=center><TT>~</tt></td><td align=center>¬</td> - <td align=center><TT>1 4</tt></td><td align=center>¼</td> - <td align=center><TT>` I</tt></td><td align=center>Ì</td> - <td align=center><TT>: U</tt></td><td align=center>Ü</td> - <td align=center><TT>` i</tt></td><td align=center>ì</td> - <td align=center><TT>: u</tt></td><td align=center>ü -</tr><tr> - <td align=center><TT>-</tt></td><td align=center></td> - <td align=center><TT>1 2</tt></td><td align=center>½</td> - <td align=center><TT>' I</tt></td><td align=center>Í</td> - <td align=center><TT>' Y</tt></td><td align=center>Ý</td> - <td align=center><TT>' i</tt></td><td align=center>í</td> - <td align=center><TT>' y</tt></td><td align=center>ý -</tr><tr> - <td align=center><TT>r</tt></td><td align=center>®</td> - <td align=center><TT>3 4</tt></td><td align=center>¾</td> - <td align=center><TT>^ I</tt></td><td align=center>Î</td> - <td align=center><TT>T H</tt></td><td align=center>Þ</td> - <td align=center><TT>^ i</tt></td><td align=center>î</td> - <td align=center><TT>t h</tt></td><td align=center>þ -</tr><tr> - <td align=center><TT>_</tt></td><td align=center>¯</td> - <td align=center><TT>?</tt></td><td align=center>¿</td> - <td align=center><TT>: I</tt></td><td align=center>Ï</td> - <td align=center><TT>s s</tt></td><td align=center>ß</td> - <td align=center><TT>: i</tt></td><td align=center>ï</td> - <td align=center><TT>: y</tt></td><td align=center>ÿ -</table></center> +<P>This is the FLTK text editor widget. It allows the user to +edit multiple lines of text and supports highlighting and +scrolling. The buffer that is displayed in the widget is managed +by the <A HREF="Fl_Text_Buffer.html"><TT>Fl_Text_Buffer</TT></A> +class. <H3>Methods</H3> -<CENTER> -<TABLE width=90% summary="Fl_Input methods."> -<TR><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.Fl_Input>Fl_Input</A></LI> -<LI><A href=#Fl_Input.~Fl_Input>~Fl_Input</A></LI> -<LI><A href=#Fl_Input.cursor_color>cursor_color</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.index>index</A></LI> -<LI><A href=#Fl_Input.size>size</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.static_value>static_value</A></LI> -<LI><A href=#Fl_Input.textcolor>textcolor</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.textfont>textfont</A></LI> -<LI><A href=#Fl_Input.textsize>textsize</A></LI> -</UL> -</TD><TD align=left valign=top> -<UL> -<LI><A href=#Fl_Input.value>value</A></LI> -<LI><A href=#Fl_Input.when>when</A></LI> -</UL> -</TD></TR> -</TABLE> -</CENTER> -<H4><A name=Fl_Input.Fl_Input>Fl_Input::Fl_Input(int x, int y, int w, -int h, const char *label = 0)</A></H4> - Creates a new <TT>Fl_Input</TT> widget using the given position, size, -and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>. -<H4><A name=Fl_Input.~Fl_Input>virtual Fl_Input::~Fl_Input()</A></H4> - Destroys the widget and any value associated with it. -<H4><A name=Fl_Input.value>const char *Fl_Input::value() const -<BR> int Fl_Input::value(const char*) -<BR> int Fl_Input::value(const char*, int)</A></H4> - The first form returns the current value, which is a pointer to the -internal buffer and is valid only until the next event is handled. -<P>The second two forms change the text and set the mark and the point -to the end of it. The string is copied to the internal buffer. Passing <TT> -NULL</TT> is the same as "". This returns non-zero if the new value is -different than the current one. You can use the second version to -directly set the length if you know it already or want to put nul's in -the text. </P> -<H4><A name=Fl_Input.static_value>int Fl_Input::static_value(const -char*) -<BR> int Fl_Input::static_value(const char*, int)</A></H4> - Change the text and set the mark and the point to the end of it. The -string is <I>not</I> copied. If the user edits the string it is copied -to the internal buffer then. This can save a great deal of time and -memory if your program is rapidly changing the values of text fields, -but this will only work if the passed string remains unchanged until -either the <TT>Fl_Input</TT> is destroyed or <TT>value()</TT> is called -again. -<H4><A name=Fl_Input.size>int Fl_Input::size() const</A></H4> - Returns the number of characters in <TT>value()</TT>. This may be -greater than <TT>strlen(value())</TT> if there are nul characters in -it. -<H4><A name=Fl_Input.index>char Fl_Input::index(int) const</A></H4> - Same as <TT>value()[n]</TT>, but may be faster in plausible -implementations. No bounds checking is done. -<H4><A name=Fl_Input.when>Fl_When Fl_Widget::when() const -<BR> void Fl_Widget::when(Fl_When)</A></H4> - Controls when callbacks are done. The following values are useful, -the default value is <TT>FL_WHEN_RELEASE</TT>: + <UL> -<LI><TT>0</TT>: The callback is not done, but <TT>changed()</TT> is - turned on. </LI> -<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each time the text -is changed by the user. </LI> -<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done when this -widget loses the focus, including when the window is unmapped. This -is a useful value for text fields in a panel where doing the callback -on every change is wasteful. However the callback will also happen if -the mouse is moved out of the window, which means it should not do -anything visible (like pop up an error message). You might do better -setting this to zero, and scanning all the items for <TT>changed()</TT> - when the OK button on a panel is pressed. </LI> -<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the Enter key, the -entire text is selected, and the callback is done if the text has -changed. Normally the Enter key will navigate to the next field (or -insert a newline for a <TT>Fl_Mulitline_Input</TT>), this changes the -behavior. </LI> -<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The Enter key will -do the callback even if the text has not changed. Useful for command -fields. </LI> + + <LI><A HREF="#Fl_Text_Editor.Fl_Text_Editor">Fl_Text_Editor</A></LI> + <LI><A HREF="#Fl_Text_Editor.~Fl_Text_Editor">~Fl_Text_Editor</A></LI> + <LI><A HREF="#Fl_Text_Editor.add_default_key_bindings">add_default_key_bindings</A></LI> + <LI><A HREF="#Fl_Text_Editor.add_key_binding">add_key_binding</A></LI> + <LI><A HREF="#Fl_Text_Editor.bound_key_function">bound_key_function</A></LI> + <LI><A HREF="#Fl_Text_Editor.default_key_function">default_key_function</A></LI> + <LI><A HREF="#Fl_Text_Editor.insert_mode">insert_mode</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_backspace">kf_backspace</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_copy">kf_copy</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_c_s_move">kf_c_s_move</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_ctrl_move">kf_ctrl_move</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_cut">kf_cut</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_default">kf_default</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_delete">kf_delete</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_down">kf_down</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_end">kf_end</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_enter">kf_enter</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_home">kf_home</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_ignore">kf_ignore</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_insert">kf_insert</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_left">kf_left</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_move">kf_move</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_page_down">kf_page_down</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_page_up">kf_page_up</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_paste">kf_paste</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_right">kf_right</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_select_all">kf_select_all</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_shift_move">kf_shift_move</A></LI> + <LI><A HREF="#Fl_Text_Editor.kf_up">kf_up</A></LI> + <LI><A HREF="#Fl_Text_Editor.remove_all_key_bindings">remove_all_key_bindings</A></LI> + <LI><A HREF="#Fl_Text_Editor.remove_key_binding">remove_key_binding</A></LI> + </UL> -<H4><A name=Fl_Input.textcolor>Fl_Color Fl_Input::textcolor() const -<BR> void Fl_Input::textcolor(Fl_Color)</A></H4> - Gets or sets the color of the text in the input field. -<H4><A name=Fl_Input.textfont>Fl_Font Fl_Input::textfont() const -<BR> void Fl_Input::textfont(Fl_Font)</A></H4> - Gets or sets the font of the text in the input field. -<H4><A name=Fl_Input.textsize>uchar Fl_Input::textsize() const -<BR> void Fl_Input::textsize(uchar)</A></H4> - Gets or sets the size of the text in the input field. -<H4><A name=Fl_Input.cursor_color>Fl_Color Fl_Input::cursor_color() -const -<BR> void Fl_Input::cursor_color(Fl_Color)</A></H4> - Get or set the color of the cursor. This is black by default. - -</BODY></HTML> + +<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> + + +<H4><A NAME="Fl_Text_Editor.~Fl_Text_Editor">~Fl_Text_Editor();</A></H4> + + +<H4><A NAME="Fl_Text_Editor.add_default_key_bindings">void add_default_key_bindings(Key_Binding** list);</A></H4> + + +<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> + + +<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> + + +<H4><A NAME="Fl_Text_Editor.default_key_function">void default_key_function(Key_Func f);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.insert_mode">void insert_mode(int b);<BR> +int insert_mode();</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_backspace">int kf_backspace(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_copy">int kf_copy(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_c_s_move">int kf_c_s_move(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_ctrl_move">int kf_ctrl_move(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_cut">int kf_cut(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_default">int kf_default(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_delete">int kf_delete(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_down">int kf_down(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_end">int kf_end(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_enter">int kf_enter(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_home">int kf_home(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_ignore">int kf_ignore(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_insert">int kf_insert(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_left">int kf_left(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_move">int kf_move(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_page_down">int kf_page_down(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_page_up">int kf_page_up(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_paste">int kf_paste(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_right">int kf_right(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_select_all">int kf_select_all(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_shift_move">int kf_shift_move(int c, Fl_Text_Editor* e);</A></H4> + + +<H4><A NAME="Fl_Text_Editor.kf_up">int kf_up(int c, Fl_Text_Editor* e);</A></H4> + + +<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> + + +<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> + + +</BODY> +</HTML> diff --git a/documentation/Fl_Tooltip.html b/documentation/Fl_Tooltip.html new file mode 100644 index 000000000..00ae89ffe --- /dev/null +++ b/documentation/Fl_Tooltip.html @@ -0,0 +1,87 @@ +<HTML> +<BODY> + +<!-- NEW PAGE --> + +<H2><A name="Fl_Tooltip">class Fl_Tooltip</A></H2> +<HR> + +<H3>Class Hierarchy</H3> + +<UL><PRE> +<B>Fl_Tooltip</B> +</PRE></UL> + +<H3>Include Files</H3> + +<UL><PRE> +#include &lt;FL/Fl_Tooltip.H&gt; +</PRE></UL> + +<H3>Description</H3> + +<P>The <TT>Fl_Tooltip</TT> class provides tooltip support for +all FLTK widgets.</P> + +<H3>Methods</H3> + +<UL> + + <LI><A HREF="#Fl_Tooltip.color">color</A></LI> + <LI><A HREF="#Fl_Tooltip.delay">delay</A></LI> + <LI><A HREF="#Fl_Tooltip.disable">disable</A></LI> + <LI><A HREF="#Fl_Tooltip.enabled">enabled</A></LI> + <LI><A HREF="#Fl_Tooltip.enable">enable</A></LI> + <LI><A HREF="#Fl_Tooltip.enter">enter</A></LI> + <LI><A HREF="#Fl_Tooltip.exit">exit</A></LI> + <LI><A HREF="#Fl_Tooltip.font">font</A></LI> + <LI><A HREF="#Fl_Tooltip.size">size</A></LI> + +</UL> + +<H4><A NAME="Fl_Tooltip.color">void color(unsigned c);<BR> +Fl_Color color();</A></H4> + +<P>Gets or sets the background color for tooltips. The label color is +set to white or black depending on the background color. The default +background color is a pale yellow. + +<H4><A NAME="Fl_Tooltip.delay">void delay(float f);<BR> +float delay();</A></H4> + +<P>Gets or sets the tooltip delay. The default delay is 0.5 seconds. + +<H4><A NAME="Fl_Tooltip.disable">void disable();</A></H4> + +<P>Disables tooltips on all widgets. + +<H4><A NAME="Fl_Tooltip.enabled">int enabled();</A></H4> + +<P>Returns non-zero if tooltips are enabled. + +<H4><A NAME="Fl_Tooltip.enable">void enable(int b = 1);</A></H4> + +<P>Enables tooltips on all widgets. + +<H4><A NAME="Fl_Tooltip.enter">void enter(Fl_Widget *w);</A></H4> + +<P>This method is called when the mouse pointer enters a +widget. + +<H4><A NAME="Fl_Tooltip.exit">void exit(Fl_Widget *w);</A></H4> + +<P>This method is called when the mouse pointer leaves a +widget. + +<H4><A NAME="Fl_Tooltip.font">void font(int i);<BR> +int font();</A></H4> + +<P>Gets or sets the typeface for the tooltip text. + +<H4><A NAME="Fl_Tooltip.size">void size(int s);<BR> +int size();</A></H4> + +<P>Gets or sets the size of the tooltip text. + +</BODY> +</HTML> diff --git a/documentation/Makefile b/documentation/Makefile index 1d4b24f08..610a676a2 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.9.2.10.2.3 2001/11/27 02:09:45 easysw Exp $" +# "$Id: Makefile,v 1.9.2.10.2.4 2001/11/28 20:43:44 easysw Exp $" # # Documentation makefile for the Fast Light Tool Kit (FLTK). # @@ -48,6 +48,7 @@ HTMLFILES = \ editor.html \ enumerations.html \ events.html \ + Fl.html \ Fl_Adjuster.html \ Fl_Bitmap.html \ Fl_Box.html \ @@ -115,6 +116,7 @@ HTMLFILES = \ Fl_Tiled_Image.html \ Fl_Tile.html \ Fl_Timer.html \ + Fl_Tooltip.html \ fluid.html \ Fl_Valuator.html \ Fl_Value_Input.html \ @@ -199,5 +201,5 @@ fltk.pdf: $(HTMLFILES) $(HTMLDOC) -f fltk.pdf --jpeg --compression=9 --duplex --verbose --toclevels 2 --titleimage FL.gif $(HTMLFILES) # -# End of "$Id: Makefile,v 1.9.2.10.2.3 2001/11/27 02:09:45 easysw Exp $". +# End of "$Id: Makefile,v 1.9.2.10.2.4 2001/11/28 20:43:44 easysw Exp $". # diff --git a/documentation/fltk.book b/documentation/fltk.book index 1d00e2691..e9d67b5fb 100644 --- a/documentation/fltk.book +++ b/documentation/fltk.book @@ -77,6 +77,7 @@ Fl_Text_Editor.html Fl_Tile.html Fl_Tiled_Image.html Fl_Timer.html +Fl_Tooltip.html Fl_Valuator.html Fl_Value_Input.html Fl_Value_Output.html diff --git a/documentation/functions.html b/documentation/functions.html index d6ff340e0..a227ff5c7 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -2,9 +2,9 @@ <h1 align=right><a name=functions>B - Function Reference</A></h1> -This appendix describes all of the <tt>fl_</tt> functions and <tt>Fl::</tt> -methods. For a description of the FLTK widgets, see <A -href=widgets.html#widgets> Appendix A</A>. +This appendix describes all of the <tt>fl_</tt> functions. For a +description of the FLTK classes, see <A href="widgets.html">Appendix +A</A>. <h2>Functions</h2> @@ -235,858 +235,5 @@ subexpressions literally. </LI> <LI><tt>x</tt> all other characters must be matched exactly. </LI> </UL> -<h2>Fl:: Methods</h2> - -<h3><A name=add_fd>static void Fl::add_fd(int fd, void (*cb)(int, void -*), void* = 0) -<br>static void Fl::add_fd(int fd, int when, void (*cb)(int, void*), -void* = 0)</A> -<br><A name=remove_fd>static void Fl::remove_fd(int)</A></h3> - -Add file descriptor <tt>fd</tt> to listen to. When the <tt>fd</tt> -becomes ready for reading <tt>Fl::wait()</tt> will call the callback -and then return. The callback is -passed the <tt>fd</tt> and the arbitrary <tt>void*</tt> argument. - -<P>The second version takes a <tt>when</tt> bitfield, with the bits -<tt>FL_READ</tt>, <tt>FL_WRITE</tt>, and <tt>FL_EXCEPT</tt> defined, -to indicate when the callback should be done. - -<P>There can only be one callback of each type for a file descriptor. <tt> -Fl::remove_fd()</tt> gets rid of <I>all</I> the callbacks for a given -file descriptor. - -<P>Under UNIX <I>any</I> file descriptor can be monitored (files, -devices, pipes, sockets, etc.) Due to limitations in Microsoft Windows, -WIN32 applications can only monitor sockets. - -<h3><A name=add_handler>static void Fl::add_handler(int (*f)(int))</A></h3> - -Install a function to parse unrecognized events. If FLTK cannot -figure out what to do with an event, it calls each of these functions -(most recent first) until one of them returns non-zero. If none of -them returns non zero then the event is ignored. Events that cause -this to be called are: - -<UL> -<LI><tt>FL_SHORTCUT</tt> events that are not recognized by any widget. -This lets you provide global shortcut keys. </LI> -<LI>System events that FLTK does not recognize. See <A href=osissues.html#fl_xevent> -<tt>fl_xevent</tt></A>. </LI> -<LI><I>Some</I> other events when the widget FLTK selected returns -zero from its <tt>handle()</tt> method. Exactly which ones may change -in future versions, however. </LI> -</UL> - -<h3><A name=add_idle>static Fl::add_idle(void (*cb)(void*), void*)</A></h3> - -Adds a callback function that is called every time by -<tt>Fl::wait()</tt> and also makes it act as though the timeout is -zero (this makes <tt>Fl::wait()</tt> return immediately, so if it is -in a loop it is called repeatedly, and thus the idle fucntion is -called repeatedly). The idle function can be used to get background -processing done. - -<P>You can have multiple idle callbacks. To remove an idle callback use <A -href=#remove_idle><tt>Fl::remove_idle()</tt></A>. - -<P><tt>Fl::wait()</tt> and <tt>Fl::check()</tt> call idle callbacks, -but <tt>Fl::ready()</tt> does not. - -<P>The idle callback can call any FLTK functions, including -<tt>Fl::wait()</tt>, <tt>Fl::check()</tt>, and <tt>Fl::ready()</tt>. -Fltk will not recursively call the idle callback. - -<h3><A name=add_timeout>static void Fl::add_timeout(float t, void (*cb)(void*),void*v=0)</A></h3> - -Add a one-shot timeout callback. The function will be called by -<tt>Fl::wait()</tt> at <i>t</i> seconds after this function is called. -The optional <tt>void*</tt> argument is passed to the callback. - -<h3><A name=repeat_timeout>static void Fl::repeat_timeout(float t, void (*cb)(void*),void*v=0)</A></h3> - -Inside a timeout callback you can call this to add another timeout. -Rather than the time being measured from "now", it is measured from -when the system call elapsed that caused this timeout to be called. This -will result in far more accurate spacing of the timeout callbacks, it -also has slightly less system call overhead. (It will also use all -your machine time if your timeout code and fltk's overhead take more -than <i>t</i> seconds, as the real timeout will be reduced to zero). - -<p>It is undefined what this does if called from outside a timeout -callback. - -<P>This code will print "TICK" each second on stdout, with a -fair degree of accuracy: - -<UL><PRE>void callback(void*) { - printf("TICK\n"); - Fl::repeat_timeout(1.0,callback); -} - -main() { - Fl::add_timeout(1.0,callback); - return Fl::run(); -}</PRE></UL> - -<h3><A name=add_timeout>static void Fl::add_check(void (*cb)(void*),void*v=0)</A></h3> - -Fltk will call this callback just before it flushes the display and -waits for events. This is different than an idle callback because it -is only called once, then fltk calls the system and tells it not to -return until an event happens. - -<p>This can be used by code that wants to monitor the -application's state, such as to keep a display up to date. The -advantage of using a check callback is that it is called only when no -events are pending. If events are coming in quickly, whole blocks of -them will be processed before this is called once. This can save -significant time and avoid the application falling behind the events. - -<p>Sample code: - -<ul><pre>bool state_changed; // anything that changes the display turns this on - -void callback(void*) { - if (!state_changed) return; - state_changed = false; - do_expensive_calculation(); - widget->redraw(); -} - -main() { - Fl::add_check(1.0,callback); - return Fl::run(); -}</pre></ul> - -<h3><A name=arg>static int Fl::arg(int argc, char **argv, int &i)</A></h3> - -Consume a single switch from <tt>argv</tt>, starting at word i. -Returns the number of words eaten (1 or 2, or 0 if it is not -recognized) and adds the same value to <tt>i</tt>. You can use this -function if you prefer to control the incrementing through the -arguments yourself. - -<h3><A name=args>static int Fl::args(int argc, char **argv, int &i, int -(*callback)(int, char**,int &)=0) -<BR>void Fl::args(int argc, char **argv)</A></h3> - -FLTK provides an <I>entirely optional</I> command-line switch parser. -You don't have to call it if you don't like them! Everything it can do -can be done with other calls to FLTK. - -<P>To use the switch parser, call <tt>Fl::args(...)</tt> near the start -of your program. This does <I>not</I> open the display, instead -switches that need the display open are stashed into static variables. -Then you <I>must</I> display your first window by calling <A href=Fl_Window.html#Fl_Window.show> -window->show(argc,argv)</A>, which will do anything stored in the -static variables. - -<P><tt>callback</tt> lets you define your own switches. It is called -with the same <tt>argc</tt> and <tt>argv</tt>, and with <tt>i</tt> the -index of each word. The callback should return zero if the switch is -unrecognized, and not change <tt>i</tt>. It should return non-zero if -the switch is recognized, and add at least 1 to <tt>i</tt> (it can add -more to consume words after the switch). This function is called -<i>before</i> any other tests, so <i>you can override any FLTK -switch</i> (this is why fltk can use very short switches instead of -the long ones all other toolkits force you to use). - -<P>On return <tt>i</tt> is set to the index of the first non-switch. -This is either: - -<UL> -<LI>The first word that does not start with '-'. </LI> -<LI>The word '-' (used by many programs to name stdin as a file) </LI> -<LI>The first unrecognized switch (return value is 0). </LI> -<LI><tt>argc</tt></LI> -</UL> -The return value is <tt>i</tt> unless an unrecognized switch is found, -in which case it is zero. If your program takes no arguments other -than switches you should produce an error if the return value is less -than <tt>argc</tt>. - -<P>All switches except -bg2 may be abbreviated one letter and case is ignored: - -<UL> -<LI><tt>-display host:n.n</tt> The X display to use (ignored under -WIN32). </LI> -<LI><tt>-geometry WxH+X+Y</tt> The window position and size will be -modified according the the standard X geometry string. </LI> -<LI><tt>-name string</tt> Fl_Window::xclass(string) will be done to -the window, possibly changing its icon. </LI> -<LI><tt>-title string</tt> Fl_Window::label(string) will be done to -the window, changing both its title and the icontitle. </LI> -<LI><tt>-iconic</tt> Fl_Window::iconize() will be done to the window. </LI> -<LI><tt>-bg color</tt> XParseColor is used to lookup the passed color -and then Fl::background() is done. Under WIN32 only color names of -the form "#xxxxxx" are understood. </LI> -<LI><tt>-bg2 color</tt> XParseColor is used to lookup the passed color -and then Fl::background2() is done. </LI> -<LI><tt>-fg color</tt> XParseColor is used to lookup the passed color -and then Fl::foreground() is done. </LI> -</UL> - -The second form of <tt>Fl::args()</tt> is useful if your program does -not have command line switches of its own. It parses all the switches, -and if any are not recognized it calls <tt>Fl::abort(Fl::help)</tt>. - -<h3><A name=background>static void Fl::background(uchar, uchar, uchar)</A> -</h3> - -Changes <tt>fl_color(FL_GRAY)</tt> to the given color, and changes the -gray ramp from 32 to 56 to black to white. These are the colors used -as backgrounds by almost all widgets and used to draw the edges of all -the boxtypes. - -<h3><A name=background2>static void Fl::background2(uchar, uchar, uchar)</A> -</h3> - -Changes <tt>fl_color(FL_WHITE)</tt> and the same colors as <tt> -Fl::foreground()</tt>. This color is used as a background by <tt> -Fl_Input</tt> and other text widgets. - -<h3><A name=belowmouse>static Fl_Widget *Fl::belowmouse() const -<br>static void Fl::belowmouse(Fl_Widget *)</A></h3> - -Get or set the widget that is below the mouse. This is for -highlighting buttons. It is not used to send <tt>FL_PUSH</tt> or <tt> -FL_MOVE</tt> directly, for several obscure reasons, but those events -typically go to this widget. This is also the first widget tried for <tt> -FL_SHORTCUT</tt> events. - -<P>If you change the belowmouse widget, the previous one and all -parents (that don't contain the new widget) are sent <tt>FL_LEAVE</tt> -events. Changing this does <I>not</I> send <tt>FL_ENTER</tt> to this -or any widget, because sending <tt>FL_ENTER</tt> is supposed to <I>test</I> -if the widget wants the mouse (by it returning non-zero from <tt> -handle()</tt>). - -<h3><A name=box_dh>static int Fl::box_dh(Fl_Boxtype)</A></h3> - -Returns the height offset for the given boxtype. - -<h3><A name=box_dw>static int Fl::box_dw(Fl_Boxtype)</A></h3> - -Returns the width offset for the given boxtype. - -<h3><A name=box_dx>static int Fl::box_dx(Fl_Boxtype)</A></h3> - -Returns the X offset for the given boxtype. - -<h3><A name=box_dy>static int Fl::box_dy(Fl_Boxtype)</A></h3> - -Returns the Y offset for the given boxtype. - -<h3><A name=check>static int Fl::check()</A></h3> - -Same as <tt>Fl::wait(0)</tt>. Calling this during a big calculation -will keep the screen up to date and the interface responsive: - -<ul><pre>while (!calculation_done()) { - calculate(); - Fl::check(); - if (user_hit_abort_button()) break; -}</pre></ul> - -The returns non-zero if any windows are displayed, and 0 if no -windows are displayed (this is likely to change in future versions of -fltk). - -<h3><A name=damage>static int Fl::damage()</A></h3> - -If true then <A href=#flush><tt>flush()</tt></A> will do something. - -<h3><A name=display>static void Fl::display(const char *)</A></h3> - -Sets the X display to use for all windows. Actually this just sets -the environment variable $DISPLAY to the passed string, so this only -works before you show() the first window or otherwise open the display, -and does nothing useful under WIN32. - -<h3><A name=enable_symbols>static void Fl::enable_symbols()</A></h3> - -Enables the symbol drawing code. - -<h3><A name=event_button>static int Fl::event_button()</A></h3> - -Returns which mouse button was pressed. This returns garbage if the -most recent event was not a <tt>FL_PUSH</tt> or <tt>FL_RELEASE</tt> -event. - -<h3><A name=event_clicks>int Fl::event_clicks() -<br>void Fl::event_clicks(int)</A></h3> - -The first form returns non-zero if the most recent <tt>FL_PUSH</tt> or -<tt>FL_KEYBOARD</tt> was a "double click". Returns N-1 for -N clicks. A double click is counted if the same button is pressed -again while <tt>event_is_click()</tt> is true. - -<P>The second form directly sets the number returned by <tt> -Fl::event_clicks()</tt>. This can be used to set it to zero so that -later code does not think an item was double-clicked. - -<h3><A name=event_inside>int Fl::event_inside(const Fl_Widget *) const -<br>int Fl::event_inside(int x, int y, int w, int h)</A></h3> - -Returns non-zero if the current <tt>event_x</tt> and <tt>event_y</tt> -put it inside the widget or inside an arbitrary bounding box. You -should always call this rather than doing your own comparison so you -are consistent about edge effects. - -<h3><A name=event_is_click>int Fl::event_is_click() -<br>void Fl::event_is_click(0)</A></h3> - -The first form returns non-zero if the mouse has not moved far enough -and not enough time has passed since the last <tt>FL_PUSH</tt> or <tt> -FL_KEYBOARD</tt> event for it to be considered a "drag" rather than a -"click". You can test this on <tt>FL_DRAG</tt>, <tt>FL_RELEASE</tt>, -and <tt>FL_MOVE</tt> events. The second form clears the value returned -by <tt>Fl::event_is_click()</tt>. Useful to prevent the <I>next</I> -click from being counted as a double-click or to make a popup menu -pick an item with a single click. Don't pass non-zero to this. - -<h3><A name=event_key>int Fl::event_key() -<br>int Fl::event_key(int)</A> -<br><A name=get_key>int Fl::get_key(int)</A></h3> - -<tt>Fl::event_key()</tt> returns which key on the keyboard was last -pushed. It returns zero if the last event was not a key press or release. - -<P><tt>Fl::event_key(int)</tt> returns true if the given key was held -down (or pressed) <I>during</I> the last event. This is constant until -the next event is read from the server. - -<P><tt>Fl::get_key(int)</tt> returns true if the given key is held down <I> -now</I>. Under X this requires a round-trip to the server and is <I> -much</I> slower than <tt>Fl::event_key(int)</tt>. - -<P>Keys are identified by the <I>unshifted</I> values. FLTK defines a -set of symbols that should work on most modern machines for every key -on the keyboard: - -<UL> -<LI>All keys on the main keyboard producing a printable ASCII -character use the value of that ASCII character (as though shift, -ctrl, and caps lock were not on). The space bar is 32. </LI> -<LI>All keys on the numeric keypad producing a printable ASCII -character use the value of that ASCII character plus <tt>FL_KP</tt>. -The highest possible value is <tt>FL_KP_Last</tt> so you can -range-check to see if something is on the keypad. </LI> -<LI>All numbered function keys use the number on the function key plus <tt> -FL_F</tt>. The highest possible number is <tt>FL_F_Last</tt>, so you -can range-check a value. </LI> -<LI>Buttons on the mouse are considered keys, and use the button -number (where the left button is 1) plus <tt>FL_Button</tt>. </LI> -<LI>All other keys on the keypad have a symbol: <tt>FL_Escape, -FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause, -FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down, -FL_Left, FL_Up, FL_Right, FL_Down, FL_Shift_L, FL_Shift_R, -FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R, -FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter</tt>. Be -careful not to confuse these with the very similar, but all-caps, -symbols used by <A href="#event_state"><tt>Fl::event_state()</tt> -</A>. </LI> -</UL> - -On X <tt>Fl::get_key(FL_Button+n)</tt> does not work. - -<P>On WIN32 <tt>Fl::get_key(FL_KP_Enter)</tt> and <tt> -Fl::event_key(FL_KP_Enter)</tt> do not work. - -<h3><A name=event_length>char *Fl::event_length()</A></h3> - -Returns the length of the text in <tt>Fl::event_text()</tt>. There -will always be a nul at this position in the text. However there may -be a nul before that if the keystroke translates to a nul character or -you paste a nul character. - -<h3><A name=event_state>ulong Fl::event_state() -<br>unsigned int Fl::event_state(ulong)</A></h3> - -This is a bitfield of what shift states were on and what mouse buttons -were held down during the most recent event. The second version -returns non-zero if any of the passed bits are turned on. The legal -bits are: - -<UL> -<LI><tt>FL_SHIFT</tt></LI> -<LI><tt>FL_CAPS_LOCK</tt></LI> -<LI><tt>FL_CTRL</tt></LI> -<LI><tt>FL_ALT</tt></LI> -<LI><tt>FL_NUM_LOCK</tt></LI> -<LI><tt>FL_META</tt></LI> -<LI><tt>FL_SCROLL_LOCK</tt></LI> -<LI><tt>FL_BUTTON1</tt></LI> -<LI><tt>FL_BUTTON2</tt></LI> -<LI><tt>FL_BUTTON3</tt></LI> -</UL> - -X servers do not agree on shift states, and FL_NUM_LOCK, FL_META, and -FL_SCROLL_LOCK may not work. The values were selected to match the -XFree86 server on Linux. In addition there is a bug in the way X works -so that the shift state is not correctly reported until the first event <I> -after</I> the shift key is pressed or released. - -<h3><A name=event_text>char *Fl::event_text()</A></h3> - -Returns the ASCII text (in the future this may be UTF-8) produced by -the last <tt>FL_KEYBOARD</tt> or <tt>FL_PASTE</tt> or possibly other -event. A zero-length string is returned for any keyboard function keys -that do not produce text. This pointer points at a static buffer and is -only valid until the next event is processed. - -<P>Under X this is the result of calling <tt>XLookupString()</tt>. - -<h3><A name=event_x>static int Fl::event_x() -<br><A name=event_y>static int Fl::event_y()</A></A></h3> - -Returns the mouse position of the event relative to the <tt>Fl_Window</tt> -it was passed to. - -<h3><A name=event_x_root>static int Fl::event_x_root() -<br><A name=event_y_root>static int Fl::event_y_root()</A></A></h3> - -Returns the mouse position on the screen of the event. To find the -absolute position of an <tt>Fl_Window</tt> on the screen, use the -difference between <tt>event_x_root(),event_y_root()</tt> and <tt> -event_x(),event_y()</tt>. - -<h3><A name=first_window>static Fl_Window *Fl::first_window()</A></h3> - -Returns the first top-level window in the list of shown() windows. If -a modal() window is shown this is the top-most modal window, otherwise -it is the most recent window to get an event. - -<h3><A name=next_window>static Fl_Window *Fl::next_window(Fl_Window *)</A></h3> - -Returns the next top-level window in the list of shown() windows. You can -use this call to iterate through all the windows that are shown(). - -<h3>static void Fl::first_window(Fl_Window*)</h3> - -Sets the window that is returned by first_window. The window is -removed from wherever it is in the list and inserted at the top. This -is not done if Fl::modal() is on or if the window is not shown(). -Because the first window is used to set the "parent" of modal windows, -this is often useful. - -<h3><A name=flush>static void Fl::flush()</A></h3> - -Causes all the windows that need it to be redrawn and graphics forced -out through the pipes. This is what <tt>wait()</tt> does before -looking for events. - -<h3><A name=focus>static Fl_Widget *Fl::focus() const -<br>static void Fl::focus(Fl_Widget *)</A></h3> - -Get or set the widget that will receive <tt>FL_KEYBOARD</tt> events. - -<P>If you change <tt>Fl::focus()</tt>, the previous widget and all -parents (that don't contain the new widget) are sent <tt>FL_UNFOCUS</tt> -events. Changing the focus does <I>not</I> send <tt>FL_FOCUS</tt> to -this or any widget, because sending <tt>FL_FOCUS</tt> is supposed to <I> -test</I> if the widget wants the focus (by it returning non-zero from <tt> -handle()</tt>). - -<h3><A name=foreground>static void Fl::foreground(uchar, uchar, uchar)</A></h3> - -Changes <tt>fl_color(FL_BLACK)</tt>. Also changes <tt> -FL_INACTIVE_COLOR</tt> and <tt>FL_SELECTION_COLOR</tt> to be a ramp -between this and <tt>FL_WHITE</tt>. - -<h3><A name=free_color>static void Fl::free_color(Fl_Color, int overlay = 0)</A></h3> - -Frees the specified color from the colormap, if applicable. If <tt> -overlay</tt> is non-zero then the color is freed from the overlay -colormap. - -<h3><A name=get_color>static unsigned Fl::get_color(Fl_Color) -<br>static void Fl::get_color(Fl_Color, uchar &r, uchar &g, uchar &b)</A></h3> - -Returns the color index or RGB value for the given FLTK color index. - -<h3><A name=get_font>static const char *Fl::get_font(int face)</A></h3> - -Get the string for this face. This string is different for each -face. Under X this value is passed to XListFonts to get all the sizes -of this face. - -<h3><A name=get_font_name>static const char *Fl::get_font_name(int -face, int *attributes = 0)</A></h3> - -Get a human-readable string describing the family of this face. This -is useful if you are presenting a choice to the user. There is no -guarantee that each face has a different name. The return value points -to a static buffer that is overwritten each call. - -<P>The integer pointed to by <tt>attributes</tt> (if the pointer is not -zero) is set to zero, <tt>FL_BOLD</tt> or <tt>FL_ITALIC</tt> or <tt> -FL_BOLD | FL_ITALIC</tt>. To locate a "family" of fonts, search -forward and back for a set with non-zero attributes, these faces along -with the face with a zero attribute before them constitute a family. - -<h3><A name=get_font_sizes>int get_font_sizes(int face, int *&sizep)</A></h3> - -Return an array of sizes in <tt>sizep</tt>. The return value is the -length of this array. The sizes are sorted from smallest to largest -and indicate what sizes can be given to <tt>fl_font()</tt> that will -be matched exactly (<tt>fl_font()</tt> will pick the closest size for -other sizes). A zero in the first location of the array indicates a -scalable font, where any size works, although the array may list sizes -that work "better" than others. Warning: the returned array -points at a static buffer that is overwritten each call. Under X this -will open the display. - -<h3><A name=get_mouse>static void Fl::get_mouse(int &x, int &y)</A></h3> - -Return where the mouse is on the screen by doing a round-trip query to -the server. You should use <tt>Fl::event_x_root()</tt> and <tt> -Fl::event_y_root()</tt> if possible, but this is necessary if you are -not sure if a mouse event has been processed recently (such as to -position your first window). If the display is not open, this will -open it. - -<h3><A name=get_system_colors>static void Fl::get_system_colors()</A></h3> - -Read the user preference colors from the system and use them to call -<tt> Fl::foreground()</tt>, <tt>Fl::background()</tt>, and <tt> -Fl::background2()</tt>. This is done by -<tt>Fl_Window::show(argc,argv)</tt> before applying the -fg and -bg -switches. - -<P>On X this reads some common values from the Xdefaults database. -KDE users can set these values by running the "krdb" program, and -newer versions of KDE set this automatically if you check the "apply -style to other X programs" switch in their control panel. - -<h3><A name=gl_visual>static int Fl::gl_visual(int)</A></h3> - -This does the same thing as <A -href=#visual><tt>Fl::visual(int)</tt></A> but also requires OpenGL -drawing to work. This <I>must</I> be done if you want to draw in -normal windows with OpenGL with <A href=opengl.html#gl_start> -<tt>gl_start()</tt></A> and <tt>gl_end()</tt>. It may be useful to -call this so your X windows use the same visual as an <A -href=Fl_Gl_Window.html#Fl_Gl_Window> <tt>Fl_Gl_Window</tt></A>, which -on some servers will reduce colormap flashing. - -<P>See <A href=Fl_Gl_Window.html#Fl_Gl_Window.mode><tt>Fl_Gl_Window</tt></A> -for a list of additional values for the argument. - -<h3><A name=grab>static void Fl::grab(Fl_Window*) -<br>static Fl_Window* Fl::grab()</A></h3> - -This is used when pop-up menu systems are active. Send all events to -the passed window no matter where the pointer or focus is (including -in other programs). The window <I>does not have to be -<tt>shown()</tt></I> , this lets the <tt>handle()</tt> method of a -"dummy" window override all event handling and allows you to -map and unmap a complex set of windows (under both X and WIN32 -<I>some</I> window must be mapped because the system interface needs a -window id). - -<P>If <tt>grab()</tt> is on it will also affect show() of windows by -doing system-specific operations (on X it turns on -override-redirect). These are designed to make menus popup reliably -and faster on the system. - -<P>To turn off grabbing do <tt>Fl::grab(0)</tt>. - -<P><I>Be careful that your program does not enter an infinite loop -while <tt>grab()</tt> is on. On X this will lock up your screen!</I> - -<h3><A name=h>static int Fl::h()</A></h3> - -Returns the height of the screen in pixels. - -<h3><A name=handle>static int Fl::handle(int, Fl_Window *)</A></h3> - -Sends the event to a window for processing. Returns non-zero if any -widget uses the event. - -<h3><A name=help>static const char *Fl::help</A></h3> - -This is the usage string that is displayed if <tt>Fl::args()</tt> -detects an invalid argument on the command-line. - -<h3><A name=modal>static Fl_Window *Fl::modal()</A></h3> - -Returns the top-most <tt>modal()</tt> window currently shown. -This is the most recently <tt> -shown()</tt> window with <A href=Fl_Window.html#Fl_Window.modal><tt> -modal()</tt></A> true, or <tt>NULL</tt> if there are no <tt>modal()</tt> -windows <tt>shown()</tt>. -The <tt>modal()</tt> window has its <tt>handle()</tt> method called -for all events, and no other windows will have <tt>handle()</tt> -called (<A href=#grab><tt>grab()</tt></A> overrides this). - -<h3><A name=own_colormap>static void Fl::own_colormap()</A></h3> - -Makes FLTK use its own colormap. This may make FLTK display better -and will reduce conflicts with other programs that want lots of colors. -However the colors may flash as you move the cursor between windows. - -<P>This does nothing if the current visual is not colormapped. - -<h3><A name=paste>static void Fl::paste(Fl_Widget *receiver)</A></h3> - -Set things up so the receiver widget will be called with an <A href="enumerations.html#events"> -<tt>FL_PASTE</tt></A> event some time in the future. The reciever -should be prepared to be called <I>directly</I> by this, or for it to -happen <I>later</I>, or possibly <I>not at all</I>. This allows the -window system to take as long as necessary to retrieve the paste buffer -(or even to screw up completely) without complex and error-prone -synchronization code in FLTK. - -<h3><A name=pushed>static Fl_Widget *Fl::pushed() const -<br>static void Fl::pushed(Fl_Widget *)</A></h3> - -Get or set the widget that is being pushed. <tt>FL_DRAG</tt> or <tt> -FL_RELEASE</tt> (and any more <tt>FL_PUSH</tt>) events will be sent to -this widget. - -<P>If you change the pushed widget, the previous one and all parents -(that don't contain the new widget) are sent <tt>FL_RELEASE</tt> -events. Changing this does <I>not</I> send <tt>FL_PUSH</tt> to this -or any widget, because sending <tt>FL_PUSH</tt> is supposed to <I>test</I> -if the widget wants the mouse (by it returning non-zero from <tt> -handle()</tt>). - -<h3><A name=readqueue>static Fl_Widget *Fl::readqueue()</A></h3> - -All <tt>Fl_Widgets</tt> that don't have a callback defined use a -default callback that puts a pointer to the widget in this queue, and -this method reads the oldest widget out of this queue. - -<h3><A name=ready>static int Fl::ready()</A></h3> - -This is similar to <tt>Fl::check()</tt> except this does <I>not</I> -call <tt>Fl::flush()</tt> or any callbacks, which is useful if your -program is in a state where such callbacks are illegal. This returns -true if <tt>Fl::check()</tt> would do anything (it will continue to -return true until you call <tt>Fl::check()</tt> or <tt>Fl::wait()</tt>). - -<ul><pre>while (!calculation_done()) { - calculate(); - if (Fl::ready()) { - do_expensive_cleanup(); - Fl::check(); - if (user_hit_abort_button()) break; - } -}</pre></ul> - -<h3><A name=redraw>static void Fl::redraw()</A></h3> - -Redraws all widgets. - -<h3><A name=has_idle>static int Fl::has_idle(void (*cb)(void*), void* = 0)</A></h3> - -Returns true if the specified idle callback is currently installed. - -<h3><A name=remove_idle>static void Fl::remove_idle(void (*cb)(void*), void* = 0)</A></h3> - -Removes the specified idle callback, if it is installed. - -<h3><A name=has_timeout>static int Fl::has_timeout(void (*cb)(void*), void* = 0)</A></h3> - -Returns true if the timeout exists and has not been called yet. - -<h3><A name=remove_timeout>static void Fl::remove_timeout(void (*cb)(void*), void* = 0)</A></h3> - -Removes a timeout callback. It is harmless to remove a timeout -callback that no longer exists. - -<h3><A name=has_check>static int Fl::has_check(void (*cb)(void*), void* = 0)</A></h3> - -Returns true if the check exists and has not been called yet. - -<h3><A name=remove_check>static void Fl::remove_check(void (*cb)(void*), void* = 0)</A></h3> - -Removes a check callback. It is harmless to remove a check -callback that no longer exists. - -<h3><A name=run>static Fl::run()</A></h3> - -As long as any windows are displayed this calls <tt>Fl::wait()</tt> -repeatedly. When all the windows are closed it returns zero -(supposedly it would return non-zero on any errors, but fltk calls -exit directly for these). A normal program will end <tt>main()</tt> -with <tt>return Fl::run();</tt>. - -<h3><A name=selection>static void Fl::selection(Fl_Widget *owner, const -char *stuff, int len) -<br>static const char* Fl::selection() -<br>static int Fl::selection_length()</A></h3> - -The first form changes the current selection. The block of text is -copied to an internal buffer by FLTK (be careful if doing this in -response to an <tt>FL_PASTE</tt> as this <I>may</I> be the same buffer -returned by <tt>event_text()</tt>). The <tt>selection_owner()</tt> -widget is set to the passed owner (possibly sending <tt> -FL_SELECTIONCLEAR</tt> to the previous owner). The second form looks -at the buffer containing the current selection. The contents of this -buffer are undefined if this program does not own the current -selection. - -<h3><A name=selection_owner>static Fl_Widget *Fl::selection_owner() const -<br>static void Fl::selection_owner(Fl_Widget *)</A></h3> - -The single-argument <tt>selection_owner(x)</tt> call can be used to -move the selection to another widget or to set the owner to -<tt>NULL</tt>, without changing the actual text of the -selection. <tt>FL_SELECTIONCLEAR</tt> is sent to the previous -selection owner, if any. - -<P><I>Copying the buffer every time the selection is changed is -obviously wasteful, especially for large selections. An interface will -probably be added in a future version to allow the selection to be made -by a callback function. The current interface will be emulated on top -of this.</I> - -<h3><A name=set_boxtype>static void Fl::set_boxtype(Fl_Boxtype, -Fl_Box_Draw_F *, uchar, uchar, uchar, uchar) -<br>static void Fl::set_boxtype(Fl_Boxtype, Fl_Boxtype from)</A></h3> - -The first form sets the function to call to draw a specific boxtype. - -<P>The second form copies the <tt>from</tt> boxtype. - -<h3><A name=set_color>static void Fl::set_color(Fl_Color, uchar r, -uchar g, uchar b)</A></h3> - -Sets an entry in the <tt>fl_color</tt> index table. You can set it to -any 8-bit RGB color. The color is not allocated until <tt>fl_color(i)</tt> -is used. - -<h3><A name=set_font>static int Fl::set_font(int face, const char *) -<br>static int Fl::set_font(int face, int from)</A></h3> - -The first form changes a face. The string pointer is simply stored, -the string is not copied, so the string must be in static memory. - -<P>The second form copies one face to another. - -<h3><A name=set_fonts>int Fl::set_fonts(const char * = 0)</A></h3> - -FLTK will open the display, and add every font on the server to the -face table. It will attempt to put "families" of faces together, so -that the normal one is first, followed by bold, italic, and bold -italic. - -<P>The optional argument is a string to describe the set of fonts to -add. Passing <tt>NULL</tt> will select only fonts that have the -ISO8859-1 character set (and are thus usable by normal text). Passing -"-*" will select all fonts with any encoding as long as they have -normal X font names with dashes in them. Passing "*" will list every -font that exists (on X this may produce some strange output). Other -values may be useful but are system dependent. With WIN32 <tt>NULL</tt> -selects fonts with ISO8859-1 encoding and non-<tt>NULL</tt> selects -all fonts. - -<P>The return value is how many faces are in the table after this is -done. - -<h3><A name=set_labeltype>static void Fl::set_labeltype(Fl_Labeltype, -Fl_Label_Draw_F *, Fl_Label_Measure_F *) -<br>static void Fl:set_labeltype(Fl_Labeltype, Fl_Labeltype from)</A></h3> - -The first form sets the functions to call to draw and measure a -specific labeltype. - -<P>The second form copies the <tt>from</tt> labeltype. - -<h3><A name=test_shortcut>int Fl::test_shortcut(ulong) const</A></h3> - -Test the current event, which must be an <tt>FL_KEYBOARD</tt> or <tt> -FL_SHORTCUT</tt>, against a shortcut value (described in <A href=Fl_Button.html#Fl_Button.shortcut> -<tt>Fl_Button</tt></A>). Returns non-zero if there is a match. Not to -be confused with <A href="subclassing.html#test_shortcut"><tt> -Fl_Widget::test_shortcut()</tt></A>. - -<h3><A name=visual>static int Fl::visual(int)</A></h3> - -Selects a visual so that your graphics are drawn correctly. This is -only allowed before you call show() on any windows. This does nothing -if the default visual satisfies the capabilities, or if no visual -satisfies the capabilities, or on systems that don't have such -brain-dead notions. - -<P>Only the following combinations do anything useful: - -<UL> -<LI><tt>Fl::visual(FL_RGB)</tt> -<BR>Full/true color (if there are several depths FLTK chooses the -largest). Do this if you use <A href="drawing.html#fl_draw_image"><tt>fl_draw_image</tt> -</A> for much better (non-dithered) output. -<BR> </LI> -<LI><tt>Fl::visual(FL_RGB8)</tt> -<BR>Full color with at least 24 bits of color. <tt>FL_RGB</tt> will -always pick this if available, but if not it will happily return a -less-than-24 bit deep visual. This call fails if 24 bits are not -available. -<BR> </LI> -<LI><tt>Fl::visual(FL_DOUBLE|FL_INDEX)</tt> -<BR>Hardware double buffering. Call this if you are going to use <A href=Fl_Double_Window.html#Fl_Double_Window> -<tt>Fl_Double_Window</tt></A>. -<BR> </LI> -<LI><tt>Fl::visual(FL_DOUBLE|FL_RGB)</tt></LI> -<LI><tt>Fl::visual(FL_DOUBLE|FL_RGB8)</tt> -<BR>Hardware double buffering and full color. -</UL> - -This returns true if the system has the capabilities by default or -FLTK suceeded in turing them on. Your program will still work even if -this returns false (it just won't look as good). - -<h3><A name=w>static int Fl::w()</A></h3> - -Returns the width of the screen in pixels. - -<h3><A name=wait>static int Fl::wait()</a></h3> - -Waits until "something happens" and then returns. Call this -repeatedly to "run" your program. You can also check what happened -each time after this returns, which is quite useful for managing -program state. - -<P>What this really does is call all idle callbacks, all elapsed -timeouts, call <tt>Fl::flush()</tt> to get the screen to update, and -then wait some time (zero if there are idle callbacks, the shortest of -all pending timeouts, or infinity), for any events from the user or -any <tt>Fl::add_fd()</tt> callbacks. It then handles the events and -calls the callbacks and then returns. - -<P>The return value is non-zero if there are any visible windows (this -may change in future versions of fltk). - -<h3>static double Fl::wait(double time)</h3> - -Same as <tt>Fl::wait()</tt> except it waits a maximum of <i>time</i> -seconds. <i>It can return much sooner if something happens.</i> - -<P>The return value is positive if an event or fd happens before the -time elapsed. It is zero if nothing happens (on Win32 this will only -return zero if <i>time</i> is zero). It is negative if an error -occurs (this will happen on Unix if a signal happens). - -<h3><A name=warning>static void (*Fl::warning)(const char *, ...)</A> -<br><A name=error>static void (*Fl::error)(const char *, ...)</A> -<br><A name=fatal>static void (*Fl::fatal)(const char *, ...)</A></h3> - -FLTK will call these to print messages when unexpected conditions -occur. By default they <tt>fprintf</tt> to <tt>stderr</tt>, and <tt> -Fl::error</tt> and <tt>Fl::fatal</tt> call <tt>exit(1)</tt>. You can -override the behavior by setting the function pointers to your own -routines. - -<P><tt>Fl::warning</tt> means that there was a recoverable problem, the -display may be messed up but the user can probably keep working (all X -protocol errors call this). <tt>Fl::error</tt> means there is a -recoverable error, but the display is so messed up it is unlikely the -user can continue (very little calls this now). <tt>Fl::fatal</tt> must -not return, as FLTK is in an unusable state, however your version may -be able to use <tt>longjmp</tt> or an exception to continue, as long as -it does not call FLTK again. - -</body></html> +</body> +</html> diff --git a/documentation/widgets.html b/documentation/widgets.html index bf4100968..159913ca5 100644 --- a/documentation/widgets.html +++ b/documentation/widgets.html @@ -1,75 +1,94 @@ <HTML><BODY> <H1 ALIGN=RIGHT><A NAME=widgets>A - Widget Reference</A></H1> -This appendix describes all of the widget classes in FLTK. For a -description of the <TT>fl_</TT> functions and <TT">Fl::</TT> methods, -see <A href=functions.html#functions>Appendix B</A>. +This appendix describes all of the classes in FLTK. For a +description of the <TT>fl_</TT> functions, see +<A href="functions.html">Appendix B</A>. <H2>Alphabetical List of Classes</H2> -<CENTER><TABLE WIDTH=80% SUMMARY="List of Widget Classes"> +<CENTER><TABLE WIDTH=80% SUMMARY="List of FLTK Classes"> <TR ALIGN=LEFT VALIGN=TOP> <TD> -<A HREF="Fl_Adjuster.html#Fl_Adjuster">Fl_Adjuster</A><BR> -<A HREF="Fl_Box.html#Fl_Box">Fl_Box</A><BR> -<A HREF="Fl_Browser.html#Fl_Browser">Fl_Browser</A><BR> -<A HREF="Fl_Browser_.html#Fl_Browser_">Fl_Browser_</A><BR> -<A HREF="Fl_Button.html#Fl_Button">Fl_Button</A><BR> -<A HREF="Fl_Chart.html#Fl_Chart">Fl_Chart</A><BR> -<A HREF="Fl_Check_Button.html#Fl_Check_Button">Fl_Check_Button</A><BR> -<A HREF="Fl_Choice.html#Fl_Choice">Fl_Choice</A><BR> -<A HREF="Fl_Clock.html#Fl_Clock">Fl_Clock</A><BR> -<A HREF="Fl_Color_Chooser.html#Fl_Color_Chooser">Fl_Color_Chooser</A><BR> -<A HREF="Fl_Counter.html#Fl_Counter">Fl_Counter</A><BR> -<A HREF="Fl_Dial.html#Fl_Dial">Fl_Dial</A><BR> -<A HREF="Fl_Double_Window.html#Fl_Double_Window">Fl_Double_Window</A><BR> -<A HREF="Fl_End.html#Fl_End">Fl_End</A><BR> -<A HREF="Fl_File_Browser.html#Fl_File_Browser">Fl_File_Browser</A><BR> -<A HREF="Fl_File_Chooser.html#Fl_File_Chooser">Fl_File_Chooser</A><BR> -<A HREF="Fl_File_Icon.html#Fl_File_Icon">Fl_File_Icon</A><BR> -<A HREF="Fl_Float_Input.html#Fl_Float_Input">Fl_Float_Input</A><BR> -<A HREF="Fl_Free.html#Fl_Free">Fl_Free</A><BR> -<A HREF="Fl_Gl_Window.html#Fl_Gl_Window">Fl_Gl_Window</A><BR> -<A HREF="Fl_Group.html#Fl_Group">Fl_Group</A><BR> -<A HREF="Fl_Help_Dialog.html#Fl_Help_Dialog">Fl_Help_Dialog</A><BR> -<A HREF="Fl_Help_View.html#Fl_Help_View">Fl_Help_View</A><BR> -<A HREF="Fl_Hold_Browser.html#Fl_Hold_Browser">Fl_Hold_Browser</A><BR> -<A HREF="Fl_Input.html#Fl_Input">Fl_Input</A><BR> -<A HREF="Fl_Input_.html#Fl_Input_">Fl_Input_</A><BR> -<A HREF="Fl_Int_Input.html#Fl_Int_Input">Fl_Int_Input</A><BR> -<A HREF="Fl_Light_Button.html#Fl_Light_Button">Fl_Light_Button</A><BR> -<A HREF="Fl_Menu_.html#Fl_Menu_">Fl_Menu_</A><BR> -<A HREF="Fl_Menu_Bar.html#Fl_Menu_Bar">Fl_Menu_Bar</A><BR> -<A HREF="Fl_Menu_Button.html#Fl_Menu_Button">Fl_Menu_Button</A><BR> -<A HREF="Fl_Menu_Item.html#Fl_Menu_Item">Fl_Menu_Item</A><BR> -<A HREF="Fl_Menu_Window.html#Fl_Menu_Window">Fl_Menu_Window</A><BR> -<A HREF="Fl_Multi_Browser.html#Fl_Multi_Browser">Fl_Multi_Browser</A><BR> -<A HREF="Fl_Multiline_Input.html#Fl_Multiline_Input">Fl_Multiline_Input</A><BR> -<A HREF="Fl_Multiline_Output.html#Fl_Multiline_Output">Fl_Multiline_Output</A><BR> -<A HREF="Fl_Output.html#Fl_Output">Fl_Output</A><BR> -<A HREF="Fl_Overlay_Window.html#Fl_Overlay_Window">Fl_Overlay_Window</A><BR> -<A HREF="Fl_Pack.html#Fl_Pack">Fl_Pack</A><BR> -<A HREF="Fl_Positioner.html#Fl_Positioner">Fl_Positioner</A><BR> -<A HREF="Fl_Repeat_Button.html#Fl_Repeat_Button">Fl_Repeat_Button</A><BR> -<A HREF="Fl_Return_Button.html#Fl_Return_Button">Fl_Return_Button</A><BR> -<A HREF="Fl_Roller.html#Fl_Roller">Fl_Roller</A><BR> -<A HREF="Fl_Round_Button.html#Fl_Round_Button">Fl_Round_Button</A><BR> -<A HREF="Fl_Scroll.html#Fl_Scroll">Fl_Scroll</A><BR> -<A HREF="Fl_Scrollbar.html#Fl_Scrollbar">Fl_Scrollbar</A><BR> -<A HREF="Fl_Secret_Input.html#Fl_Secret_Input">Fl_Secret_Input</A><BR> -<A HREF="Fl_Select_Browser.html#Fl_Select_Browser">Fl_Select_Browser</A><BR> -<A HREF="Fl_Single_Window.html#Fl_Single_Window">Fl_Single_Window</A><BR> -<A HREF="Fl_Slider.html#Fl_Slider">Fl_Slider</A><BR> -<A HREF="Fl_Tabs.html#Fl_Tabs">Fl_Tabs</A><BR> -<A HREF="Fl_Tile.html#Fl_Tile">Fl_Tile</A><BR> -<A HREF="Fl_Timer.html#Fl_Timer">Fl_Timer</A><BR> -<A HREF="Fl_Valuator.html#Fl_Valuator">Fl_Valuator</A><BR> -<A HREF="Fl_Value_Input.html#Fl_Value_Input">Fl_Value_Input</A><BR> -<A HREF="Fl_Value_Output.html#Fl_Value_Output">Fl_Value_Output</A><BR> -<A HREF="Fl_Value_Slider.html#Fl_Value_Slider">Fl_Value_Slider</A><BR> -<A HREF="Fl_Widget.html#Fl_Widget">Fl_Widget</A><BR> -<A HREF="Fl_Window.html#Fl_Window">Fl_Window</A><BR> -<A HREF="Fl_Wizard.html#Fl_Wizard">Fl_Wizard</A><BR> +<A HREF="Fl.html">Fl</A><BR> +<A HREF="Fl_Adjuster.html">Fl_Adjuster</A><BR> +<A HREF="Fl_Bitmap.html">Fl_Bitmap</A><BR> +<A HREF="Fl_Box.html">Fl_Box</A><BR> +<A HREF="Fl_Browser_.html">Fl_Browser_</A><BR> +<A HREF="Fl_Browser.html">Fl_Browser</A><BR> +<A HREF="Fl_Button.html">Fl_Button</A><BR> +<A HREF="Fl_Chart.html">Fl_Chart</A><BR> +<A HREF="Fl_Check_Button.html">Fl_Check_Button</A><BR> +<A HREF="Fl_Choice.html">Fl_Choice</A><BR> +<A HREF="Fl_Clock.html">Fl_Clock</A><BR> +<A HREF="Fl_Color_Chooser.html">Fl_Color_Chooser</A><BR> +<A HREF="Fl_Counter.html">Fl_Counter</A><BR> +<A HREF="Fl_Dial.html">Fl_Dial</A><BR> +<A HREF="Fl_Double_Window.html">Fl_Double_Window</A><BR> +<A HREF="Fl_End.html">Fl_End</A><BR> +<A HREF="Fl_File_Browser.html">Fl_File_Browser</A><BR> +<A HREF="Fl_File_Chooser.html">Fl_File_Chooser</A><BR> +<A HREF="Fl_File_Icon.html">Fl_File_Icon</A><BR> +<A HREF="Fl_Float_Input.html">Fl_Float_Input</A><BR> +<A HREF="Fl_Free.html">Fl_Free</A><BR> +<A HREF="Fl_GIF_Image.html">Fl_GIF_Image</A><BR> +<A HREF="Fl_Gl_Window.html">Fl_Gl_Window</A><BR> +<A HREF="Fl_Group.html">Fl_Group</A><BR> +<A HREF="Fl_Help_Dialog.html">Fl_Help_Dialog</A><BR> +<A HREF="Fl_Help_View.html">Fl_Help_View</A><BR> +<A HREF="Fl_Hold_Browser.html">Fl_Hold_Browser</A><BR> +<A HREF="Fl.html">Fl</A><BR> +<A HREF="Fl_Image.html">Fl_Image</A><BR> +<A HREF="Fl_Input_.html">Fl_Input_</A><BR> +<A HREF="Fl_Input.html">Fl_Input</A><BR> +<A HREF="Fl_Int_Input.html">Fl_Int_Input</A><BR> +<A HREF="Fl_JPEG_Image.html">Fl_JPEG_Image</A><BR> +<A HREF="Fl_Light_Button.html">Fl_Light_Button</A><BR> +<A HREF="Fl_Menu_Bar.html">Fl_Menu_Bar</A><BR> +<A HREF="Fl_Menu_Button.html">Fl_Menu_Button</A><BR> +<A HREF="Fl_Menu_.html">Fl_Menu_</A><BR> +<A HREF="Fl_Menu_Item.html">Fl_Menu_Item</A><BR> +</TD><TD> +<A HREF="Fl_Menu_Window.html">Fl_Menu_Window</A><BR> +<A HREF="Fl_Multi_Browser.html">Fl_Multi_Browser</A><BR> +<A HREF="Fl_Multiline_Input.html">Fl_Multiline_Input</A><BR> +<A HREF="Fl_Multiline_Output.html">Fl_Multiline_Output</A><BR> +<A HREF="Fl_Output.html">Fl_Output</A><BR> +<A HREF="Fl_Overlay_Window.html">Fl_Overlay_Window</A><BR> +<A HREF="Fl_Pack.html">Fl_Pack</A><BR> +<A HREF="Fl_Pixmap.html">Fl_Pixmap</A><BR> +<A HREF="Fl_PNG_Image.html">Fl_PNG_Image</A><BR> +<A HREF="Fl_PNM_Image.html">Fl_PNM_Image</A><BR> +<A HREF="Fl_Positioner.html">Fl_Positioner</A><BR> +<A HREF="Fl_Repeat_Button.html">Fl_Repeat_Button</A><BR> +<A HREF="Fl_Return_Button.html">Fl_Return_Button</A><BR> +<A HREF="Fl_RGB_Image.html">Fl_RGB_Image</A><BR> +<A HREF="Fl_Roller.html">Fl_Roller</A><BR> +<A HREF="Fl_Round_Button.html">Fl_Round_Button</A><BR> +<A HREF="Fl_Scrollbar.html">Fl_Scrollbar</A><BR> +<A HREF="Fl_Scroll.html">Fl_Scroll</A><BR> +<A HREF="Fl_Secret_Input.html">Fl_Secret_Input</A><BR> +<A HREF="Fl_Select_Browser.html">Fl_Select_Browser</A><BR> +<A HREF="Fl_Shared_Image.html">Fl_Shared_Image</A><BR> +<A HREF="Fl_Single_Window.html">Fl_Single_Window</A><BR> +<A HREF="Fl_Slider.html">Fl_Slider</A><BR> +<A HREF="Fl_Tabs.html">Fl_Tabs</A><BR> +<A HREF="Fl_Text_Buffer.html">Fl_Text_Buffer</A><BR> +<A HREF="Fl_Text_Display.html">Fl_Text_Display</A><BR> +<A HREF="Fl_Text_Editor.html">Fl_Text_Editor</A><BR> +<A HREF="Fl_Tiled_Image.html">Fl_Tiled_Image</A><BR> +<A HREF="Fl_Tile.html">Fl_Tile</A><BR> +<A HREF="Fl_Timer.html">Fl_Timer</A><BR> +<A HREF="Fl_Tooltip.html">Fl_Tooltip</A><BR> +<A HREF="Fl_Valuator.html">Fl_Valuator</A><BR> +<A HREF="Fl_Value_Input.html">Fl_Value_Input</A><BR> +<A HREF="Fl_Value_Output.html">Fl_Value_Output</A><BR> +<A HREF="Fl_Value_Slider.html">Fl_Value_Slider</A><BR> +<A HREF="Fl_Widget.html">Fl_Widget</A><BR> +<A HREF="Fl_Window.html">Fl_Window</A><BR> +<A HREF="Fl_Wizard.html">Fl_Wizard</A><BR> +<A HREF="Fl_XBM_Image.html">Fl_XBM_Image</A><BR> +<A HREF="Fl_XPM_Image.html">Fl_XPM_Image</A><BR> </TD> </TR> </TABLE></CENTER> @@ -77,90 +96,117 @@ see <A href=functions.html#functions>Appendix B</A>. <H2>Class Hierarchy</H2> <UL> - <LI><A HREF="Fl_End.html#Fl_End">Fl_End</A> - <LI><A HREF="Fl_File_Icon.html#Fl_File_Icon">Fl_File_Icon</A> - <LI><A HREF="Fl_Menu_Item.html#Fl_Menu_Item">Fl_Menu_Item</A> - <LI><A HREF="Fl_Widget.html#Fl_Widget">Fl_Widget</A> - <UL> - <LI><A HREF="Fl_Box.html#Fl_Box">Fl_Box</A> - <LI><A HREF="Fl_Browser_.html#Fl_Browser_">Fl_Browser_</A> + <LI><A HREF="Fl.html">Fl</A> + <LI><A HREF="Fl_End.html#Fl_End">Fl_End</A> + <LI><A HREF="Fl_File_Icon.html#Fl_File_Icon">Fl_File_Icon</A> + <LI><A HREF="Fl_Image.html">Fl_Image</A> <UL> - <LI><A HREF="Fl_Browser.html#Fl_Browser">Fl_Browser</A> - <UL> - <LI><A HREF="Fl_File_Browser.html#Fl_File_Browser">Fl_File_Browser</A> - <LI><A HREF="Fl_Hold_Browser.html#Fl_Hold_Browser">Fl_Hold_Browser</A> - <LI><A HREF="Fl_Multi_Browser.html#Fl_Multi_Browser">Fl_Multi_Browser</A> - <LI><A HREF="Fl_Select_Browser.html#Fl_Select_Browser">Fl_Select_Browser</A> - </UL> + <LI><A HREF="Fl_Bitmap.html">Fl_Bitmap</A><BR> + <UL> + <LI><A HREF="Fl_XBM_Image.html">Fl_XBM_Image</A><BR> + </UL> + <LI><A HREF="Fl_Pixmap.html">Fl_Pixmap</A><BR> + <UL> + <LI><A HREF="Fl_GIF_Image.html">Fl_GIF_Image</A><BR> + <LI><A HREF="Fl_XPM_Image.html">Fl_XPM_Image</A><BR> + </UL> + <LI><A HREF="Fl_RGB_Image.html">Fl_RGB_Image</A><BR> + <UL> + <LI><A HREF="Fl_JPEG_Image.html">Fl_JPEG_Image</A><BR> + <LI><A HREF="Fl_PNG_Image.html">Fl_PNG_Image</A><BR> + <LI><A HREF="Fl_PNM_Image.html">Fl_PNM_Image</A><BR> + </UL> + <LI><A HREF="Fl_Shared_Image.html">Fl_Shared_Image</A><BR> + <LI><A HREF="Fl_Tiled_Image.html">Fl_Tiled_Image</A><BR> </UL> - <LI><A HREF="Fl_Button.html#Fl_Button">Fl_Button</A> + <LI><A HREF="Fl_Menu_Item.html#Fl_Menu_Item">Fl_Menu_Item</A> + <LI><A HREF="Fl_Text_Buffer.html">Fl_Text_Buffer</A> + <LI><A HREF="Fl_Tooltip.html">Fl_Tooltip</A> + <LI><A HREF="Fl_Widget.html#Fl_Widget">Fl_Widget</A> <UL> - <LI><A HREF="Fl_Check_Button.html#Fl_Check_Button">Fl_Check_Button</A> - <LI><A HREF="Fl_Light_Button.html#Fl_Light_Button">Fl_Light_Button</A> - <LI><A HREF="Fl_Repeat_Button.html#Fl_Repeat_Button">Fl_Repeat_Button</A> - <LI><A HREF="Fl_Return_Button.html#Fl_Return_Button">Fl_Return_Button</A> - <LI><A HREF="Fl_Round_Button.html#Fl_Round_Button">Fl_Round_Button</A> + <LI><A HREF="Fl_Box.html#Fl_Box">Fl_Box</A> + <LI><A HREF="Fl_Browser_.html#Fl_Browser_">Fl_Browser_</A> + <UL> + <LI><A HREF="Fl_Browser.html#Fl_Browser">Fl_Browser</A> + <UL> + <LI><A HREF="Fl_File_Browser.html#Fl_File_Browser">Fl_File_Browser</A> + <LI><A HREF="Fl_Hold_Browser.html#Fl_Hold_Browser">Fl_Hold_Browser</A> + <LI><A HREF="Fl_Multi_Browser.html#Fl_Multi_Browser">Fl_Multi_Browser</A> + <LI><A HREF="Fl_Select_Browser.html#Fl_Select_Browser">Fl_Select_Browser</A> + </UL> + </UL> + <LI><A HREF="Fl_Button.html#Fl_Button">Fl_Button</A> + <UL> + <LI><A HREF="Fl_Check_Button.html#Fl_Check_Button">Fl_Check_Button</A> + <LI><A HREF="Fl_Light_Button.html#Fl_Light_Button">Fl_Light_Button</A> + <LI><A HREF="Fl_Repeat_Button.html#Fl_Repeat_Button">Fl_Repeat_Button</A> + <LI><A HREF="Fl_Return_Button.html#Fl_Return_Button">Fl_Return_Button</A> + <LI><A HREF="Fl_Round_Button.html#Fl_Round_Button">Fl_Round_Button</A> + </UL> + <LI><A HREF="Fl_Chart.html#Fl_Chart">Fl_Chart</A> + <LI><A HREF="Fl_Clock.html#Fl_Clock">Fl_Clock</A> + <LI><A HREF="Fl_Free.html#Fl_Free">Fl_Free</A> + <LI><A HREF="Fl_Group.html#Fl_Group">Fl_Group</A> + <UL> + <LI><A HREF="Fl_Color_Chooser.html#Fl_Color_Chooser">Fl_Color_Chooser</A> + <LI><A HREF="Fl_File_Chooser.html#Fl_File_Chooser">Fl_File_Chooser</A> + <LI><A HREF="Fl_Help_Dialog.html#Fl_Help_Dialog">Fl_Help_Dialog</A> + <LI><A HREF="Fl_Help_View.html#Fl_Help_View">Fl_Help_View</A> + <LI><A HREF="Fl_Pack.html#Fl_Pack">Fl_Pack</A> + <LI><A HREF="Fl_Scroll.html#Fl_Scroll">Fl_Scroll</A> + <LI><A HREF="Fl_Tabs.html#Fl_Tabs">Fl_Tabs</A> + <LI><A HREF="Fl_Text_Display.html">Fl_Text_Display</A> + <UL> + <LI><A HREF="Fl_Text_Editor.html">Fl_Text_Editor</A> + </UL> + <LI><A HREF="Fl_Tile.html#Fl_Tile">Fl_Tile</A> + <LI><A HREF="Fl_Window.html#Fl_Window">Fl_Window</A> + <UL> + <LI><A HREF="Fl_Double_Window.html#Fl_Double_Window">Fl_Double_Window</A> + <LI><A HREF="Fl_Gl_Window.html#Fl_Gl_Window">Fl_Gl_Window</A> + <LI><A HREF="Fl_Menu_Window.html#Fl_Menu_Window">Fl_Menu_Window</A> + <LI><A HREF="Fl_Overlay_Window.html#Fl_Overlay_Window">Fl_Overlay_Window</A> + <LI><A HREF="Fl_Single_Window.html#Fl_Single_Window">Fl_Single_Window</A> + </UL> + <LI><A HREF="Fl_Wizard.html#Fl_Wizard">Fl_Wizard</A> + </UL> + <LI><A HREF="Fl_Input_.html#Fl_Input_">Fl_Input_</A> + <UL> + <LI><A HREF="Fl_Input.html#Fl_Input">Fl_Input</A> + <UL> + <LI><A HREF="Fl_Float_Input.html#Fl_Float_Input">Fl_Float_Input</A> + <LI><A HREF="Fl_Int_Input.html#Fl_Int_Input">Fl_Int_Input</A> + <LI><A HREF="Fl_Multiline_Input.html#Fl_Multiline_Input">Fl_Multiline_Input</A> + <LI><A HREF="Fl_Secret_Input.html#Fl_Secret_Input">Fl_Secret_Input</A> + </UL> + <LI><A HREF="Fl_Output.html#Fl_Output">Fl_Output</A> + <UL> + <LI><A HREF="Fl_Multiline_Output.html#Fl_Multiline_Output">Fl_Multiline_Output</A> + </UL> + </UL> + <LI><A HREF="Fl_Menu_.html#Fl_Menu_">Fl_Menu_</A> + <UL> + <LI><A HREF="Fl_Choice.html#Fl_Choice">Fl_Choice</A> + <LI><A HREF="Fl_Menu_Bar.html#Fl_Menu_Bar">Fl_Menu_Bar</A> + <LI><A HREF="Fl_Menu_Button.html#Fl_Menu_Button">Fl_Menu_Button</A> + </UL> + <LI><A HREF="Fl_Positioner.html#Fl_Positioner">Fl_Positioner</A> + <LI><A HREF="Fl_Timer.html#Fl_Timer">Fl_Timer</A> + <LI><A HREF="Fl_Valuator.html#Fl_Valuator">Fl_Valuator</A> + <UL> + <LI><A HREF="Fl_Adjuster.html#Fl_Adjuster">Fl_Adjuster</A> + <LI><A HREF="Fl_Counter.html#Fl_Counter">Fl_Counter</A> + <LI><A HREF="Fl_Dial.html#Fl_Dial">Fl_Dial</A> + <LI><A HREF="Fl_Roller.html#Fl_Roller">Fl_Roller</A> + <LI><A HREF="Fl_Slider.html#Fl_Slider">Fl_Slider</A> + <UL> + <LI><A HREF="Fl_Scrollbar.html#Fl_Scrollbar">Fl_Scrollbar</A> + <LI><A HREF="Fl_Value_Slider.html#Fl_Value_Slider">Fl_Value_Slider</A> + </UL> + <LI><A HREF="Fl_Value_Input.html#Fl_Value_Input">Fl_Value_Input</A> + <LI><A HREF="Fl_Value_Output.html#Fl_Value_Output">Fl_Value_Output</A> + </UL> </UL> - <LI><A HREF="Fl_Chart.html#Fl_Chart">Fl_Chart</A> - <LI><A HREF="Fl_Clock.html#Fl_Clock">Fl_Clock</A> - <LI><A HREF="Fl_Free.html#Fl_Free">Fl_Free</A> - <LI><A HREF="Fl_Group.html#Fl_Group">Fl_Group</A> - <UL> - <LI><A HREF="Fl_Color_Chooser.html#Fl_Color_Chooser">Fl_Color_Chooser</A> - <LI><A HREF="Fl_File_Chooser.html#Fl_File_Chooser">Fl_File_Chooser</A> - <LI><A HREF="Fl_Help_Dialog.html#Fl_Help_Dialog">Fl_Help_Dialog</A> - <LI><A HREF="Fl_Help_View.html#Fl_Help_View">Fl_Help_View</A> - <LI><A HREF="Fl_Pack.html#Fl_Pack">Fl_Pack</A> - <LI><A HREF="Fl_Scroll.html#Fl_Scroll">Fl_Scroll</A> - <LI><A HREF="Fl_Tabs.html#Fl_Tabs">Fl_Tabs</A> - <LI><A HREF="Fl_Tile.html#Fl_Tile">Fl_Tile</A> - <LI><A HREF="Fl_Window.html#Fl_Window">Fl_Window</A> - <UL> - <LI><A HREF="Fl_Double_Window.html#Fl_Double_Window">Fl_Double_Window</A> - <LI><A HREF="Fl_Gl_Window.html#Fl_Gl_Window">Fl_Gl_Window</A> - <LI><A HREF="Fl_Menu_Window.html#Fl_Menu_Window">Fl_Menu_Window</A> - <LI><A HREF="Fl_Overlay_Window.html#Fl_Overlay_Window">Fl_Overlay_Window</A> - <LI><A HREF="Fl_Single_Window.html#Fl_Single_Window">Fl_Single_Window</A> - </UL> - <LI><A HREF="Fl_Wizard.html#Fl_Wizard">Fl_Wizard</A> - </UL> - <LI><A HREF="Fl_Input_.html#Fl_Input_">Fl_Input_</A> - <UL> - <LI><A HREF="Fl_Input.html#Fl_Input">Fl_Input</A> - <UL> - <LI><A HREF="Fl_Float_Input.html#Fl_Float_Input">Fl_Float_Input</A> - <LI><A HREF="Fl_Int_Input.html#Fl_Int_Input">Fl_Int_Input</A> - <LI><A HREF="Fl_Multiline_Input.html#Fl_Multiline_Input">Fl_Multiline_Input</A> - <LI><A HREF="Fl_Secret_Input.html#Fl_Secret_Input">Fl_Secret_Input</A> - </UL> - <LI><A HREF="Fl_Output.html#Fl_Output">Fl_Output</A> - <UL> - <LI><A HREF="Fl_Multiline_Output.html#Fl_Multiline_Output">Fl_Multiline_Output</A> - </UL> - </UL> - <LI><A HREF="Fl_Menu_.html#Fl_Menu_">Fl_Menu_</A> - <UL> - <LI><A HREF="Fl_Choice.html#Fl_Choice">Fl_Choice</A> - <LI><A HREF="Fl_Menu_Bar.html#Fl_Menu_Bar">Fl_Menu_Bar</A> - <LI><A HREF="Fl_Menu_Button.html#Fl_Menu_Button">Fl_Menu_Button</A> - </UL> - <LI><A HREF="Fl_Positioner.html#Fl_Positioner">Fl_Positioner</A> - <LI><A HREF="Fl_Timer.html#Fl_Timer">Fl_Timer</A> - <LI><A HREF="Fl_Valuator.html#Fl_Valuator">Fl_Valuator</A> - <UL> - <LI><A HREF="Fl_Adjuster.html#Fl_Adjuster">Fl_Adjuster</A> - <LI><A HREF="Fl_Counter.html#Fl_Counter">Fl_Counter</A> - <LI><A HREF="Fl_Dial.html#Fl_Dial">Fl_Dial</A> - <LI><A HREF="Fl_Roller.html#Fl_Roller">Fl_Roller</A> - <LI><A HREF="Fl_Slider.html#Fl_Slider">Fl_Slider</A> - <UL> - <LI><A HREF="Fl_Scrollbar.html#Fl_Scrollbar">Fl_Scrollbar</A> - <LI><A HREF="Fl_Value_Slider.html#Fl_Value_Slider">Fl_Value_Slider</A> - </UL> - <LI><A HREF="Fl_Value_Input.html#Fl_Value_Input">Fl_Value_Input</A> - <LI><A HREF="Fl_Value_Output.html#Fl_Value_Output">Fl_Value_Output</A> - </UL> - </UL> </UL> </BODY></HTML> diff --git a/src/Fl.cxx b/src/Fl.cxx index 39f1919c7..51bf7d61c 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.9 2001/11/28 18:00:17 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.10 2001/11/28 20:43:44 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -802,7 +802,7 @@ void Fl_Widget::damage(uchar flags, int X, int Y, int W, int H) { // if we already have damage we must merge with existing region: if (i->region) { #ifdef WIN32 - Region R = XRectangleRegion(X, Y, W, H); + Fl_Region R = XRectangleRegion(X, Y, W, H); CombineRgn(i->region, i->region, R, RGN_OR); XDestroyRegion(R); #elif defined(__APPLE__) @@ -834,5 +834,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.9 2001/11/28 18:00:17 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.10 2001/11/28 20:43:44 easysw Exp $". // diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 92c435e1e..b393fa310 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tooltip.cxx,v 1.38.2.7 2001/11/18 20:52:28 easysw Exp $" +// "$Id: Fl_Tooltip.cxx,v 1.38.2.8 2001/11/28 20:43:44 easysw Exp $" // // Tooltip source file for the Fast Light Tool Kit (FLTK). // @@ -35,8 +35,8 @@ // Fl_Tooltip global variables... // -void (*Fl_Tooltip::tooltip_callback_)(void *) = 0; -void (*Fl_Tooltip::tooltip_exit_)(void *) = 0; +void (*Fl_Tooltip::tooltip_callback_)(void *) = Fl_Tooltip::tooltip_timeout; +void (*Fl_Tooltip::tooltip_exit_)(void *) = Fl_Tooltip::tooltip_exit; float Fl_Tooltip::delay_ = 0.5; Fl_TooltipBox *Fl_Tooltip::box = 0; Fl_Menu_Window *Fl_Tooltip::window = 0; @@ -189,5 +189,5 @@ Fl_Tooltip::tooltip_timeout(void *v) { // -// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.7 2001/11/18 20:52:28 easysw Exp $". +// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.8 2001/11/28 20:43:44 easysw Exp $". // diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index 39036e08d..7a3b4a3ef 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.7 2001/11/22 15:35:01 easysw Exp $" +// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.8 2001/11/28 20:43:44 easysw Exp $" // // Base widget class for the Fast Light Tool Kit (FLTK). // @@ -99,11 +99,6 @@ Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) { if (Fl_Group::current()) Fl_Group::current()->add(this); } -void Fl_Widget::tooltip(const char *t) { - Fl_Tooltip::enable(); - tooltip_ = t; -} - void Fl_Widget::resize(int X, int Y, int W, int H) { x_ = X; y_ = Y; w_ = W; h_ = H; } @@ -249,5 +244,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const { } // -// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.7 2001/11/22 15:35:01 easysw Exp $". +// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.8 2001/11/28 20:43:44 easysw Exp $". // diff --git a/src/gl_start.cxx b/src/gl_start.cxx index 1340eedce..ced7b0bac 100644 --- a/src/gl_start.cxx +++ b/src/gl_start.cxx @@ -1,5 +1,5 @@ // -// "$Id: gl_start.cxx,v 1.6.2.5.2.2 2001/11/27 17:44:08 easysw Exp $" +// "$Id: gl_start.cxx,v 1.6.2.5.2.3 2001/11/28 20:43:44 easysw Exp $" // // OpenGL context routines for the Fast Light Tool Kit (FLTK). // @@ -54,7 +54,7 @@ static int pw, ph; static Fl_Gl_Choice* gl_choice; #endif -Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.cxx +Fl_Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.cxx void gl_start() { if (!context) { @@ -117,5 +117,5 @@ int Fl::gl_visual(int mode, int *alist) { #endif // -// End of "$Id: gl_start.cxx,v 1.6.2.5.2.2 2001/11/27 17:44:08 easysw Exp $". +// End of "$Id: gl_start.cxx,v 1.6.2.5.2.3 2001/11/28 20:43:44 easysw Exp $". // |
