pyface.tree.node_tree_model module¶
The model for a tree control with extensible node types.
- class pyface.tree.node_tree_model.NodeTreeModel[source]¶
Bases:
TreeModel
The model for a tree control with extensible node types.
- has_children(node)[source]¶
Returns True if a node has children, otherwise False.
This method is provided in case the model has an efficient way to determine whether or not a node has any children without having to actually get the children themselves.
- get_drag_value(node)[source]¶
Get the value that is dragged for a node.
By default the drag value is the node itself.
- get_image(node, selected, expanded)[source]¶
Returns the label image for a node.
Return None (the default) if no image is required.
- get_selection_value(node)[source]¶
Get the value that is used when a node is selected.
By default the selection value is the node itself.
- get_text(node)[source]¶
Returns the label text for a node.
Return None if no text is required. By default we return ‘str(node)’.
- is_editable(node)[source]¶
Returns True if the node is editable, otherwise False.
If the node is editable, its text can be set via the UI.
Returns the context menu for a node.