Parent

Included Modules

Files

JSON::Editor::Gtk::TreeIter

The Gtk::TreeIter class is reopened and some auxiliary methods are added.

Public Instance Methods

content() click to toggle source

Returns the content of this node.

     # File lib/json/editor.rb, line 195
195:       def content
196:         self[CONTENT_COL]
197:       end
content=(value) click to toggle source

Sets the content of this node to value.

     # File lib/json/editor.rb, line 200
200:       def content=(value)
201:         self[CONTENT_COL] = value
202:       end
each() click to toggle source

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
recursive_each(&block) click to toggle source

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_subtree(model) click to toggle source

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
type() click to toggle source

Returns the type of this node.

     # File lib/json/editor.rb, line 183
183:       def type
184:         self[TYPE_COL]
185:       end
type=(value) click to toggle source

Sets the type of this node to value. This implies setting the respective icon accordingly.

     # File lib/json/editor.rb, line 189
189:       def type=(value)
190:         self[TYPE_COL] = value
191:         self[ICON_COL] = Editor.fetch_icon(value)
192:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.