Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreeallocitem.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreeallocitem.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreeallocitem.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreeallocitem.html on line 8

PtTreeAllocItem()

Allocate a new item

Synopsis:

PtTreeItem_t *PtTreeAllocItem( 
                  PtWidget_t const *tree, 
                  const char *string,
                  short set_img,
                  short unset_img );

Description:

This function allocates a new item. The item's string is copied from string.

The set_img argument is the index of the image to be displayed when the item is set, and unset_img is the image to be displayed when it isn't set. An item is considered set if its flags masked with the Pt_ARG_TREE_IMGMASK resource of the widget give a nonzero value.

The image must be already present in the widget: if you specify an index that's larger than the current image count, it's changed to -1. A value of -1 means “no image.”


Note: Use PtTreeAddFirst() and PtTreeAddAfter() to add the new item to a tree structure.

Examples:

See Allocating items and building a tree in the description of PtTree.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtTree, PtTreeAddAfter(), PtTreeAddFirst(), PtTreeAddImages(), PtTreeFreeAllItems(), PtTreeFreeItems(), PtTreeItem_t, PtTreeModifyItem(), PtTreeModifyItemString()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreeallocitem.html on line 123

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreeallocitem.html on line 123