RE: [gtkmm] why is Gtk::Widget::set_parent protected ?



> -----Original Message-----
> From: Detlef Reichl [mailto:detlef reichl arcor de] 

> > Why not just use add() or pack_start() or attach(), 
> depending on the 
> > base class of your container class?
> 
> caus i want to subclass Gtk::Container directly.

That will be interesting. I have never done that.

> Let me explain: I want to make a special color selector with 
> some rows and some columns of buttons, each representing one 
> color. This container shall consider changes of the 
> orientation (like the toolbar) and then reorder the buttons. 
> Sure it is also possible with i.e. the table but that will 
> get very ugly.
> 
> Cheers
> det
> 
> ps: why is Gtk::Widget::set_parent protected ? :) serious, i 
> want to understand the reason for this. thanks.

Probably just because we had read that it should be used only for container
implementation and we had not thought that it must actually be called on the
container widgets instead of the widgets themselves. You could try patching
gtkmm 2.4 to change this and see if it helps - please at least submit a bug.

In the meantime, you can use the C API with gobj() as a workaround.

Murray Cumming
murrayc usa net
www.murrayc.com 



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