Documentation updates for STR #2142 (protected draw methods).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2009-02-20 08:15:32 +00:00
parent 5e9a5f3023
commit 354701c6f6
3 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
- All draw() methods of widgets are now protected (STR #2142).
- The new configure option --enable-x11 (lowercase 'x') enables
cygwin builds under Windows (with --enable-cygwin) to use X11
instead of GDI drawing (STR #2147) and is ignored otherwise.

View File

@ -179,6 +179,15 @@ public:
instead.
Override this function to draw your own widgets.
If you ever need to call another widget's draw method <I>from within your
own draw method</I>, e.g. for an embedded scrollbar, you must downcast the
embedded widget's pointer to Fl_Widget* and call the virtual draw() method.
\code
Fl_Widget *s = &scroll; // scroll is an embedded Fl_Scrollbar
s->draw(); // calls Fl_Scrollbar::draw()
\endcode
*/
virtual void draw() = 0;

View File

@ -13,17 +13,12 @@ Calling these functions at other places will result in undefined behavior!
To write code here, you must subclass one of the existing Fl_Widget
classes and implement your own version of draw().
\li The most common place is inside the virtual method
<A href="subclassing.html#draw"><tt>Fl_Widget::draw()</tt></A>.
To write code here, you must subclass one of the existing Fl_Widget
classes and implement your own version of draw().
\li You can also write <A href="common.html#boxtypes">boxtypes</A> and
<A href="common.html#labeltypes">labeltypes</A>. These are small
procedures that can be called by existing
<A HREF="subclassing.html#draw"><tt>Fl_Widget::draw()</tt></A>
methods. These "types" are identified by an 8-bit index that is stored
in the widget's box(), labeltype(), and possibly other properties.
Fl_Widget::draw() methods. These "types" are identified by an 8-bit
index that is stored in the widget's box(), labeltype(), and possibly
other properties.
\li You can call Fl_Window::make_current() to do incremental update of a
widget. Use Fl_Widget::window() to find the window.