Add items to a list
void PtGenListAddItems( PtWidget_t *list, PtGenListItem_t *items, PtGenListItem_t *after );
This function adds items to the PtGenList widget pointed to by list. The arguments are:
In all selection modes except Pt_SELECTION_MODE_RANGE, if there's no current item in the widget and some of the added items have the Pt_LIST_ITEM_CURRENT flag set, the first of them becomes the current item (see “Current item” in the description of PtGenList). In all other items, the flag is cleared.
If no item is currently selected and the mode is set to Pt_SELECTION_MODE_SINGLE, the first of the added items having the Pt_LIST_ITEM_SELECTED flag set becomes the selected item. This flag on all other items is cleared.
In Pt_SELECTION_MODE_MULTIPLE mode and Pt_SELECTION_MODE_NONE mode, all items with the Pt_LIST_ITEM_SELECTED flag are selected.
In Pt_SELECTION_MODE_RANGE mode, the behavior depends on whether there's a selected range in the widget and how the after item is located relative to the selected range. In particular, if you remove a range of items and then reinsert them in the same place, the selected range is restored. However, the “direction” of the range may be reversed.
If no items are selected in Pt_SELECTION_MODE_RANGE mode but a range of added items has the Pt_LIST_ITEM_SELECTED flag set, these items become the selected range. The first or last item in this range becomes the current item, depending on the setting of the Pt_LIST_ITEM_CURRENT flag of the first selected item.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |