[gtkmm] Gtk::TableList::remove & Gtk::TableList::erase



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]