Author: AlbrechtS
Date: 2009-04-12 02:40:59 -0700 (Sun, 12 Apr 2009)
New Revision: 6753
Log:
Reworded description of calling the virtual draw() method for embedded
widgets in FL/Fl_Widget.H, as discussed in fltk.development, with an
additional hint that draw() is virtual.
Modified:
branches/branch-1.3/FL/Fl_Widget.H
Modified: branches/branch-1.3/FL/Fl_Widget.H
===================================================================
--- branches/branch-1.3/FL/Fl_Widget.H 2009-04-11 20:46:06 UTC (rev 6752)
+++ branches/branch-1.3/FL/Fl_Widget.H 2009-04-12 09:40:59 UTC (rev 6753)
@@ -181,8 +181,8 @@
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 upcast the
- embedded widget's pointer to Fl_Widget* and call the virtual draw()
method.
+ own draw() method</I>, e.g. for an embedded scrollbar, you can do it
+ (because draw() is virtual) like this:
\code
Fl_Widget *s = &scroll; // scroll is an embedded
Fl_Scrollbar
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit