manolo gouy wrote:
>> I have begun to separate graphics system-specific devices.
>> The objective would be to have an Xlib-supporting device,
>> a Quartz one, a GDI device,... I have started with the image-drawing
>> part (Fl_Bitmap, Fl_Pixmap, Fl_RGB_Image), and realized our device
>> hierarchy was wrong. On mac and MSWin, we want the same graphics
>> function, say Fl_Device::rect(), to be called for both the display and
>> the printer, because both use the same graphics model (Quartz and GDI,
>> respectively). With the present device hierarchy, that is not possible,
>> unless this function supports all 3 platforms which is against the
>> objective of separating the code for each device.
>>
>> Thus, I have changed the device hierarchy, and committed that.
>> This change introduces two classes with double inheritance.
>>
>> There's no change to the APIs whatsoever, nor to the logic
>> that fl_xxx() functions do nothing but calling Fl_Device::xxx()
>> virtual functions for the current device instance.
> 
> OK. I will revert FLTK-1.3 to what it was before r. 7520.
> No multiple inheritance any longer.

Yea I don't understand why multiple inheritance would be necessary.

Just make all the GDI-using classes subclasses of a base one, thus they 
will all share the same rect() implementation. This may mean there is an 
"unused" class at the base but that is ok.

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

Reply via email to