PtGenListItem_t
![]() |
![]() |
![]() |
![]() |
PtGenListItem_t
PtGenList item structure
Synopsis:
typedef struct Pt_genlist_item {
unsigned flags;
PhDim_t size;
PtGenListItem_t *next, *prev;
} PtGenListItem_t;
Description:
This data structure describes an item in a PtGenList widget.
![]() |
Applications should view this as a read-only structure; subclasses usually define ways to modify PtGenListItem_t members. |
The members include at least:
- flags
- The state of the item:
- Pt_LIST_ITEM_SELECTED
- This item is selected.
- Pt_LIST_ITEM_CURRENT
- This item is the current item (see "Current item" in the description of PtGenList).
- Pt_LIST_ITEM_DAMAGED
- This item should be redrawn.
- Pt_LIST_ITEM_ABOVE
- This item is above the visible range of items. Use the Pt_ARG_TOP_ITEM_POS resource to scroll the list.
- Pt_LIST_ITEM_BELOW
- This item is below the visible range of items. Use the Pt_ARG_TOP_ITEM_POS resource to scroll the list.
- Pt_LIST_ITEM_INWIDGET
- The item has been added to a widget.
- Pt_LIST_ITEM_FLAG_USER1
Pt_LIST_ITEM_FLAG_USER2
Pt_LIST_ITEM_FLAG_USER3
Pt_LIST_ITEM_FLAG_USER4 - Flags that you can use for any purpose in your application. The widgets don't use these flags.
The Pt_LIST_ITEM_USED_FLAGS macro defines the flags used by the PtGenList widget. The remaining bits are available for the child class.
It's safe to set only the following item flags before adding the item to a widget -- they're preserved if they don't conflict with the current state of the widget:
- Pt_LIST_ITEM_SELECTED
- Preserved unless the selection mode is Pt_SINGLE_MODE and another item is already selected.
- Pt_LIST_ITEM_CURRENT
- Preserved unless there's already a current item in the widget.
Don't modify these flags directly after the item is in a list; they're set and cleared by the convenience functions.
- size
- A PhDim_t structure (see the Photon Library Reference) that defines the width and height of the item. If the widget has columns, the widths of the items are ignored.
- next, prev
- The widget uses these links to find the next and previous items in the list.
Classification:
Photon
See also:
PtGenList, PtGenTree, PtGenTreeItem_t, PtList, PtTreeItem_t
PhDim_t in the Photon Library Reference
![]() |
![]() |
![]() |
![]() |
![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)
