[java-gnome-hackers] Constructors for Canvas Items
Brought to you by:
afcowie
From: Philip A. C. <pc...@td...> - 2002-09-21 03:39:11
|
Everyone, Gnome canvas items are a little unique. There is a single constructor function that takes a parameter list with a variable number of parameters: GnomeCanvasItem * gnome_canvas_item_new(GnomeCanvasGroup * parent, GtkType type, const gchar * first_arg_name, ...); How many and what types of parameters are sent after first_arg_name depend on what subtype of CanvasItem you are creating. To begin with, I started with CanvasRE and its subclasses CanvasEllipse and CanvasRect.=20 I have implemented 4 custom C functions in org_gnu_gnome_CanvasRE.c which wrap the C constructor function mentioned above. Each of the subclasses have 4 constructors. I think that this approach will work, but I am not sure that it is the best way or that I have done it 100% correctly. I would appreciate any input you may have on the code in the java classes or the C source. --=20 Philip A. Chapman |