Re: what should go into realize for a GtkDrawingArea?

On Thu, 25 Nov 2004 10:59:37 -0600, brian <bmcandrews gmail com> 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).



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