All,

I've shifted this out of the STR and into the group so that brains smarter than 
mine can join in and say what's what...


> Link: http://www.fltk.org/str.php?L2834
> Version: 1.3-feature
> 
> 
> @Ian,
> 
> I don't think calling ((Fl_Widget *)this)->draw() will work
> in my Fl_Help_View subclass's draw() method (it will recurs)
> - or am I misunderstanding you?
> 
> I tried calling ((Fl_Group *)this)->draw() but this doesn't work also.


OK, here's what I thought was going on...

You have a derived widget, derived from Fl_Help_View, and in your derived draw 
method you wanted to call the base class by doing:

        Fl_Help_View::draw();

But for whatever reason (scope I imagine) that's not allowed.

So I wondered if we can trigger the base class by indirection via the (public, 
virtual) draw method of Fl_Widget.

But you indicate that this will nto work...

Anybody care to pitch in here?


> 
> The same with handle(), I believe..
> 
> @Albrecht
> Looking at other widgets I guess FLTK's design deliberately not intended
> a subclass to use the draw() method of it's inherited class, which is
> okay for simple widgtes as you have draw_box() and draw_label() that
> can be used.
> 
> Nevertheless I think it might be usefull for extending widgets to have
> a protected (you are right about not needing public) access to draw().
> 
> Or am I missing something - how else could one extend the inherited
> draw() without duplicating the whole drawing code (which is huge in
> case of Fl_Help_View) or using some dirty tricks?





SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to