EZ
Up Prev Next Contents


3.20.2 Interaction Routines

void EZ_ClearFancyListBox(EZ_Widget *flistbox)

This function clears flistbox. The items associated to flistbox will have been destroyed when this function returns.

void EZ_SetFancyListBoxHeader(EZ_Widget *flistbox,

EZ_Item **items, int nitems)

This function sets the optional header row for a FancyListBox. To clear the header row, set it to an array of NULL items.

void EZ_SetFancyListBoxData(EZ_Widget *flistbox,

EZ_Item **items, int nrows, int ncolumns)

This function clears flistbox are resets its display data using items. The dimension of the new list will be nrows by ncolumns.

Warning: This function does not clear the header row.

void EZ_FancyListBoxInsertRow(EZ_Widget *flistbox,

EZ_Item **items, int nitems, int where)

This function inserts a new row of items to a FancyListBox at row number where. If where falls out of the range of the current data, it will be inserted at the end.

If nitems is bigger than the column dimension of flistbox, the extra elements will be discarded. If it is smaller than the column dimension, the unfilled slots will be initialized to NULL.

Warning: For FancyListBox widgets, the row with index 0 is reserved for the special header row. As a result, the row index for the array of display items starts at 1.

void EZ_FancyListBoxDeleteRow(EZ_Widget *flistbox,

int idx)

This function deletes the idxth row from the display data of flistbox. If idx falls out of range, no row will be deleted.

void EZ_FancyListBoxReplaceItem(EZ_Widget *flistbox,

EZ_Item *oldItem, EZ_Item *newItem)

This function searches the display data in flistbox for oldItem. If found, it destroys oldItem and replaces it with newItem.

void EZ_FancyListBoxReplaceItemUsingIdx(EZ_Widget *flistbox,

int row, int col, EZ_Item *newItem)

This function replace the item at the rowth row and the colth column with newItem. The old item will be destroyed.

EZ_Item **EZ_GetFancyListBoxSelection(EZ_Widget *flistbox)

This function returns the address of the currently selected item(s) or NULL if no selections has been made.

If the current selection mode is row-mode, the return value is the address of the first element of the relevent row. Other items on the selected row can be accessed via this pointer. If the selection mode is in item-mode, the return value is the address of the selected item.

EZ_Item **EZ_FancyListBoxSelectItem(EZ_Widget *flistbox,

EZ_Item *item, int *location)

This function sets the selection of a FancyListBox widget externally. If item is currently managed by flistbox, the selection will be set on it. If item is NULL, the current selection will be removed.

If location is NULL, item will be displayed exactly at the specified location.

EZ_Item **EZ_FancyListBoxSelectItemUsingIdx(EZ_Widget *flistbox,

int row, int col, int *location)

This function behaves exactly the same as EZ_FancyListBoxSelectItem. If row,col are valid indices, the selection will be set on the corresponding item. If row=-1, the current selection will be removed.

If location is NULL, the selected item will be displayed exactly at the specified location.


HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>