Re: Properties, what are they for? Wigets writing doubts.
- From: Alexandre <alpebu yahoo com br>
- To: gtk-app-devel-list gnome org
- Subject: Re: Properties, what are they for? Wigets writing doubts.
- Date: Thu, 14 Sep 2006 20:55:39 -0300 (ART)
Yes, it's realy the way round... I've seen that..
So, if it's only for glade, and OO, I think that if I won't use glade, and the widget won't be a parent for
other widgets, thay don't need properties..
Thanks.
Paul Pogonyshev <pogonyshev gmx net> escreveu: Alexandre wrote:
I'm beginning in widget's writing, and I want to know what is the purpose of the
widgets properties. Because, when I look at the gtk widgets, they have a lot of
properties, but this properties can be changed with the gtk_name_set.. functions
too.. Like the frame, is has a "label" property to change it's label, but it can
be done with the gtk_frame_set_label (or anything like it), so, why use properties?
They are mostly for bindings and automated builders (Glade) use. If you never use
them, don't define them. I think it is pointless to write lots of code you never
use just for `completeness'. On the other hand, properties can be quite useful. If
you use standard ones, you should probably define properties in your own widgets too.
(Somebody suggested here that accesor methods are just wrappers over properties.
If you look in the sourcecode, you can find that it is actually the way round,
property get/set functions use accesory methods...)
One other thing, I've readed that if I want to make a widget with a child, this
has to be a container (GtkContainer), so, I have a widget, it's a x-y plotting
widget, and I have other widget, a scale. I want that the plotting wigdget has
two childs (2 scale widgets) to be it's x and y axis. So, it's better if the
plotting widgets has a GtkContainer as parent? Or other widget else?
I don't really understand this question...
Paul
---------------------------------
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento?
Experimente o Yahoo! Respostas!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]