Class: JSONTreeView

Class | JSONTreeView
In: | lib/json/editor.rb
Parent: | Gtk::TreeView

This class inherits from Gtk::TreeView, to configure it and to add a lot of behaviour to it.

### Methods

ask_for_element ask_for_find_term ask_for_hash_pair ask_for_order create_node expand_collapse new

### Included Modules

Gtk

### Attributes

expanded | [RW] | Returns true, if nodes are autoexpanding, false otherwise.
window | [R] | Returns the MainWindow instance of this JSONTreeView.

### Public Class methods

new(window)

Creates a JSONTreeView instance, the parameter window is a MainWindow instance and used for self delegation.

### Public Instance methods

ask_for_element(parent = nil, default_type = nil, value_text = @content)

Ask for an element to be appended parent.

ask_for_find_term(search = nil)

Ask for a find term to search for in the tree. Returns the term as a string.

ask_for_hash_pair(parent)

Ask for a hash key, value pair to be added to the Hash node parent.

ask_for_order()

Ask for an order criteria for sorting, using x for the element in question. Returns the order criterium, and true/false for reverse sorting.

create_node(parent, type, content)

Create a type node with content content, and add it to parent in the model. If parent is nil, create a new model and put it into the editor treeview.

expand_collapse(iter)

Expand or collapse row pointed to by iter according to the expanded attribute.

[Validate]