On 12/07/2011 15:35, Matthias Melcher wrote:
>
> On 12.07.2011, at 15:42, Edzard Egberts wrote:
>
>> Matthias Melcher schrieb:
>>>
>>> This is the original FLTK 1 code:
>>>
>>>
>>> void Fl_Button::draw() {
>>>    if (type() == FL_HIDDEN_BUTTON) return;
>>>    Fl_Color col = value() ? selection_color() : color();
>>>
>>>
>>> This is the code in FLTK 3, wrapper included:
>>>
>>>
>>> void fltk3::Button::draw() {
>>>    FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
>>>    if (type() == fltk3::HIDDEN_BUTTON) return;
>>>    fltk3::Color col = value() ? selection_color() : color();
>>>
>
> Ooops, I pressed send to quickly. I corrected the version above.
>
>
> I meant to show that only one single line of code is added
>

So with the FLTK3_OBJECT_VCALLS_WRAPPER definition wrapped in an ifdef, 
along with any support members in the classes, we arrive right back at 
the point where all wrapper support can be conditionally compiled. Looks 
good to me.

Ian, while I agree that getting the wrappers working is as important as 
the conditional compile out, past experience shows that going back to 
rework something results in one of two things:
1) It never happens.
2) Something gets missed.
Better to put the framework in place in the beginning, though I note 
that Matthias' description already seems to cover most of it. (still 
need to wrap additional member variables.)

With regard to comments on STL, the point I probably didn't make very 
clear was not so much "Use std::string in place of char*" as "use 
std::something in place of QWhizbang or wxSongAndDance (or the never to 
be seen fltk::bag_of_holding)"

Hope this helps,

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

Reply via email to