[Previous] [Contents] [Index] [Next]


Remove items from a list


PtGenListItem_t *PtGenListRemoveItems( 
                     PtWidget_t *list, 
                     PtGenListItem_t *first,
                     PtGenListItem_t *last );


This function removes the given sublist list from the PtGenList widget. If first or last is a NULL pointer, the first or last items of the entire list will be used. Both arguments may point to the same item, but last must not precede first in the list.

The function returns the first removed item (or NULL if the list was empty). The function inserts NULL in the next field of the last removed item and the prev field of the first removed item. This ensures the returned value (if not NULL) will always point to the first item of a NULL-terminated, double-linked list. No other fields in any of the removed items are modified.

If the current item is removed, there won't be a current item on the list unless the selection mode is Pt_SELECTION_MODE_RANGE and only part of the selected range is removed. In this case, the current item is set to the first or last of the remaining selected items.


The first removed item; NULL if the list was empty.



Interrupt handler No
Signal handler No
Thread No

[Previous] [Contents] [Index] [Next]