Lines Matching refs:iter
48 GtkTreeRowReference *tree_iter_to_ref (SPXMLViewTree * tree, GtkTreeIter* iter);
49 static gboolean tree_ref_to_iter (SPXMLViewTree * tree, GtkTreeIter* iter, GtkTreeRowReference *ref);
51 gboolean search_equal_func (GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer search_data);
52 gboolean foreach_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data);
54 void on_row_changed(GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data);
186 GtkTreeIter iter;
187 gtk_tree_store_insert_before (tree->store, &iter, parent, before);
189 if (!gtk_tree_store_iter_is_valid(tree->store, &iter)) {
193 GtkTreeRowReference *rowref = tree_iter_to_ref (tree, &iter);
194 data = node_data_new (tree, &iter, rowref, repr);
197 gtk_tree_store_set (tree->store, &iter, STORE_TEXT_COL, default_text, STORE_DATA_COL, data, STORE_REPR_COL, repr, -1);
270 GtkTreeIter iter;
271 if (tree_ref_to_iter(data->tree, &iter, data->rowref)) {
272 gtk_tree_store_set (GTK_TREE_STORE(data->tree->store), &iter, STORE_TEXT_COL, label, -1);
283 GtkTreeIter iter;
284 if (repr_to_child (data, child, &iter)) {
285 gtk_tree_store_remove (GTK_TREE_STORE(data->tree->store), &iter);
314 GtkTreeIter iter;
315 if (tree_ref_to_iter(data->tree, &iter, data->rowref)) {
316 gtk_tree_store_set (GTK_TREE_STORE(data->tree->store), &iter, STORE_TEXT_COL, label, -1);
329 GtkTreeIter iter;
330 if (tree_ref_to_iter(data->tree, &iter, data->rowref)) {
331 gtk_tree_store_set (GTK_TREE_STORE(data->tree->store), &iter, STORE_TEXT_COL, label, -1);
343 GtkTreeIter iter;
344 if (tree_ref_to_iter(data->tree, &iter, data->rowref)) {
345 gtk_tree_store_set (GTK_TREE_STORE(data->tree->store), &iter, STORE_TEXT_COL, label, -1);
367 GtkTreeIter iter;
369 if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
375 if (gtk_tree_model_iter_parent(model, &parent_iter, &iter)) {
387 void on_row_changed(GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data)
396 Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(tree_model, iter);
398 if (!gtk_tree_model_iter_parent(tree_model, &new_parent, iter)) {
418 // Find the sibling node before iter
424 while (valid && tree_model_iter_compare (tree_model, &tmp_iter, iter)) {
451 gtk_tree_selection_select_iter(selection, iter);
458 * Set iter to ref or node data's child with the same repr or first child
460 gboolean ref_to_sibling (NodeData *data, Inkscape::XML::Node *repr, GtkTreeIter *iter)
463 if (!repr_to_child (data, repr, iter)) {
466 gtk_tree_model_iter_next (GTK_TREE_MODEL(data->tree->store), iter);
472 gtk_tree_model_iter_children(GTK_TREE_MODEL(data->tree->store), iter, &data_iter);
478 * Set iter to the node data's child with the same repr
480 gboolean repr_to_child (NodeData *data, Inkscape::XML::Node * repr, GtkTreeIter *iter)
496 valid = gtk_tree_model_iter_nth_child (model, iter, &data_iter, n_children-1);
497 if (valid && sp_xmlview_tree_node_get_repr (model, iter) == repr) {
503 valid = gtk_tree_model_iter_children(model, iter, &data_iter);
504 while (valid && sp_xmlview_tree_node_get_repr (model, iter) != repr) {
505 valid = gtk_tree_model_iter_next(model, iter);
514 GtkTreeRowReference *tree_iter_to_ref (SPXMLViewTree * tree, GtkTreeIter* iter)
516 GtkTreePath* path = gtk_tree_model_get_path(GTK_TREE_MODEL(tree->store), iter);
526 gboolean tree_ref_to_iter (SPXMLViewTree * tree, GtkTreeIter* iter, GtkTreeRowReference *ref)
532 gtk_tree_model_get_iter(GTK_TREE_MODEL(tree->store), iter, path);
534 return gtk_tree_store_iter_is_valid(GTK_TREE_STORE(tree->store), iter);
570 GtkTreeIter iter;
571 gtk_tree_model_get_iter(GTK_TREE_MODEL(tree->store), &iter, path);
572 if (sp_xmlview_tree_node_get_repr (GTK_TREE_MODEL(tree->store), &iter)->type() != Inkscape::XML::ELEMENT_NODE) {
635 sp_xmlview_tree_node_get_repr (GtkTreeModel *model, GtkTreeIter * iter)
638 gtk_tree_model_get (model, iter, STORE_REPR_COL, &repr, -1);
648 sp_xmlview_tree_get_repr_node (SPXMLViewTree * tree, Inkscape::XML::Node * repr, GtkTreeIter *iter)
652 * if found we can return the iter
661 tree_ref_to_iter(tree, iter, anode.rowref);
668 gboolean foreach_func(GtkTreeModel *model, GtkTreePath * /*path*/, GtkTreeIter *iter, gpointer user_data)
672 gtk_tree_model_get (model, iter, STORE_REPR_COL, &iter_repr, -1);
674 GtkTreeRowReference *rowref = tree_iter_to_ref (anode->tree, iter);
686 gboolean search_equal_func(GtkTreeModel *model, gint /*column*/, const gchar *key, GtkTreeIter *iter, gpointer /*search_data*/)
689 gtk_tree_model_get(model, iter, STORE_TEXT_COL, &text, -1);