[..]
> This is documented here:
>
(quoting from the docs)
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 downcast the embedded widget's 
pointer to Fl_Widget* and call the virtual draw() method.

        Fl_Widget *s = &scroll;  // scroll is an embedded Fl_Scrollbar
        s->draw();               // calls Fl_Scrollbar::draw()
(end of quote)

Just a minor nit. I believe the term "downcast" means something
like "use of a cast operator to convert from a base class to
a derived class pointer or reference."  I don't think the example
shows a cast, and if it did it would be an upcast.

I'd suggest  "... you must assign the embedded widget's pointer ..."

Best,
Stan
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to