widget = XtCreateManagedWidget(name, multiListWidgetClass, ...);
The maximum number of multiple selections can be specified. Items are selected and unselected by an action interface. By default, mouse button 1 is used to select, unselect, and toggle items. When the mouse button is lifted, any call backs in the callback list are called with a data structure which describes the count of select items, and lists the indices of the selected items. The return structure con tains some additional information describing the last item modified and the last action performed, which will probably not be of general use, and I'd love to delete if I was sure that people didn't use them. (The behavior of these fields has changed slightly in V3.4).
This routine selects an item with index <item_index> in the MultiList widget <mlw>. If a maximum number of selections is specified and exceeded, the earliest selection will be unselected. If <item_index> doesn't correspond to an item the most recently clicked item will be set to -1 and this routine will immediately return, otherwise the most recently clicked item will be set to the current item.
void XfwfMultiListHighlightAll(mlw)
XfwfMultiListWidget mlw;
This routine highlights all highlightable items in the MultiList widget <mlw>, up to the maximum number of allowed highlightable items;
void XfwfMultiListUnhighlightItem(mlw,item_index)
XfwfMultiListWidget mlw;
int item_index;
This routine unselects the item with index <item_index> in the MultiList widget <mlw>. If <item_index> doesn't correspond to a selected item, then nothing will hap pen. Otherwise, the item is unselected and the selec tion array and count are updated.
void XfwfMultiListUnhighlightAll(mlw)
XfwfMultiListWidget mlw;
This routine unhighlights all items in the MultiList widget <mlw>.
int XfwfMultiListToggleItem(mlw,item_index)
XfwfMultiListWidget mlw;
This routine highlights the item with index <item_index> if it is unhighlighted and unhighlights it if it is already highlighted. The action performed by the toggle is returned (XfwfMultiListActionHighlight or XfwfMultiListActionUnhighlight).
XfwfMultiListReturnStruct *MultiListGetHighlighted(mlw) XfwfMultiListWidget mlw;
This routine takes a MultiList widget <mlw> and returns a MultiListReturnStruct whose num_selected and selected_items fields contain the highlight informa tion. The action field is set to XfwfMultiListAction Status, and the item_index and string fields are invalid.
Boolean XfwfMultiListIsHighlighted(plw,item_index)
XfwfMultiListWidget mlw;
int item_index;
This routine checks if the item with index <item_index> is highlighted and returns True or False depending. If <item_index> is invalid, False is returned.
Boolean XfwfMultiListGetItemInfo(mlw,item_index,str_ptr,h_ptr,s_ptr)
XfwfMultiListWidget mlw;
int item_index;
String *str_ptr;
Boolean *h_ptr,*s_ptr;
This routine returns the string, highlight status and sensitivity information for the item with index <item_index> via the pointers <str_ptr>, <h_ptr> and <s_ptr>. If the item index is invalid, False is returned, else True is returned.
void XfwfMultiListSetNewData(mlw,list,nitems,longest,resize,sensitivity_array)
MultiListWidget mlw;
String *list;
int nitems,longest;
Boolean resize;
Boolean *sensitivity_array;
This routine will set a new set of strings <list> into the MultiList widget <mlw>. If <resize> is True, the MultiList widget will try to resize itself.