From d0561193107497f46812e8d8d88ed867eca1136e Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 12 Apr 2009 09:40:59 +0000 Subject: 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. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Widget.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 9ee3c0830..724e00e00 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -181,8 +181,8 @@ public: Override this function to draw your own widgets. If you ever need to call another widget's draw method from within your - own draw method, 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, 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 -- cgit v1.2.3