> > Huh? I don't understand the question.
> > You get the size of a button just by calling its w() and 
> h() methods.
> > What property of the widget are you trying to measure other than its
> > width and height?
> >
> 
> The w() and h() methods return the size that the user 
> requested when the widget was created or resized.  What I 
> want is the "shrink-wrap" size.
> For labels and buttons it is the size of the label and/or 
> image and the surrounding box.
> 
> For example:
> 
> void fl_Widget_shrinkwrap_size(Widget *o, int* sizes) {
>   int w,h;
>   o->measure(w,h);
>   if (w > 5 && 
> o->align()&(fltk3::ALIGN_LEFT|fltk3::ALIGN_RIGHT)) {w += 6;}
> 
>   sizes[0]=w + fltk3::box_dw(o->box());
>   sizes[1]=h + fltk3::box_dh(o->box());
> }

Nope, sorry, you've lost me. I'm too thick, but I can't grok what it is
you are doing here...





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

Reply via email to