[gtkmm] Gtk::TableList::remove & Gtk::TableList::erase
- From: Yueh-Wei Hu <ywhu nmi iii org tw>
- To: gtkmm-list gnome org
- Cc: Murray Cummingmurrayc <murrayc murrayc com>
- Subject: [gtkmm] Gtk::TableList::remove & Gtk::TableList::erase
- Date: Fri, 28 May 2004 23:53:54 +0800
Hi, after digging into gtkmm,
The following may be patched as follows:
=================================================================
void TableList::remove(const_reference child)
{
gtk_container_remove(GTK_CONTAINER(gparent_),
(GtkWidget*)(child.get_widget()->gobj()));
} /* ^^^^^^^^^^^ need
'get_widget()' */
TableList::iterator TableList::erase(iterator position)
{
//Check that it is a valid iterator, to a real item:
if ( !position.node_|| (position == end()) )
return end();
//Get an iterator the the next item, to return:
iterator next = position;
next++;
//Use GTK+ C function to remove it, by providing the GtkWidget*:
gtk_container_remove( GTK_CONTAINER(gparent_),
(GtkWidget*)(position->get_widget()->gobj()) );
/* ^^^^^^^^^^^^^^ need 'get_widget()', too */
return next;
}
=================================================================
Am I correct?
---
Wei
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]