Added jlistbox_get_items_count() function.

This commit is contained in:
David Capello 2010-06-14 21:22:59 -03:00
parent d19321981d
commit 051577f725
2 changed files with 7 additions and 0 deletions

View File

@ -145,6 +145,11 @@ void jlistbox_select_index(JWidget widget, int index)
jlistbox_select_child(widget, child);
}
int jlistbox_get_items_count(JWidget widget)
{
return jlist_length(widget->children);
}
/* setup the scroll to center the selected item in the viewport */
void jlistbox_center_scroll(JWidget widget)
{

View File

@ -42,6 +42,8 @@ int jlistbox_get_selected_index(JWidget listbox);
void jlistbox_select_child(JWidget listbox, JWidget listitem);
void jlistbox_select_index(JWidget listbox, int index);
int jlistbox_get_items_count(JWidget listbox);
void jlistbox_center_scroll(JWidget listbox);
#endif