> Would it make sense to make a new method that does the following
> common coding pattern to find the inside area of a widget:
>
> int X = yourwidget->x() + Fl::box_dx(yourwidget->box());
> int Y = yourwidget->y() + Fl::box_dy(yourwidget->box());
> int W = yourwidget->w() - Fl::box_dw(yourwidget->box());
> int H = yourwidget->h() - Fl::box_dh(yourwidget->box());
>
> This seems to be a common coding pattern that could maybe be made
> into something much simpler, like:
>
> int X,Y,W,H;
> Fl::inner_box(yourwidget,X,Y,W,H);
>
Personally, I'd prefer separate methods (in Fl_Widget)
int inner_x() { return x() + Fl::box_dx(box()); }
... etc
Probably just a matter of taste.
Best,
Stan
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev