Re: Custom (Composed) Widget



Razvan Gavril wrote:
[...]
The Question :
What property/method of the GtkWidget should i rewrite to do this,

You should derive from a GtkWidget that does almost everything you
need it to do already and only override methods where you want the
behaviour of the widget to be different (and remember you can always
chain up to the parent implementation when you want only to extend
the parent class's functionality).

Then you can go ahead and extend this class with new methods that
apply only to your own widget.

having in mind that i already have a property in my class (view) that represents the view of my object.

I'd assume that property would just disapear seeing as the object "is"
the view.

> Where can i find a tutorial on custom gtk widgets ?

Custom widgets are pretty much anarchy afaics, but you could easily
check out some GTK+ sources that do similar stuff, composite widgets
such as GtkMessageDialog (or all the dialogs for that matter are a
good start).

Cheers,
                                  -Tristan



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