diff options
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Widget.H | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 46e457833..8d6e57005 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -177,8 +177,17 @@ public: Never call this function directly. FLTK will schedule redrawing whenever needed. If your widget must be redrawn as soon as possible, call redraw() 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; |
