Re: Geeting GtkWidget's allocation



"Padraig O'Briain" <Padraig Obriain Sun COM> writes:
> When attempting to implement the get_bounds method for the AccessibleComponent 
> interface I found myself writing the following code:
> 
>     *x = widget->allocation.x;
>     *y = widget->allocation.y;
>     *width = widget->allocation.width;
>     *height = widget->allocation.height;
> 
> Should I be doing this or should there be a gtk_widget_get_allocation function?
> 

Nope it's normal to do this. So much code relies on it that we can't
ever change widget->allocation anyway.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]