Re: [gtkmm] Gtk::Container::remove and a question
- From: Robin <robin bourianes free fr>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] Gtk::Container::remove and a question
- Date: Mon, 18 Oct 2004 20:55:40 +0200
Ok, ok, thank you very much for your answers :)
Note that I only "fixed" Gtk::remove() in gtkmm 2.4. Previously, you
needed to call reference() to work around the bug. You seem to have
started to think of the bug as a feature.
Haha, sorry for that, but it's ok now you've explained this to me.
I was thinking differently and as I'm beginning with gtkmm I was asking
myself a lot of newbie questions ;)
My other question is more a c++ related question but I can't figure
it out ...
In fact, the example of custom container found in the gtkmm
tutorial
(http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch21.html#id2749211)
doesn't compile on my box. It fails with this :
/usr/include/gtkmm-2.4/gtkmm/widget.h: In member function « virtual
void MyContainer::set_child_widgets(Gtk::Widget&, Gtk::Widget&) »:
/usr/include/gtkmm-2.4/gtkmm/widget.h:2434: error: `void
Gtk::Widget::set_parent(Gtk::Widget&)' is protected
mycontainer.cc:20: error: within this context
[snip]
1. This is a very new example. I uploaded it a week or so ago.
2. You are looking at the gtkmm 2.5 version, though that's not clear. Look
at the example source in your gtkmm 2.4 tarball [1] for a version
with workarounds for gtkmm 2.4.
Note that most people never need to write a custom container from
scratch. It's almost always enough to derive from an existing
container.
[1] Or here, if I haven't released that yet:
http://cvs.gnome.org/viewcvs/gtkmm/examples/book/custom/custom_container/mycontainer.cc?rev=1.1.2.2&only_with_tag=gtkmm-2-4&view=markup
Murray Cumming murrayc murrayc com www.murrayc.com www.openismus.com
Ok, thanks for the code, that's what I'm doing as I know Gtk+. I was
just worried not to be able to use gtkmm only :)
If you want to have a look at our project, here are a few links :
- the homepage (french only for the moment sorry :))
http://perso.wanadoo.fr/kitone/sabrina/site/
- and the gna! webpage with the cvs stuff ...
https://gna.org/projects/sabrina3d/
In fact the original project was written with c++ but was using gtk+.
That was a bit dirty with the callbacks, so we decided to rework it to
use gtkmm (and sigc++) ... and it's actually work in progress.
The custom container was needed because we had troubles with gtkglext
and the gtk_widget_reparent function. We needed a widget like a
Gtk::Paned but allowing us to add more than 2 widgets. I don't know if
that's always true, but even if it's not needed, that's a good training
to gtkmm.
The links on the homepage are the old version (the one using gtk+).
The gna! cvs contains the latest gtkmm version but nothing can be done
with it, we started a week ago to port it to gtkmm.
Thank you and thanks for your work too.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]