Re: GtkStyle

Havoc Pennington <> writes: 
> Any thoughts on GdkGC? I'm done with all the other types in the
> gdk-object CVS branch. 

OK I went ahead and did this as follows:
 - the type "GdkGC" is pure virtual
 - gdk_gc_new () returns the result of create_gc() from the drawable;
   cross-platform GDK has no idea what the most-derived type of this 
   GC is
 - in GDK/X11, there's a GdkWindowingGC that's returned for X11 

The only disadvantage here is, you can't override the virtual methods
from the window-system-specific GC type. You can only override GC
methods from the pure virtual type.

This disadvantage isn't huge since you could always have a
window-system GC as a member variable of your custom GC derived from
the abstract GdkGC interface, which would allow you to do the same

Clipping still needs to be virtualized, but I'm ignoring that for now.


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