This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Allocate a new item
PtTreeItem_t *PtTreeAllocItem( PtWidget_t const *tree, const char *string, short set_img, short unset_img );
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."
Use PtTreeAddFirst() and PtTreeAddAfter() to add the new item to a tree structure. |
See "Allocating items and building a tree" in the description of PtTree.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtTree, PtTreeAddAfter(), PtTreeAddFirst(), PtTreeAddImages(), PtTreeFreeAllItems(), PtTreeFreeItems(), PtTreeItem_t, PtTreeModifyItem(), PtTreeModifyItemString()