diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-11-23 19:47:52 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-11-23 19:47:52 +0000 |
| commit | a42ded75e297cedfcb448537e77d13350df0fe92 (patch) | |
| tree | 3940e35fff5db18195b113bcb5055f7c5d0577a7 /documentation | |
| parent | 5cc0f07c8a18841ba32ec5b3a12737c9f7d13cc2 (diff) | |
Added the 2.0 Fl_Widget::copy_label() method to allow FLTK 1.x
applications to have their label strings managed by FLTK (STR
#630)
Added Fl::delete_widget() method to safely delete widgets in
callback methods (STR #629)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3917 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/Fl.html | 11 | ||||
| -rw-r--r-- | documentation/Fl_Widget.html | 16 | ||||
| -rw-r--r-- | documentation/common.html | 11 | ||||
| -rw-r--r-- | documentation/index.html | 6 | ||||
| -rw-r--r-- | documentation/preface.html | 6 |
5 files changed, 41 insertions, 9 deletions
diff --git a/documentation/Fl.html b/documentation/Fl.html index 5e34d8394..96791f3d3 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -49,6 +49,7 @@ state information and global methods for the current application.</P> <LI><A HREF="#Fl.copy">copy</A></LI> <LI><A HREF="#Fl.damage">damage</A></LI> <LI><A HREF="#Fl.default_atclose">default_atclose</A></LI> + <LI><A HREF="#Fl.delete_widget">delete_widget</A></LI> <LI><A HREF="#Fl.display">display</A></LI> <LI><A HREF="#Fl.dnd">dnd</A></LI> <LI><A HREF="#Fl.dnd_text_ops">dnd_text_ops</A></LI> @@ -491,6 +492,16 @@ void damage(int x);</A></H4> <H4><A NAME="Fl.default_atclose">void default_atclose(Fl_Window*,void*);</A></H4> +<p>This is the default callback for window widgets. It hides the +window and then calls the default widget callback.</p> + +<H4><A NAME="Fl.delete_widget">void delete_widget(Fl_Widget*);</A></H4> + +<p>Schedules a widget for deletion when it is safe to do so. Use +this method to delete a widget inside a callback function. When +deleting groups or windows, you must only delete the group or +window widget and not the individual child widgets.</p> + <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 diff --git a/documentation/Fl_Widget.html b/documentation/Fl_Widget.html index f7e0e09e5..179693959 100644 --- a/documentation/Fl_Widget.html +++ b/documentation/Fl_Widget.html @@ -53,6 +53,7 @@ to call <TT>redraw()</TT> after these. </P> <UL> <LI><A href=#Fl_Widget.color>color</A></LI> <LI><A href=#Fl_Widget.contains>contains</A></LI> +<LI><A href=#Fl_Widget.copy_label>copy_label</A></LI> <LI><A href=#Fl_Widget.damage>damage</A></LI> <LI><A href=#Fl_Widget.deactivate>deactivate</A></LI> <LI><A href=#Fl_Widget.default_callback>default_callback</A></LI> @@ -64,10 +65,10 @@ to call <TT>redraw()</TT> after these. </P> <LI><A href=#Fl_Widget.image>image</A></LI> <LI><A href=#Fl_Widget.inside>inside</A></LI> <LI><A href=#Fl_Widget.label>label</A></LI> -<LI><A href=#Fl_Widget.labelcolor>labelcolor</A></LI> </UL> </TD><TD align=left valign=top> <UL> +<LI><A href=#Fl_Widget.labelcolor>labelcolor</A></LI> <LI><A href=#Fl_Widget.labelfont>labelfont</A></LI> <LI><A href=#Fl_Widget.labelsize>labelsize</A></LI> <LI><A href=#Fl_Widget.labeltype>labeltype</A></LI> @@ -258,6 +259,14 @@ method for more information. equal to this widget. Returns 0 if <TT>b</TT> is <TT>NULL</TT>. +<H4><A name='Fl_Widget.copy_label'>void Fl_Widget::copy_label(const char*)</A></H4> + +<P>Sets the current label. Unlike <a +href='#Fl_Widget.label'><tt>label()</tt></a>, this method +allocates a copy of the label string instead of using the +original string pointer.</p> + + <H4><A name=Fl_Widget.damage>uchar Fl_Widget::damage() const<BR> void damage(uchar c);<BR> void damage(uchar c, int X, int Y, int W, int H);</A></H4> @@ -329,7 +338,10 @@ equal to <TT>a</TT>. Returns 0 if <TT>a</TT> is <TT>NULL</TT>. somewhere on or next to the widget. The passed pointer is stored unchanged in the widget (the string is <I>not</I> copied), so if you need to set the label to a formatted value, make sure the -buffer is <TT>static</TT>, global, or allocated. +buffer is <TT>static</TT>, global, or allocated. The <a +href='#Fl_Widget.copy_label'><tt>copy_label()</tt></a> method +can be used to make a copy of the label string +automatically.</p> <H4><A name=Fl_Widget.labelcolor>Fl_Color Fl_Widget::labelcolor() const diff --git a/documentation/common.html b/documentation/common.html index 85d091138..a7f17fca5 100644 --- a/documentation/common.html +++ b/documentation/common.html @@ -532,7 +532,16 @@ button->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED); <CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc"> <TR> - <TD><B>Hint:</B> + <TD><B>Note:</B> + + <P>You cannot delete a widget inside a callback, as the + widget may still be accessed by FLTK after your callback + is completed. Instead, use the <a + href='Fl.html#Fl.delete_widget'><tt>Fl::delete_widget()</tt></a> + method to mark your widget for deletion when it is safe + to do so.</p> + + <p><B>Hint:</B> <P>Many programmers new to FLTK or C++ try to use a non-static class method instead of a static class method diff --git a/documentation/index.html b/documentation/index.html index 97bd3e884..2853526ba 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -1,7 +1,7 @@ <HTML> <HEAD> <META NAME="robots" CONTENT="noindex"> - <TITLE>FLTK 1.1.5 Programming Manual</TITLE> + <TITLE>FLTK 1.1.6 Programming Manual</TITLE> </HEAD> <BODY> @@ -10,8 +10,8 @@ <TD VALIGN="MIDDLE"> <IMG SRC="FL.gif" WIDTH="200" HEIGHT="100" ALIGN="ABSMIDDLE" ALT="FL"></TD> <TD ALIGN="CENTER" VALIGN="MIDDLE"> - <H1>FLTK 1.1.5 Programming Manual</H1> - <P>Revision 5 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR> + <H1>FLTK 1.1.6 Programming Manual</H1> + <P>Revision 6 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR> Copyright 1998-2004 by Bill Spitzak and others.</P> </TD> </TR> diff --git a/documentation/preface.html b/documentation/preface.html index c773fa575..a53e8899d 100644 --- a/documentation/preface.html +++ b/documentation/preface.html @@ -2,15 +2,15 @@ <HEAD> <META CONTENT="Written by Michael Sweet, Craig P. Earls, and Bill Spitzak" NAME="Author"> <META CONTENT="Copyright 1998-2004 by Bill Spitzak and Others." NAME="Copyright"> - <META CONTENT="Revision 5" NAME="DocNumber"> - <TITLE>FLTK 1.1.5 Programming Manual</TITLE> + <META CONTENT="Revision 6" NAME="DocNumber"> + <TITLE>FLTK 1.1.6 Programming Manual</TITLE> </HEAD> <BODY> <H1 ALIGN="RIGHT"><A NAME="preface">Preface</A></H1> <P>This manual describes the Fast Light Tool Kit ("FLTK") -version 1.1.5, a C++ Graphical User Interface +version 1.1.6, a C++ Graphical User Interface ("GUI") toolkit for UNIX, Microsoft Windows and MacOS. Each of the chapters in this manual is designed as a tutorial for using FLTK, while the appendices provide a convenient reference |
