Programming Guide |
Counts the widgets contained by an application object
int sm_list_objects_count(int list_id);
list_id
- An integer handle to the list of widgets in an application object, obtained from sm_list_objects_start.
- 0 The number of objects listed for the specified container.
sm_list_objects_count
returns the number of objects specified in an object contents list. This list, created by sm_list_objects_start, initially contains the object IDs of all widgets in the container object; thus, a call tosm_list_objects_count
immediately after the list is created yields the total number of widgets in a container object. Each call to sm_list_objects_next reduces by one the number of objects in the list; so a call tosm_list_objects_count
that is preceded by calls tosm_list_objects_next
yields the number of objects that remain on the object contents list.Note:
sm_list_objects_count
does not check whether the widgets in an object contents list are still in existence; it is therefore possible to return a count that includes invalid object IDs for widgets that were destroyed after the list's creation.
sm_list_objects_end, sm_list_objects_start