traitsui.value_tree module

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

class traitsui.value_tree.ArrayNode[source]

Bases: TupleNode

A tree node for arrays.

format_value(value)[source]

Returns the formatted version of the value.

class traitsui.value_tree.BoolNode[source]

Bases: SingleValueTreeNodeObject

A tree node for Boolean values.

class traitsui.value_tree.ClassNode[source]

Bases: ObjectNode

A tree node for classes.

format_value(value)[source]

Returns the formatted version of the value.

class traitsui.value_tree.ComplexNode[source]

Bases: SingleValueTreeNodeObject

A tree node for complex number values.

class traitsui.value_tree.DictNode[source]

Bases: TupleNode

A tree node for dictionaries.

format_value(value)[source]

Returns the formatted version of the value.

tno_can_delete(node)[source]

Returns whether the object’s children can be deleted.

tno_get_children(node)[source]

Gets the object’s children.

class traitsui.value_tree.FloatNode[source]

Bases: SingleValueTreeNodeObject

A tree node for floating point values.

class traitsui.value_tree.FunctionNode[source]

Bases: SingleValueTreeNodeObject

A tree node for functions

format_value(value)[source]

Returns the formatted version of the value.

class traitsui.value_tree.IntNode[source]

Bases: SingleValueTreeNodeObject

A tree node for integer values.

class traitsui.value_tree.ListNode[source]

Bases: TupleNode

A tree node for lists.

format_value(value)[source]

Returns the formatted version of the value.

tno_can_delete(node)[source]

Returns whether the object’s children can be deleted.

tno_can_insert(node)[source]

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

class traitsui.value_tree.MethodNode[source]

Bases: MultiValueTreeNodeObject

format_value(value)[source]

Returns the formatted version of the value.

tno_get_children(node)[source]

Gets the object’s children.

tno_has_children(node)[source]

Returns whether the object has children.

class traitsui.value_tree.MultiValueTreeNodeObject[source]

Bases: SingleValueTreeNodeObject

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

tno_allows_children(node)[source]

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

tno_has_children(node)[source]

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

class traitsui.value_tree.NoneNode[source]

Bases: SingleValueTreeNodeObject

A tree node for None values.

class traitsui.value_tree.ObjectNode[source]

Bases: MultiValueTreeNodeObject

A tree node for objects.

format_value(value)[source]

Returns the formatted version of the value.

tno_get_children(node)[source]

Gets the object’s children.

tno_has_children(node)[source]

Returns whether the object has children.

class traitsui.value_tree.OtherNode[source]

Bases: SingleValueTreeNodeObject

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

class traitsui.value_tree.RootNode[source]

Bases: MultiValueTreeNodeObject

A root node.

format_value(value)[source]

Returns the formatted version of the value.

tno_get_children(node)[source]

Gets the object’s children.

class traitsui.value_tree.SetNode[source]

Bases: ListNode

A tree node for sets.

format_value(value)[source]

Returns the formatted version of the value.

class traitsui.value_tree.SingleValueTreeNodeObject[source]

Bases: TreeNodeObject

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

format_value(value)[source]

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)[source]

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)[source]

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

tno_can_copy(node)[source]

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

tno_can_delete(node)[source]

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

tno_can_insert(node)[source]

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

tno_can_rename(node)[source]

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

tno_get_icon(node, is_expanded)[source]

Returns the icon for a specified object.

tno_get_label(node)[source]

Gets the label to display for a specified object.

tno_has_children(node)[source]

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

tno_set_label(node, label)[source]

Sets the label for a specified object.

value = Any()

The value itself

class traitsui.value_tree.StringNode[source]

Bases: SingleValueTreeNodeObject

A tree node for strings.

format_value(value)[source]

Returns the formatted version of the value.

class traitsui.value_tree.TraitsNode[source]

Bases: ObjectNode

A tree node for traits.

tno_get_children(node)[source]

Gets the object’s children.

tno_has_children(node)[source]

Returns whether the object has children.

tno_when_children_changed(node, listener, remove)[source]

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

tno_when_children_replaced(node, listener, remove)[source]

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

class traitsui.value_tree.TupleNode[source]

Bases: MultiValueTreeNodeObject

A tree node for tuples.

format_value(value)[source]

Returns the formatted version of the value.

tno_get_children(node)[source]

Gets the object’s children.

tno_has_children(node)[source]

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

traitsui.value_tree.basic_types()[source]