[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: How I can add some properties to object without touching it
- From: Maciej Piechotka <uzytkownik2 gmail com>
- To: PrzemysÅaw Staniszewski <ihi marzyciel wp pl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How I can add some properties to object without touching it
- Date: Tue, 20 Dec 2005 15:02:38 +0100
05-12-20, PrzemysÅaw Staniszewski <ihi marzyciel wp pl> napisaÅ(a):
> Hello.
>
> I wonder about something like in topic. I have dia-canvas-box.c, but I
> want to add one more properties like gchar *name. I want to make gobject
> child of dia-canvas-box but i don't know how :( . My konwledge is poor
> so i was copy first file, replace such string (like box) into another
> (like box_tex) and add gchar *name into header, of course some functions
> to set and get this property. But what is the correct way to make that work?
>
> Something happy here: :)
> (...)
1. First of all propably you shouldn't overload all methods but get it
from parent class(DiaCanvasBox here).
2. Sources of gnome library - may be it's there(Try to create
GtkColorButton and change some GtkButton property).
3. If it doesn't have to be a property simply add child class and
...get/set_name functions.
Regards
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]