As Edzard says, you can use RTTI with fltk just fine (though for
backward compatibility reasons fltk does not use it itself.)

So that may well work out as the best way for you - see Edzard's
example.

Though I'd only use it (myself) if my code was statically linked, and
I'd built my copy of the fltk libs with RTTI enabled, just to be on the
safe side.

The behaviour (though things may be better these days!) of RTTI was
often "unexpected", so if you are using dynamically linked code,
potentially pulling in "unknown" fltk libs from the system, then I'd
veer towards Greg's suggestion.

That is, is it feasible to put some well-known string into (for example)
the label() or user_data() field of your light_xyPad() class and just
test for that string to ascertain if the parent group is a light_xyPad()
or a "plain" Fl_Group...?




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 mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to