LessTif

LessTif Manual Page - Widget Classes

XmList


[Resources] [Callbacks] [Inherited Resources] [Actions] [Public Functions] [Usage] [Example] [See Also]

Synopsis

Widget Class xmListWidgetClass
Public Header <Xm/List.h>
Private Header <Xm/ListP.h>
Class Hierarchy Core:: XmPrimitive:: XmList

Description

Under Construction

Resources

Name Class Type Default Access
XmNautomaticSelection XmCAutomaticSelection XmRBooleanFalse CSG
XmNbrowseSelectionCallback XmCBrowseSelectionCallback XmRCallbackNULL CSG
XmNdefaultActionCallback XmCDefaultActionCallback XmRCallbackNULL CSG
XmNextendedSelectionCallback XmCExtendedSelectionCallback XmRCallbackNULL CSG
XmNfontList XmCFontList XmFontListNULL CSG
XmNitemCount XmCItemCount XmRInt0 CSG
XmNlistMarginHeight XmCListMarginHeight XmRDimension0 CSG
XmNlistMarginWidth XmCListMarginWidth XmRDimension0 CSG
XmNlistSizePolicy XmCListSizePolicy XmRIntXmVARIABLE CSG
XmNlistSpacing XmCListSpacing XmRDimension0 CSG
XmNmultipleSelectionCallback XmCMultipleSelectionCallback XmRCallbackNULL CSG
XmNscrollBarDisplayPolicy XmCScrollBarDisplayPolicy XmRIntXmAS_NEEDED CSG
XmNselectedItemCount XmCSelectedItemCount XmRInt0 CSG
XmNselectedItemCount XmCSelectedItemCount XmRInt0 CSG
XmNselectedItems XmCSelectedItems XmStringNULL CSG
XmNselectionPolicy XmCSelectionPolicy XmRIntXmBROWSE_SELECT CSG
XmNsingleSelectionCallback XmCSingleSelectionCallback XmRCallbackNULL CSG
XmNstringDirection XmCStringDirection XmRIntXmSTRING_DIRECTION_L_TO_R CSG
XmNtopItemPosition XmCTopItemPosition XmRInt1 CSG
XmNvisibleItemCount XmCVisibleItemCount XmRInt8 CSG

Callbacks

Callback Resources

The List widget defines the following callback resources:

XmNautomaticSelection
When True calls XmNsingleSelectionCallback when mouse is moved into item

XmNfontList
A Fontlist used in the list

XmNitemCount
The number of items in the list

XmNitems
A pointer to an array of XmStrings that are the list items

XmNlistMarginHeight
Height of the border between the list and the list border

XmNlistMarginWidth
Widget of the border between the list and the list border

XmNlistSizePolicy
Determines the horizontal resize policy of the list

XmNlistSpacing
The size of the space between items

XmNscrollBarDisplayPolicy
Determines whether the Scrollbar should be displayed

XmNselectedItemCount
The number of items selected in the list

XmNselectedItems
A pointer to an array of selected items

XmNselectionPolicy
Determines the selection policy used.

XmNstringDirection
Determines the direction to draw the string.

XmNtopItemPosition
Specify the item that is shown at the top of the list.

XmNvisibleItemCount
Specifies the number of items that will be visible.

Callback Structure

XmNsingleSelectionCallback
The singleSelectionCallback specifies a list of callbacks that are called when the mouse is clicked in the list widget The reason field of the callback structure has the value XmCR_SINGLE_SELECT

XmNbrowseSelectionCallback
The browseSelectionCallback specifies a list of callbacks that are called when the mouse is clicked in the list widget The reason field of the callback structure has the value XmCR_BROWSE_SELECT

XmNdefaultActionCallback
The defaultActionCallback specifies a list of callbacks that are called when the mouse is double clicked in the list widget The reason field of the callback structure has the value XmCR_DEFAULT_ACTION

XmNextendedSelectionCallback
The extendedSelectionCallback specifies a list of callbacks that are called when the mouse is clicked in the list widget while the shift key is down The reason field of the callback structure has the value XmCR_EXTENDED_SELECT

