manolo gouy wrote: > Is multiple inheritance allowed in FLTK ? > I dont see anything against that in the CMP.
This should be no problem. FLTK purposely does not use multiple inheritance, but that does not mean you cannot use it, including making objects that multiply inherit from Widget and your own code. Guesses for things to watch out for, in these examples C is a subclass that inherits both A and B: 1. The argument for callbacks is cast to void*. If you pass a C*, don't try to convert back to an A* or B*. Instead in the callback you must convert back to a C*, then use inline casting to what you want. Always convert void* back to exactly the class you converted from. 2. I suspect if you multiply inherit from two widgets it may screw up if you allocate on the stack, especially if one is made a parent of another. It may try to free one of them when the parent is destroyed. Then again maybe not. I am not going to worry about it because I don't think you want to do that anyway... _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
