PtTreeItemAttributes_t

PtTree item attributes structure

Synopsis:

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

Description:

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

list
A PtGenListItemsAttrs_t structure that represents a list of generic item attributes. See the description below.
set_image
A pointer to the set image for the item.
unset_image
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:

font
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;
flags
Used internally. Must be set to zero.

Classification:

Photon

See also:

PtTree, PtTreeChangeItem(), PtTreeCreateItem(), PtTreeItem_t