I think the function you're looking for is Gtk::TreeModel::children()
TreeStore and ListStore both implement this method. The following is a
recusive method to visit all rows in a TreeStore. The linear
ListStore should be a simple case to extract.
Assume _store is a Glib::RefPtr< Gtk::TreeStore > type member variable
of Foo.
void
Foo::go()
{
traverse( _store->children() ) ;
}
void
Foo::traverse( Gtk::TreeModel::Children children )
{
if( children.empty() )
{
return ;
}
Gtk::TreeModel::Children::iterator iter ;
for( iter = children.begin() ; iter != children.end() ; iter++ )
{
traverse( (*iter)->children() ) ;
}
}