Olly wrote:
> "The most common place is inside the virtual method Fl_Widget::draw().
> To write code here, you must subclass one of the existing Fl_Widget
> classes and implement your own version of draw()."
> 
> Do you know of any example code that uses this method that I could look at?

        Yes, for an example of a custom draw() routine in a subclassed widget, 
see:
        http://seriss.com/people/erco/fltk/#FltkX
        http://seriss.com/people/erco/fltk/#AnimateDrawing

        ..the "void draw()" routines being the one in question.

        If you search for 'void draw()' on that page, you'll find
        several examples that do this, the first example (FltkX) being
        the simplest, and the second (AnimateDrawing) being one that involves
        image drawing. The latter has a call to "Fl_Box::draw();" which
        is similar to what you were trying to do.

        In FLTK there are several situations where you subclass a widget
        (Fl_Box, Fl_Window, etc) to gain access to features; the FLTK
        draw() method, handle() method, and resize() method, to name a few.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to