PHP-GTK
Wednesday, September 17, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkTreeStore::is_ancestor
GtkTreeStore::iter_is_validnext

Last updated: Sun, 12 May 2013
view this page in English

GtkTreeStore::iter_depth

Calculates how deep the given iter is nested in the store. If the given iter is a top-level row, 0 is returned.

Example 135. Using iter_depth to determine the depth of a row

<?php
//Create the store
$store = new GtkTreeStore(Gtk::TYPE_STRING);
 
//Variable for the last inserted row
$last  = null;
 
//loop from 0 to 10
for ($nA = 0; $nA <= 10; $nA++) {
    //append a row as child of $last
    //$last is NULL at first, so the row will be top-level
    $last = $store->append($last, array('row ' . $nA));
    //display the depth of the created iterator
    echo 'Depth at level #' . $nA . ': ' . $store->iter_depth($last) . "\r\n";
}
?>

User Contributed Notes
gtk.gtktreestore.method.iter_depth.php
add a note about notes
There are no user contributed notes for this page.


previousGtkTreeStore::is_ancestor
GtkTreeStore::iter_is_validnext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:51:01 2013 CEST