Logo Search packages:      
Sourcecode: pan version File versions

GtkTreePath * PanTreeStore::get_path ( const Row row  )  const

Build a GtkTreePath corresponding to the Row

Definition at line 296 of file pan-tree.cc.

References PanTreeStore::Row::child_index, PanTreeStore::Row::parent, and root.

{
  g_return_val_if_fail (row, false);

  std::vector<int> indices;
  while (row && row!=root) {
    indices.push_back (row->child_index);
    row = row->parent;
  }

  GtkTreePath * path = gtk_tree_path_new ();
  for (std::vector<int>::const_reverse_iterator it(indices.rbegin()), end(indices.rend()); it!=end; ++it)
    gtk_tree_path_append_index (path, *it);

  return path;
}


Generated by  Doxygen 1.6.0   Back to index