| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) | 
Fill a buffer with pointers to all items
PtTreeItem_t **PtTreeAllItems( 
                   PtWidget_t *widget, 
                   PtTreeItem_t **buffer );
This function fills a buffer with pointers to all items in the widget. If buffer is NULL, the function allocates a buffer using malloc(), and the buffer is NULL-terminated. If buffer isn't NULL, the function doesn't add a NULL at the end.
|  | Items that belong to collapsed subtrees aren't included in the buffer. If you need a list of all the items, traverse the father, son, and brother pointers in the PtGenTreeItem_t structure that's part of PtTreeItem_t. | 
A pointer to the buffer.
PtTreeItem_t *item, **buf;
buf = PtTreeAllItems( widget, NULL );
for ( i=0; ( item = buf[i] ) != NULL; ++i ) {
    printf( "%s\n", item->string );
}
free( buf );
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
PtTree, PtTreeGetCurrent(), PtTreeGetSelIndexes(), PtTreeItem_t, PtTreeSelectedItems(), PtTreeSetSelIndexes()
| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) |