Class Gtk::TreeIter
In: lib/json/editor.rb
Parent: Object

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 195
      def content
        self[CONTENT_COL]
      end

Sets the content of this node to value.

[Source]

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

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

[Source]

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

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

[Source]

# File lib/json/editor.rb, line 167
      def recursive_each(&block)
        yield self
        each do |i|
          i.recursive_each(&block)
        end
      end

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

[Source]

# File lib/json/editor.rb, line 176
      def remove_subtree(model)
        while current = first_child
          model.remove(current)
        end
      end

Returns the type of this node.

[Source]

# File lib/json/editor.rb, line 183
      def type
        self[TYPE_COL]
      end

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

[Source]

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

[Validate]