XmNmultipleSelectionCallback
The multipleSelectionCallback specifies a list of callbacks that are called when the mouse is clicked in the list widget while the ctrl key is down The reason field of the callback structure has the value XmCR_MULTIPLE_SELECT

Callback Structure

typedef struct {
int reason;                   /* reason callback was called */
XEvent *event;                /* points to event structure */
XmString item;                /* item most recently selected */
int item_length;              /* number of bytes in item member */
int item_position;            /* item's position in XmNitems */
XmString *selected_items;     /* list of items selected */
int selected_item_count;      /* number of items in selected_items */
int *selected_item_positions; /* array of ints marking selected items */
int selection_type;           /* type of most recent selection */
} XmListCallbackStruct;

Inherited Resources

XmList inherits resources from the following widget classes:

Actions

ListAddMode()

ListBeginData()

ListBeginDataExtend()

ListBeginExtend()

ListBeginLine()

ListBeginSelect()

ListBeginToggle()

ListButtonMotion()

ListCopyToClipboard()

ListEndData()

ListEndDataExtend()

ListEndExtend()

ListEndLine()

ListEndSelect()

ListEndToggle()

ListExtendNextItem()

ListExtendPrevItem()

ListKbdActivate()

ListKbdBeginExtend()

ListKbdBeginSelect()

ListKbdCancel()

ListKbdDeselectAll()

ListKbdEndExtend()

ListKbdEndSelect()

ListKbdSelectAll()

ListLeftChar()

ListLeftPage()

ListNextItem()

ListNextPage()

ListPrevItem()

ListPrevPage()

ListProcessDrag()

ListRightChar()

ListRightPage()

ListEnter()

ListLeave()

ListFocusIn()

ListFocusOut()


Usage

Under Construction

Public Functions

Under Construction
Widget XmCreateList(Widget Parent,char *Name,Arg *arglist,Cardinal count)
void XmListAddItem(Widget w,XmString item,int pos)
Add an item to the list

XmListAddItems(Widget w,XmString *items,int count,int pos)
Add an array of items to the list

XmListAddItemUnselected(Widget w,XmString item,int pos)
Add an item to the list unselected

XmListDeleteAllItems(Widget w)
Empty all the items from the list

XmListDeleteItem(Widget w,XmString item)
Delete the specified item from the list

XmListDeleteItems(Widget w,XmString *items,int count)
Delete an array of items from the list
XmListDeleteItemsPos(Widget w,int count,int pos)
Delete count items from position pos in the list

XmListDeletePos(Widget w,int pos)
Delete an item from position pos in the list

XmListDeselectAllItems(Widget w)
Deselect all the items in the list

XmListDeselectItem(Widget w,XmString item)
Deselect an Item from the list

XmListDeselectPos(Widget w,int pos)
Deselect an item at a position pos in the list

XmListGetMatchPos(Widget w,XmString item,int **pos,int *pos_count)
Get all matches of a string

XmListGetSelectedPos(Widget w,int **pos, int *pos_count)
Get all the selected items

XmListItemExists(Widget w,XmString item)
Find if an item exists in the list

XmListItemPos(Widget w,XmString item)
Find the position of an item in the list

XmListReplaceItems(Widget w,XmString *old,int item_count,XmString *new)
Replace the items in the list

XmListReplaceItemsPos(Widget w,XmString *new,int item_count, int pos)
Replace items from specified position

XmListSelectItem(Widget w,XmString item,Boolean notify)
Select the item in the list

XmListSelectPos(Widget w,int pos,Boolean notify)
Select the item at position pos

XmListSetAddMode(Widget w,Boolean mode)
Set the add mode of the list

XmListSetBottomItem(Widget w,XmString item)
Set the position of the last visible item.

XmListSetBottomPos(Widget w,int pos)
Set the position of the last visible item to position pos.

XmListSetHorizPos(Widget w,int pos)
Set the horizontal scrollbar of the list widget to pos

XmListSetItem(Widget w)
Set the position of the first visible item.

XmListSetPos(Widget w)
Set the position of the first visible item to position pos.


See Also

Core, XmPrimitive,
Go Back to Index
Go Back to Main Index
Last Update:Fri 8 Dec 08:36:11 1995