Re: what should go into realize for a GtkDrawingArea?

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

 



On Thu, 25 Nov 2004 10:59:37 -0600, brian <bmcandrews@xxxxxxxxx> wrote:
>  > After realization, a drawing area will have a widget->window available for
> > drawing, it is also inconcievable that you recieve any "events" before
> > realization, since events come from the GdkWindow created in realize.
> 
> that being said.  When I'm subclassing from a GtkWidget that uses a
> GtkDrawingArea, where will the GtkDrawing area get it's GdkWindow
> from?

When subclassing a GtkWidget that *is* a GtkDrawingArea or when subclassing
a GtkWidget that *parents* a GtkDrawingArea ?

GtkDrawingAreaClass has its own implementation of realize, after it has been
realized, the GdkWindow *does* exist.

  - If you are writing a widget that *is* a GtkDrawingArea, you dont
need to override
    the realize vfunc to get a GdkWindow

  - If you are writing a composite widget that parents a
GtkDrawingArea, just make
    sure you get the parenting stuff straight. (I.e. you need to implement the
    GtkContainer interface properly so that when your widget gets realized, that
    realization gets properly propagated to your children).

HTH...

Cheers,
                                                                 -Tristan
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux