Class | Gtk::TreeIter |
In: |
lib/json/editor.rb
|
Parent: | Object |
The Gtk::TreeIter class is reopened and some auxiliary methods are added.
Traverse each of this Gtk::TreeIter instance‘s children and yield to them.
# File lib/json/editor.rb, line 161 161: def each 162: n_children.times { |i| yield nth_child(i) } 163: end
Recursively traverse all nodes of this Gtk::TreeIter‘s subtree (including self) and yield to them.
# File lib/json/editor.rb, line 167 167: def recursive_each(&block) 168: yield self 169: each do |i| 170: i.recursive_each(&block) 171: end 172: end
Remove the subtree of this Gtk::TreeIter instance from the model model.
# File lib/json/editor.rb, line 176 176: def remove_subtree(model) 177: while current = first_child 178: model.remove(current) 179: end 180: end