void EZ_ClearListBox(EZ_Widget *listbox)
void EZ_SetListBoxItems(EZ_Widget *listbox, char **items,
int nitems)
void EZ_AppendListBoxItem(EZ_Widget *listbox, char *item)
\verb+void EZ_InsertListBoxItem(EZ_Widget *listbox, char *str, int idx)+
This function inserts an item into a list box at location
idx
.
If idx
is out of range, the item will be inserted at
the end of the list.
void EZ_DeleteListBoxItem(EZ_Widget *listbox, int idx)
This function deletes the item at location idx
. If
idx
is out of range, no item will be deleted.
\verb+void EZ_ModifyListBoxItem(EZ_Widget *listbox, char *str, int idx)+
This function replace the item at idx
by str
, if
idx
is in the range of the listbox.
int EZ_GetListBoxSelectionLineNumber(EZ_Widget *listbox)
This function returns the index of the currently selected item in a listbox. If no selection has been made, it returns -1.
char *EZ_GetListBoxSelectedItem(EZ_Widget *listbox)
This function returns the selected item in a listbox. Should the selection contains multiple lines, the returned value is undefined.
char *EZ_GetListBoxSelection(EZ_Widget *listbox)
This function returns the current selection (highlight region, may contain multiple items) or NULL if no selection has been made.
char *EZ_ListBoxSelectItem(EZ_Widget *listbox, char *item)
This function sets the selection of a listbox externally. If
item
is NULL
, it removes the current selection.
char *EZ_ListBoxSelectItemUsingIdx(EZ_Widget *listbox, int idx)
This function sets the selection of a listbox externally. If idx
is
in a valid index, the corresponding entry will be selected.
If idx
is -1
, it removes the current selection.