traitsui.value_tree module

Defines tree node classes and editors for various types of values.

class traitsui.value_tree.ArrayNode

Bases: traitsui.value_tree.TupleNode

A tree node for arrays.

format_value(value)

Returns the formatted version of the value.

class traitsui.value_tree.BoolNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for Boolean values.

class traitsui.value_tree.ClassNode

Bases: traitsui.value_tree.ObjectNode

A tree node for classes.

format_value(value)

Returns the formatted version of the value.

class traitsui.value_tree.ComplexNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for complex number values.

class traitsui.value_tree.DictNode

Bases: traitsui.value_tree.TupleNode

A tree node for dictionaries.

format_value(value)

Returns the formatted version of the value.

tno_can_delete(node)

Returns whether the object’s children can be deleted.

tno_get_children(node)

Gets the object’s children.

class traitsui.value_tree.FloatNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for floating point values.

class traitsui.value_tree.FunctionNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for functions

format_value(value)

Returns the formatted version of the value.

class traitsui.value_tree.IntNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for integer values.

class traitsui.value_tree.ListNode

Bases: traitsui.value_tree.TupleNode

A tree node for lists.

format_value(value)

Returns the formatted version of the value.

tno_can_delete(node)

Returns whether the object’s children can be deleted.

tno_can_insert(node)

Returns whether the object’s children can be inserted (vs. appended).

class traitsui.value_tree.MethodNode

Bases: traitsui.value_tree.MultiValueTreeNodeObject

format_value(value)

Returns the formatted version of the value.

tno_get_children(node)

Gets the object’s children.

tno_has_children(node)

Returns whether the object has children.

class traitsui.value_tree.MultiValueTreeNodeObject

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for objects of types that have multiple values.

tno_allows_children(node)

Returns whether this object can have children (True for this class).

tno_has_children(node)

Returns whether the object has children (True for this class).

class traitsui.value_tree.NoneNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for None values.

class traitsui.value_tree.ObjectNode

Bases: traitsui.value_tree.MultiValueTreeNodeObject

A tree node for objects.

format_value(value)

Returns the formatted version of the value.

tno_get_children(node)

Gets the object’s children.

tno_has_children(node)

Returns whether the object has children.

class traitsui.value_tree.OtherNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for single-value types for which there is not another node type.

class traitsui.value_tree.RootNode

Bases: traitsui.value_tree.MultiValueTreeNodeObject

A root node.

format_value(value)

Returns the formatted version of the value.

tno_get_children(node)

Gets the object’s children.

class traitsui.value_tree.SetNode

Bases: traitsui.value_tree.ListNode

A tree node for sets.

format_value(value)

Returns the formatted version of the value.

class traitsui.value_tree.SingleValueTreeNodeObject

Bases: traitsui.tree_node.TreeNodeObject

A tree node for objects of types that have a single value.

format_value(value)

Returns the formatted version of the value.

label = Str()

User-specified override of the default label

name = Str()

Name of the value

node_for(name, value)

Returns the correct node type for a specified value.

parent = Instance(TreeNodeObject)

The parent of this node

readonly = Bool(False)

Is the value readonly?

tno_allows_children(node)

Returns whether this object can have children (False for this class).

tno_can_copy(node)

Returns whether the object’s children can be copied (True for this class).

tno_can_delete(node)

Returns whether the object’s children can be deleted (False for this class).

tno_can_insert(node)

Returns whether the object’s children can be inserted (False, meaning children are appended, for this class).

tno_can_rename(node)

Returns whether the object’s children can be renamed (False for this class).

tno_get_icon(node, is_expanded)

Returns the icon for a specified object.

tno_get_label(node)

Gets the label to display for a specified object.

tno_has_children(node)

Returns whether the object has children (False for this class).

tno_set_label(node, label)

Sets the label for a specified object.

value = Any()

The value itself

class traitsui.value_tree.StringNode

Bases: traitsui.value_tree.SingleValueTreeNodeObject

A tree node for strings.

format_value(value)

Returns the formatted version of the value.

class traitsui.value_tree.TraitsNode

Bases: traitsui.value_tree.ObjectNode

A tree node for traits.

tno_get_children(node)

Gets the object’s children.

tno_has_children(node)

Returns whether the object has children.

tno_when_children_changed(node, listener, remove)

Sets up or removes a listener for children being changed on a specified object.

tno_when_children_replaced(node, listener, remove)

Sets up or removes a listener for children being replaced on a specified object.

class traitsui.value_tree.TupleNode

Bases: traitsui.value_tree.MultiValueTreeNodeObject

A tree node for tuples.

format_value(value)

Returns the formatted version of the value.

tno_get_children(node)

Gets the object’s children.

tno_has_children(node)

Returns whether the object has children, based on the length of the tuple.

traitsui.value_tree.basic_types()