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().

auto children = refModel->children();
for (auto iter = children.begin(), end = children.end(); iter != end; ++iter)
{
  auto row = *iter;
  //Do something with the row - see above for set/get.
}

If you always want to iterate across the entire range, much more succinct syntax is possible using C++'s range-based for loop:

for (auto row: refModel->children())
{
  //Do something with the row - see above for set/get.
}

10.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();