On 7/9/06, Laurent Julliard <laurent@...> wrote:
> I looked at the GTK VButtonBOx and HButtonBox classes today and I have a
> few question. In rbgtkvbbox.c for instance there is an 'initialize'
> method to create a new object but I don't see that Gtk::VButtonBox is
> declared as a subclass of Gtk::ButtonBox. Why is that?
Inheritance is set up through reflection. Look for yourself with for example:
=> [Gtk::VButtonBox, Gtk::ButtonBox, Gtk::Box, Gtk::Container,
Gtk::Widget, Atk::Implementor, GLib::Interface, GLib::MetaInterface,
Gtk::Object, #<Class:0xb7a65354>, GLib::Object, GLib::Instantiatable,
The documentation is also telling that:
> And just for my understanding I noticed that in rbgtkbbox.c there is a
> number of methods not implemented (actaully only the set_secondary_child
> is). Are the other methods elsewhere or shall I assume that they still
> have to be implemented in which case I'd happy to contribute the code.
In GTK, objects have properties. Probably for making life of users
easier, GTK defines functions which actually are setters and getters
for properties which could also be set/get with the generic property
accessing functions. In ruby-gnome2, the binding automatically creates
the setters and getters methods by enumerating the properties at
startup, thus explicitely binding the setters and getters is not
irb(main):015:0> w = Gtk::VButtonBox.new
=> #<Gtk::VButtonBox:0xb704a9f4 ptr=0x8293cc8>
=> #<Gtk::ButtonBox::Style default-style>
Guillaume Cottenceau - http://zarb.org/~gc/