note 28 added to gtk.gtkctree.method.insert_node.php
| From: | alan_k at hklc dot com | Date: | Thu, 30 Aug 2001 05:52:52 +0000 |
| Subject: | note 28 added to gtk.gtkctree.method.insert_node.php | ||
| Groups: | php.gtk.webmaster | ||
| Request: | Send a blank email to php-gtk-webmaster+get-16@lists.php.net to get a copy of this message | ||
GtkCTreeNode $ctree->insert_node(
... GtkCTreeNode parent,
... GtkCTreeNode sibling,
... string text,
... int spacing,
... GdkPixmap pixmap_closed,
... GdkBitmap mask_closed,
... GdkPixmap pixmap_opened,
... GdkBitmap mask_opened,
... (true|false) is_leaf,
... (true|false) expanded
);
parent = (null) or another CTreeNode
sibling = (null) or another CTreeNode
text = "The text to go in the tree"
pixmap_closed,mask_closed = See below for code to do this or use (null)
pixmap_opened,mask_opened = See below for code to do this or use (null)
is_leaf = eg if it is the end of a tree (can not be expanded) - true of false
expanded = if it should be displayed as expanded - true of false
Have a look at gtk.php in the test directory.
// example to make the pixmap and mask.
$book_closed_xpm = array("16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" ");
$transparent = &new GdkColor(0, 0, 0);
list($pixmap_closed, $mask_closed) =
Gdk::pixmap_create_from_xpm_d($window->window, $transparent, $pixmap_closed_xpm);
http://gtk.php.net/manual/en/gtk.gtkctree.method.insert_node.php