MAN page from RedHat Other XITE-3.3-3.i386.rpm
ScrolledList
Section: Free Widget Foundation (3)
Updated: 9 Jan 1993
Index NAME
ScrolledList - A Single Column Scrolling List Of Strings
DESCRIPTION
ScrolledListis a simple, single column, scrolled list of text items, whereselections can be made. The widget has callbacks to notify selectionchanges. The ScrolledList is build from the MultiList widget allowingthe text highlight colors to be changed, and multiple items to beselected. This is a very incomplete widget -- read the RESTRICTIONSsection below.
CLASS HIERARCHY
CoreComposite
RESOURCES
| Name | Class | Type | Notes | Default
|
| XtNwidth | Width | Dimension | | 200
|
| XtNheight | Height | Dimension | | 500
|
| XtNbackground | Background | Pixel | | white
|
| XtNlist | Pointer | char** | | NULL
|
| XtNnumberStrings | NumberStrings | Int | | 0
|
| XtNsensitiveArray | Pointer | Boolean * | | NULL
|
| XtNcallback | Callback | Callback | NULL |
|
PUBLIC FUNCTIONS
void ScrolledListSetList(w,newlist,items,resize,sensitive_array)Widget w;char **newlist;int items;Boolean resize;Boolean *sensitive_array;
- This routine tries to set the string array to the new array <newlist>.<items> is the count of strings. If <items> is 0 and the array isNULL terminated, the number of strings will be automatically counted.The <resize> flag indicates if we want the widget to try to resizeitself to hold the new array. The <sensitive_array> parameter(if non-NULL) contains an array of Booleans representing thesensitivity of the list items.
This routine is the primary interface to changing the data. Theresources XtNlist, XtNnumberStrings, and XtNsensitiveArray can bechanged in parallel, but all three values must be changed within asingle SetValues call. It is better, and more flexible, to use thisfunction interface.
void ScrolledListUnhighlightAll(w)Widget w;
- This routine unhighlights all highlighted items in the ScrolledListwidget <w>.
void ScrolledListHighlightItem(w,item_index)Widget w;int item_index;
- This routine highlights the item with index number <item_index>.
ScrolledListReturnStruct *ScrolledListGetHighlighted(sw)ScrolledListWidget sw;
- This routine returns the current highlighted items info.
int ScrolledListToggleItem(plw,item_index)ScrolledListWidget plw;
- This routine highlights the item with index <item_index> if it isunhighlighted and unhighlights it if it is already highlighted. Theaction performed by the toggle is returned (ScrolledList_ACTION_HIGHLIGHTor ScrolledList_ACTION_UNHIGHLIGHT).
Boolean ScrolledListIsHighlighted(w,item_index)Widget w;int item_index;
- This routine returns a boolean that indicates if the item with index<item_index> was highlighted or not.
Boolean ScrolledListGetItem(w,item_index,str_ptr,high_ptr,sens_ptr)Widget w;int item_index;String *str_ptr;Boolean *high_ptr,*sens_ptr;
- This routine returns information about a numbered item including thename of the item, whether it is highlighted, and its sensitivity. Ifthe item index number does not correspond to an item, False isreturned, else True is returned.
RESTRICTIONS
For no good reason this widget is hard coded to only allow one item tobe selected at a time. This is just a simple wrapper of a Viewportaround a MultiList. Most of the work is performed by the MultiListwidget. If you want different features, you may want to deal with theMultiList widget directly.
AUTHOR
Brian Totty, tottyAATTcs.uiuc.eduDepartment of Computer Science,University of Illinois at Urbana-Champaign1304 W. Springfield AvenueUrbana, IL 61801
Index
- NAME
- DESCRIPTION
- CLASS HIERARCHY
- RESOURCES
- PUBLIC FUNCTIONS
- RESTRICTIONS
- AUTHOR
This document was created byman2html,using the manual pages.