Caution: This version of this document is no longer maintained. For the latest documentation, see


PtTree item attributes structure


typedef struct Pt_tree_item_attributes {
    PtGenListItemAttrs_t list;
    PhImage_t const *set_image, *unset_image;


This data structure describes the attributes for a PtTreeItem_t. The members include at least:

A PtGenListItemsAttrs_t structure that represents a list of generic item attributes. See the description below.
A pointer to the set image for the item.
A pointer for the unset image for the item.

It's your responsibility to allocate and deallocate the members of this structure, and to ensure that their contents don't change while the structure is in use.

Use this structure as a parameter to PtTreeCreateItem() to create a tree item with attributes (as opposed to PtTreeAllocItem()), and to PtTreeChangeItem() to change an existing tree item.

The list member is a PtGenListItemAttrs_t with this structure:

typedef struct Pt_genlist_item_attrs {
    const char *font;
    PtGenListColorSet_t unselected_colors;
    PtGenListColorSet_t selected_colors;
    unsigned flags;
    }      PtGenListItemAttrs_t;

The members are:

The font name for the item text. If this item is set to NULL, the widget-defined font it used.
unselected_colors, selected_colors
The text and fill color for the list item. Set to Pg_TRANSPARENT to use the widget-defined color.
This member is a PtGenListColorSet_t, with this structure:
typedef struct Pt_gen_list_color_set {
    PgColor_t text, fill;
    }  PtGenListColorSet_t;
Used internally. Must be set to zero.



See also:

PtTree, PtTreeChangeItem(), PtTreeCreateItem(), PtTreeItem_t