[gtkmm] iterating through the contents of a tree



I've searched the archives and the web and the gktmm class lists, but can't find out how to do this.

I have a Gtk::TreeView with a Gtk::TreeStore, basically following the tree view example from the gtkmm pages. My Gtk::TreeModel::ColumnRecord contains two strings (one hidden). I can multi select entries on the tree.

Now I want to iterate through all the entries selected in my tree when a button is pressed, ie something like:

for (Gtk::TreeIter it=m_refTreeModel.begin(); it<m_refTreeModel.end(); ++it) {
   string str = m_Colmuns[it].m_string_name;
}

Can this be done? surely it can, though I can't work out how. More details can be supplied ...




bevis





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]