Iterar sobre las filas del modelo

Gtk::TreeModel proporciona un contenedor de sus hijos al estilo de las bibliotecas C++ estándar, a través del método children(). Puede usar los incrementos del iterador familiares de los métodos begin() y end().

typedef Gtk::TreeModel::Children type_children; //minimise code length.
type_children children = refModel->children();
for(type_children::iterator iter = children.begin();
    iter != children.end(); ++iter)
{
  Gtk::TreeModel::Row row = *iter;
  //Do something with the row - see above for set/get.
}

9.3.1. Fila hija

When using a Gtk::TreeStore, the rows can have child rows, which can have their own children in turn. Use Gtk::TreeModel::Row::children() to get the container of child Rows:

Gtk::TreeModel::Children children = row.children();