Class JSON::Editor::Gtk::TreeIter
In: lib/json/editor.rb
Parent: Object
StringScanner Parser JSONTreeView MainWindow Gtk::TreeView OptionsMenu EditMenu PopUpMenu FileMenu Gtk::Window Enumerable TreeIter Gtk State lib/json.rb lib/json/editor.rb MenuExtension lib/json/editor.rb Gtk Editor JSON Module: JSON

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

Methods

Included Modules

Enumerable

Public Instance methods

Returns the content of this node.

[Source]

     # File lib/json/editor.rb, line 173
173:       def content
174:         self[CONTENT_COL]
175:       end

Sets the content of this node to value.

[Source]

     # File lib/json/editor.rb, line 178
178:       def content=(value)
179:         self[CONTENT_COL] = value
180:       end

Traverse each of this Gtk::TreeIter instance’s children and yield to them.

[Source]

     # File lib/json/editor.rb, line 139
139:       def each
140:         n_children.times { |i| yield nth_child(i) }
141:       end

Recursively traverse all nodes of this Gtk::TreeIter’s subtree (including self) and yield to them.

[Source]

     # File lib/json/editor.rb, line 145
145:       def recursive_each(&block)
146:         yield self
147:         each do |i|
148:           i.recursive_each(&block)
149:         end
150:       end

Remove the subtree of this Gtk::TreeIter instance from the model model.

[Source]

     # File lib/json/editor.rb, line 154
154:       def remove_subtree(model)
155:         while current = first_child
156:           model.remove(current)
157:         end
158:       end

Returns the type of this node.

[Source]

     # File lib/json/editor.rb, line 161
161:       def type
162:         self[TYPE_COL]
163:       end

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

[Source]

     # File lib/json/editor.rb, line 167
167:       def type=(value)
168:         self[TYPE_COL] = value
169:         self[ICON_COL] = Editor.fetch_icon(value)
170:       end

[Validate]