Re: Gtk::Widget::destory() ?
- From: Maik Beckmann <maikbeckmann gmx de>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Gtk::Widget::destory() ?
- Date: Tue, 10 Oct 2006 17:05:46 +0200
Am Dienstag, den 10.10.2006, 15:46 +0200 schrieb Murray Cumming:
> On Fri, 2006-10-06 at 11:28 -0500, Jonathon Jongsma wrote:
> > ...which means that the documentation that Maik brought up at the
> > beginning of this thread should really be changed so that it doesn't
> > mention anything about Gtk::Widget::Destroy() (which doesn't exist)
> > but instead tell people to 'delete' the widget in the normal C++
way.
>
> Fixed.
>
The new Version:
void Gtk::Container::remove (Widget& widget)
Removes widget from container.
widget must be inside container. If widget is managed with
Gtk::manage(), and you don't want to use widget again then you should
delete widget , because there will no longer be any parent container to
delete it automatically.
This is correct, but I think the following is clearer
widget must be inside container. If widget is a pointer to a Widget
allocated on heap by new in combination with Gtk::manage(), there will
no longer be any parent container to delete widget automatically. So if
you don't want to use widget again, then you should apply the delete
opereator to widget after removing it.
regards,
Maik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]