Gda.Tree¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
  | 
|
  | 
|
  | 
|
  | 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r  | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Gets emitted when a node has changed in tree  | 
|
Gets emitted when a node has been removed from tree  | 
|
Gets emitted when a node has has a child when it did not have any or when it does not have a ny children anymore when it had some  | 
|
Gets emitted when a node has been inserted in tree  | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
object  | 
r  | 
Class Details¶
- class Gda.Tree(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- add_manager(manager)¶
 - Parameters:
 manager (
Gda.TreeManager) – aGda.TreeManagerobject
Sets manager as a top
Gda.TreeManagerobject, which will be responsible for creating top level nodes in self.New in version 4.2.
- clean()¶
 Removes any node in self
New in version 4.2.
- dump(node, stream)¶
 - Parameters:
 node (
Gda.TreeNodeorNone) – aGda.TreeNodeto start the dump from, orNonefor a full dumpstream (
objectorNone) – a stream to send the dump to, orNonefor STDOUT
Dumps the contents of self to stream, using a hierarchical view.
New in version 4.2.
- get_node(tree_path, use_names)¶
 - Parameters:
 - Returns:
 the requested
Gda.TreeNodepointer, orNoneif not found- Return type:
 Gda.TreeNodeorNone
Locates a
Gda.TreeNodeusing the tree_path path.New in version 4.2.
- get_node_manager(node)¶
 - Parameters:
 node (
Gda.TreeNode) – aGda.TreeNodepresent in self- Returns:
 the
Gda.TreeManager, orNoneif node is not present in self- Return type:
 
Get the
Gda.TreeManagerwhich created node in selfNew in version 4.2.
- get_node_path(node)¶
 - Parameters:
 node (
Gda.TreeNode) – aGda.TreeNodenode in self- Returns:
 a new string, or
Noneif node is not in self- Return type:
 
Get the path associated to node in self.
New in version 4.2.
- get_nodes_in_path(tree_path, use_names)¶
 - Parameters:
 tree_path (
strorNone) – full path to the required nodes (if use_names isTrue, then it must start with ‘/’), orNoneuse_names (
bool) – ifTrue, then tree_path will be interpreted as a unix style path, and ifFalse, then tree_path will be interpreted similarly to the #GtkTreePath’s string representation.
- Returns:
 a new list of
Gda.TreeNodepointers, free it with g_slist_free()- Return type:
 
The returned list is a list of all the
Gda.TreeNodenodes below the node at the specified path.As a corner case if tree_path is
None, then the returned list contains all the top level nodes.New in version 4.2.
- set_attribute(attribute, value, destroy)¶
 - Parameters:
 attribute (
str) – attribute namevalue (
GObject.Value) – aGObject.Value, orNonedestroy (
GLib.DestroyNotify) – a function to be called when attribute is not needed anymore, orNone
Sets an attribute to self, which will be accessible to any node in it.
New in version 4.2.
- update_all()¶
 - Raises:
 - Returns:
 Trueif no error occurred.- Return type:
 
Requests that self be populated with nodes. If an error occurs, then self's contents is left unchanged, and otherwise self's previous contents is completely replaced by the new one.
New in version 4.2.
- update_children(node)¶
 - Parameters:
 node (
Gda.TreeNodeorNone) – aGda.TreeNodenode in self, orNone- Raises:
 - Returns:
 Trueif no error occurred.- Return type:
 
Update the children of node in self (not recursively, to update recursively, use
Gda.Tree.update_part()). If node isNonethen the top level nodes are updated.New in version 4.2.8.
- update_part(node)¶
 - Parameters:
 node (
Gda.TreeNode) – aGda.TreeNodenode in self- Raises:
 - Returns:
 Trueif no error occurred.- Return type:
 
Requests that self be populated with nodes, starting from node
New in version 4.2.
- do_node_changed(node) virtual¶
 - Parameters:
 node (
Gda.TreeNode) –
- do_node_has_child_toggled(node) virtual¶
 - Parameters:
 node (
Gda.TreeNode) –
- do_node_inserted(node) virtual¶
 - Parameters:
 node (
Gda.TreeNode) –
Signal Details¶
- Gda.Tree.signals.node_changed(tree, node)¶
 - Signal Name:
 node-changed- Flags:
 - Parameters:
 tree (
Gda.Tree) – The object which received the signalnode (
Gda.TreeNode) – theGda.TreeNodewhich has changed
Gets emitted when a node has changed in tree
New in version 4.2.
- Gda.Tree.signals.node_deleted(tree, node_path)¶
 - Signal Name:
 node-deleted- Flags:
 - Parameters:
 
Gets emitted when a node has been removed from tree
New in version 4.2.
- Gda.Tree.signals.node_has_child_toggled(tree, node)¶
 - Signal Name:
 node-has-child-toggled- Flags:
 - Parameters:
 tree (
Gda.Tree) – The object which received the signalnode (
Gda.TreeNode) – theGda.TreeNodewhich changed from having children to being a leaf or the other way around
Gets emitted when a node has has a child when it did not have any or when it does not have a ny children anymore when it had some
New in version 4.2.
- Gda.Tree.signals.node_inserted(tree, node)¶
 - Signal Name:
 node-inserted- Flags:
 - Parameters:
 tree (
Gda.Tree) – The object which received the signalnode (
Gda.TreeNode) – theGda.TreeNodewhich has inserted
Gets emitted when a node has been inserted in tree
New in version 4.2.