GtkCTree::post_recursive_to_depth

GtkCTree::post_recursive_to_depth

void post_recursive_to_depth(GtkCTreeNode node, int depth, String callback, mixed own_parameter]);

Recursively apply a function to nodes up to a certain depth. The function is called for each node after it has been called for that node's children.

The depth parameter determines, how many levels below the given node the function shall be applied. Note that a depth of "0" does nothing, the depth of "1" will apply the function just to the given node. Only "2" will apply the given function to the first level below the node. If depth is negative, this function just calls post_recursive.

The callback parameter can be a function name as a string; this function will be called. If you want to use the function of an object, just use
array( &$obj, "function")

The fourth parameter is optional, it will be passed to the called function. You can have as many own parameters as you like.

The calling function needs to implement at least 3 parameters: The first is the tree object, the second the specific node and the third contains the callback itself (String or array).

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.