Re: How access pixmap info like width&height? (1st arg of configure/expose callback nice...)



I did some experimentation and printed out
the "drawingarea" pointer that pixmap rests on.
This first argument turned out to be
the same address as the drawingarea rather
than the pixmap.

I wrote some code that assumed this was true
and it worked.  Are you sure pixmap is the first arg?
Maybe it is in some situations but not others?

Chris



On Thu, Feb 21, 2002 at 06:29:44AM -0500, Paul Davis wrote:
> >Configure and Expose events will use a callback with
> >the first argument being a widget that has nice
> >info about pixmap to be redrawn like width, height,
> >style & "window".
> >
> >How can I access this widget on my own???
> >Or, how can I get at this
> >info for a pixmap some other way???  
> 
> its the widget that *is* the pixmap. that is, if you did:
> 
>     GtkWidget *pixmap = gtk_pixmap_new (...);
> 
> and then connected to configure_event and expose_event on that pixmap,
> the widget passed as the first argument is precisely that widget. 
> 
> you can use it yourself anywhere else, except that its allocation
> (width, height), style and window may not be set until certain events
> have occured.
> 
> --p

-- 
=======================================================
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363       || (619) 553-2836  (fax)    |
| 53560 HULL ST           ||                          |
| SAN DIEGO CA 92152-5001 || seberino spawar navy mil |
=======================================================



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