[0m


XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



[1mNAME
     XmList - the OSF/Motif List widget class[0m.


[1mSYNOPSIS
     #include <Xm/List.h>


DESCRIPTION
     [0mList allows a user to select one or more items from a group
     of choices.  Items are selected from the list in a variety
     of ways, using both the pointer and the keyboard.

     List operates on an array of strings that are defined by the
     application.  Each string becomes an item in List, with the
     first string becoming the item in position 1, the second
     string becoming the item in position 2, and so on.

     The visual size of List is set by specifying the number of
     items that are visible.  If selection scrolling ability
     through a large set of choices is desired, use the
     [1mXmCreateScrolledList [0mconvenience function.

     To select items, move the pointer or cursor to the desired
     item and press the mouse button or the key defined as
     select.  There are several styles of selection behavior, and
     they all highlight the selected item or items by displaying
     them in inverse colors.  An appropriate callback is invoked
     to notify the application of the user's choice.  The appli-
     cation then takes whatever action is required for the speci-
     fied selection.


     [1mClasses
     [0mList inherits behavior and resources from [1mCore [0mand [1mXmPrimi-
     tive [0mclasses.

     The class pointer is [1mxmListWidgetClass[0m.

     The class name is [1mXmList[0m.


     [1mNew Resources
     [0mThe following table defines a set of widget resources used
     by the programmer to specify data.  The programmer can also
     set the resource values for the inherited classes to set
     attributes for this widget.  To reference a resource by name
     or by class in a .Xdefaults file, remove the [1mXmN [0mor [1mXmC [0mpre-
     fix and use the remaining letters.  To specify one of the
     defined values for a resource in a .Xdefaults file, remove
     the [1mXm [0mprefix and use the remaining letters (in either lower
     case or upper case, but include any underscores between



Printed 23/11/93						1






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



     words).  The codes in the access column indicate if the
     given resource can be set at creation time ([1mC[0m), set by using
     [1mXtSetValues [0m([1mS[0m), retrieved by using [1mXtGetValues [0m([1mG[0m), or is
     not applicable ([1mN/A[0m).

					     [1mXmList Resource Set
Name			       Class			Type		    Default			Access
[0m______________________________________________________________________________________________________________
XmNautomaticSelection	       XmCAutomaticSelection	Boolean             False			CSG
XmNbrowseSelectionCallback     XmCCallback		XtCallbackList	    NULL			C
XmNdefaultActionCallback       XmCCallback		XtCallbackList	    NULL			C
XmNdoubleClickInterval	       XmCDoubleClickInterval	int		    250                         CSG
XmNextendedSelectionCallback   XmCCallback		XtCallbackList	    NULL			C
XmNfontList		       XmCFontList		XmFontList	    "fixed"			CSG
XmNitemCount		       XmCItemCount		int		    0				CSG
XmNitems		       XmCItems                 XmStringTable	    NULL			CSG
XmNlistMarginHeight	       XmCListMarginHeight	Dimension	    0				CSG
XmNlistMarginWidth	       XmCListMarginWidth	Dimension	    0				CSG
XmNlistSpacing		       XmCListSpacing		short		    0				CSG
XmNmultipleSelectionCallback   XmCCallback		XtCallbackList	    NULL			C
XmNselectedItemCount	       XmCSelectedItemCount	int		    0				CSG
XmNselectedItems	       XmCSelectedItems         XmStringTable	    NULL			CSG
XmNselectionPolicy	       XmCSelectionPolicy	unsigned char	    XmBROWSE_SELECT		CSG
XmNsingleSelectionCallback     XmCCallback		XtCallbackList	    NULL			C
XmNstringDirection	       XmCStringDirection	XmStringDirection   XmSTRING_DIRECTION_L_TO_R	CSG
XmNvisibleItemCount	       XmCVisibleItemCount	int		    1				CSG


     [1mXmNautomaticSelection
	  [0mInvokes [1mXmNsingleSelectionCallback [0mwhen the user moves
	  into a new item if the value is True and the selection
	  mode is either [1mXmBROWSE_SELECT [0mor [1mXmEXTENDED_SELECT[0m.
	  If False, no selection callbacks invoke until the user
	  releases the mouse button.  See the Behavior section
	  for further details on the interaction of this resource
	  with the selection modes.

     [1mXmNbrowseSelectionCallback
	  [0mSpecifies a list of callbacks that is called when an
	  item is selected in the browse selection mode.  The
	  reason is [1mXmCR_BROWSE_SELECT[0m.

     [1mXmNdefaultActionCallback
	  [0mSpecifies a list of callbacks that is called when an
	  item is double clicked.  The reason is
	  [1mXmCR_DEFAULT_ACTION[0m.

     [1mXmNdoubleClickInterval
	  [0mSpecifies the time in milliseconds that two consecutive
	  clicks must occur within to be considered a double-
	  click action, rather than two single-click actions.




Printed 23/11/93						2






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



     [1mXmNextendedSelectionCallback
	  [0mSpecifies a list of callbacks that is called when items
	  are selected using the extended selection mode. The
	  reason is [1mXmCR_EXTENDED_SELECT[0m.

     [1mXmNfontList
	  [0mSpecifies the font list associated with the list items.
	  This is used in conjunction with the [1mXmNvisibleItem-
	  sCount [0mresource to determine the height of the List
	  widget.  Refer to [1mXmString(3Xm) [0mfor more information on
	  a font list structure.

     [1mXmNitemCount
	  [0mSpecifies the total number of items.	This number must
	  match [1mXmNitems[0m.  It is automatically updated by the
	  list whenever an element is added to or deleted from
	  the list.

     [1mXmNitems
	  [0mPoints to an array of compound strings that are to be
	  displayed as the list items.	Refer to [1mXmString(3Xm)
	  [0mfor more information on the creation and structure of
	  compound strings.

     [1mXmNlistMarginHeight
	  [0mSpecifies the height of the margin between the List
	  border and the items.

     [1mXmNlistMarginWidth
	  [0mSpecifies the width of the margin between the List
	  border and the items.

     [1mXmNlistSpacing
	  [0mSpecifies the spacing between list items.  When key-
	  board traversal is enabled, this spacing increases by
	  the value of the [1mXmNhighlightThickness [0mparameter in
	  Primitive.

     [1mXmNmultipleSelectionCallback
	  [0mSpecifies a list of callbacks that is called when an
	  item is selected in multiple selection mode. The reason
	  is [1mXmCR_MULTIPLE_SELECT[0m.

     [1mXmNselectedItemCount
	  [0mSpecifies the number of strings in the selected items
	  list.

     [1mXmNselectedItems
	  [0mPoints to an array of compound strings that represents
	  the list items that are currently selected, either by
	  the user or the application.




Printed 23/11/93						3






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



     [1mXmNselectionPolicy
	  [0mDefines the interpretation of the selection action.
	  This can be one of the following:

     o+	[1mXmSINGLE_SELECT [0m- allows only single selections.

     o+	[1mXmMULTIPLE_SELECT [0m- allows multiple selections.

     o+	[1mXmEXTENDED_SELECT [0m- allows extended selections.

     o+	[1mXmBROWSE_SELECT [0m- allows PM "drag and browse" functional-
	ity.

     [1mXmNsingleSelectionCallback
	[0mSpecifies a list of callbacks that is called when an item
	is selected in single selection mode. The reason is
	[1mXmCR_SINGLE_SELECT[0m.

     [1mXmNstringDirection
	[0mSpecifies the initial direction to draw the string.  The
	values are [1mXmSTRING_DIRECTION_L_TO_R [0mand
	[1mXmSTRING_DIRECTION_R_TO_L[0m.

     [1mXmNvisibleItemCount
	[0mSpecifies the number of items that can fit in the visible
	space of the List work area.  The list will use this
	value to determine its height.

				      [1mXmScrolledList Resource Set
Name				Class				Type		Default          Access
[0m_______________________________________________________________________________________________________
XmNhorizontalScrollBar		XmCHorizontalScrollBar		Widget		NULL		 CSG
XmNlistSizePolicy		XmCListSizePolicy		unsigned char	XmVARIABLE	 CG
XmNscrollBarDisplayPolicy	XmCScrollBarDisplayPolicy	unsigned char	XmAS_NEEDED	 CSG
XmNscrollBarPlacement		XmCScrollBarPlacement		unsigned char	XmBOTTOM_RIGHT	 CSG
XmNscrolledWindowMarginHeight	XmCScrolledWindowMarginHeight	Dimension	0		 CSG
XmNscrolledWindowMarginWidth	XmCScrolledWindowMarginWidth	Dimension	0		 CSG
XmNspacing			XmCSpacing			Dimension	4		 CSG
XmNverticalScrollBar		XmCVerticalScrollBar		Widget		NULL		 CSG


     [1mXmNhorizontalScrollBar
	[0mSpecifies the widget ID of the horizontal ScrollBar.
	This widget is created automatically by the
	[1mXmCreateScrolledList [0mconvenience function.

     [1mXmNlistSizePolicy
	[0mControls the reaction of the List when an item grows hor-
	izontally beyond the current size of the List work area.
	If the value is [1mXmCONSTANT[0m, the List viewing area will
	not grow, and a horizontal ScrollBar will be added.  If
	this resource is set to [1mXmVARIABLE[0m, List will grow to



Printed 23/11/93						4






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



	match the size of the longest item, and no horizontal
	ScrollBar will appear.

	When the value of this resource is [1mXmRESIZE_IF_POSSIBLE[0m,
	the List attempts to grow or shrink to match the width of
	the widest item.  If it cannot grow to match the widest
	size, a horizontal ScrollBar is added if the longest item
	is wider than the List viewing area.

	The size policy must be set at the time the List widget
	is created. It cannot be changed at a later time through
	[1mXtSetValues[0m.

     [1mXmNscrollBarDisplayPolicy
	[0mSpecifies the ScrollBar display policy.  When this
	resource is set to [1mXmAS_NEEDED[0m, the vertical ScrollBar
	will be displayed only when the number of items in the
	list exceeds the number of visible items.  If [1mXmNlist-
	SizePolicy [0mis [1mXmCONSTANT [0mor [1mXmRESIZE_IF_POSSIBLE[0m, the
	horizontal ScrollBar will be displayed only if there is
	an item that is wider than the current width of the list.
	When this resource is set to [1mXmSTATIC[0m, the vertical
	ScrollBar will always be displayed.  The horizontal
	ScrollBar will always be displayed if [1mXmNlistSizePolicy
	[0mis set to [1mXmCONSTANT [0mor [1mXmRESIZE_IF_POSSIBLE[0m.

     [1mXmNscrollBarPlacement
	[0mSpecifies the positioning of the ScrollBars in relation
	to the visible items.  The following are the values:

     o+	[1mXmTOP_LEFT [0m- The horizontal ScrollBar is placed above the
	visible items and the vertical ScrollBar to the left of
	the  visible items.

     o+	[1mXmBOTTOM_LEFT [0m- The horizontal ScrollBar is placed below
	the visible items and the vertical ScrollBar to the left
	of the visible items.

     o+	[1mXmTOP_RIGHT [0m- The horizontal ScrollBar is placed above
	the visible items and the vertical ScrollBar to the right
	of the	visible items.

     o+	[1mXmBOTTOM_RIGHT [0m- The horizontal ScrollBar is placed below
	the visible items and the vertical ScrollBar to the right
	of the	visible items.

     [1mXmNscrolledWindowMarginHeight
	[0mSpecifies the margin height on the top and bottom of the
	ScrolledWindow.

     [1mXmNscrolledWindowMarginWidth
	[0mSpecifies the margin width on the right and left sides of



Printed 23/11/93						5






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



	the ScrolledWindow.

     [1mXmNspacing
	[0mSpecifies the distance that separates the ScrollBars from
	the visible items.

     [1mXmNverticalScrollBar
	[0mSpecifies the widget ID of the vertical ScrollBar.  This
	widget is created automatically by the [1mXmCreateScrol-
	ledList [0mconvenience function.


     [1mInherited Resources
     [0mList inherits behavior and resources from the following
     superclasses.  For a complete description of these
     resources, refer to the man page for that superclass.


				   [1mXmPrimitive Resource Set
Name			Class			Type		 Default		Access
[0m______________________________________________________________________________________________
XmNbottomShadowColor	XmCForeground		Pixel		 dynamic		CSG
XmNbottomShadowPixmap	XmCBottomShadowPixmap	Pixmap		 XmUNSPECIFIED_PIXMAP	CSG
XmNforeground		XmCForeground		Pixel		 dynamic		CSG
XmNhelpCallback         XmCCallback		XtCallbackList	 NULL			C
XmNhighlightColor	XmCForeground		Pixel		 Black			CSG
XmNhighlightOnEnter	XmCHighlightOnEnter	Boolean          False			CSG
XmNhighlightPixmap	XmCHighlightPixmap	Pixmap		 dynamic		CSG
XmNhighlightThickness	XmCHighlightThickness	short		 0			CSG
XmNshadowThickness	XmCShadowThickness	short		 2			CSG
XmNtopShadowColor	XmCBackground		Pixel		 dynamic		CSG
XmNtopShadowPixmap	XmCTopShadowPixmap	Pixmap		 XmUNSPECIFIED_PIXMAP	CSG
XmNtraversalOn		XmCTraversalOn		Boolean          False			CSG
XmNunitType		XmCUnitType		unsigned char	 XmPIXELS		CSG
XmNuserData		XmCUserData		caddr_t          NULL			CSG


				     [1mCore Resource Set
	Name		      Class		   Type              Default	      Access
[0m____________________________________________________________________________________________
XmNaccelerators        XmCAccelerators	      XtTranslations   NULL		      CSG
XmNancestorSensitive   XmCSensitive	      Boolean	       True		      G
XmNbackground	       XmCBackground	      Pixel	       dynamic		      CSG
XmNbackgroundPixmap    XmCPixmap	      Pixmap	       XmUNSPECIFIED_PIXMAP   CSG
XmNborderColor	       XmCBorderColor	      Pixel	       Black		      CSG
XmNborderPixmap        XmCPixmap	      Pixmap	       XmUNSPECIFIED_PIXMAP   CSG
XmNborderWidth	       XmCBorderWidth	      Dimension        0		      CSG
XmNcolormap	       XmCColormap	      Colormap	       XtCopyFromParent       CG
XmNdepth	       XmCDepth               int	       XtCopyFromParent       CG
XmNdestroyCallback     XmCCallback	      XtCallbackList   NULL		      C
XmNheight	       XmCHeight	      Dimension        0		      CSG
XmNmappedWhenManaged   XmCMappedWhenManaged   Boolean	       True		      CSG



Printed 23/11/93						6






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



XmNscreen	       XmCScreen	      Pointer	       XtCopyScreen	      CG
XmNsensitive	       XmCSensitive	      Boolean	       True		      CSG
XmNtranslations        XmCTranslations	      XtTranslations   NULL		      CSG
XmNwidth	       XmCWidth               Dimension        0		      CSG
XmNx		       XmCPosition	      Position	       0		      CSG
XmNy		       XmCPosition	      Position	       0		      CSG


     [1mCallback Information
     [0mList defines a new callback structure.  The application must
     first look at the reason field and only use the structure
     members that are valid for that particular reason, because
     not all of the fields are relevant for every possible rea-
     son.  The callback structure is defined as follows:

     [1mtypedef struct
     [0m{
       [1mint	    [0m_r_e_a_s_o_n;
       [1mXEvent	    [0m* _e_v_e_n_t;
       [1mXmString     [0m_i_t_e_m;
       [1mint	    [0m_i_t_e_m__l_e_n_g_t_h;
       [1mint	    [0m_i_t_e_m__p_o_s_i_t_i_o_n;
       [1mXmString     [0m* _s_e_l_e_c_t_e_d__i_t_e_m_s;
       [1mint	    [0m_s_e_l_e_c_t_e_d__i_t_e_m__c_o_u_n_t;
       [1mint	    [0m_s_e_l_e_c_t_i_o_n__t_y_p_e;
     } [1mXmListCallbackStruct[0m;


     _r_e_a_s_o_n	  Indicates why the callback was invoked.

     _e_v_e_n_t	  Points to the [1mXEvent [0mthat triggered the call-
		  back.  It can be NULL.

     _i_t_e_m	  Is the item selected by this action.
		  _s_e_l_e_c_t_e_d__i_t_e_m_s points to a temporary storage
		  space that is reused after the callback is fin-
		  ished.  Therefore, if an application needs to
		  save the selected list, it should copy the list
		  into its own data space.

     _i_t_e_m__l_e_n_g_t_h  Is the length of the item when the selection
		  action occurred.

     _i_t_e_m__p_o_s_i_t_i_o_nIs the position in the List of the selected
		  item.

     _s_e_l_e_c_t_e_d__i_t_e_m_s
		  Points to the list of items selected at the
		  time of the _e_v_e_n_t that caused the callback.
		  _s_e_l_e_c_t_e_d__i_t_e_m_s points to a temporary storage
		  space that is reused after the callback is fin-
		  ished.  Therefore, if an application needs to



Printed 23/11/93						7






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



		  save the selected list, it should copy the list
		  into its own data space.

     _s_e_l_e_c_t_e_d__i_t_e_m_s__c_o_u_n_t
		  Is the number of items in the _s_e_l_e_c_t_e_d__i_t_e_m_s
		  list.

     _s_e_l_e_c_t_i_o_n__t_y_p_e
		  Indicates that the most recent extended selec-
		  tion was either the initial selection ([1mXmINI-
		  TIAL[0m), a modification of an existing selection
		  ([1mXmMODIFICATION[0m), or an additional noncontigu-
		  ous selection ([1mXmADDITION[0m).

     The following table describes the reasons for which the
     individual callback structure fields are valid:

       [1mReason				Valid Fields
[0m____________________________________________________________________________________________________________________________________________
[1mXmCR_SINGLE_SELECT     [0m_r_e_a_s_o_n, _e_v_e_n_t, _i_t_e_m, _i_t_e_m__l_e_n_g_t_h, _i_t_e_m__p_o_s_i_t_i_o_n
______________________________________________________________________
[1mXmCR_DEFAULT_ACTION    [0m_r_e_a_s_o_n, _e_v_e_n_t, _i_t_e_m, _i_t_e_m__l_e_n_g_t_h, _i_t_e_m__p_o_s_i_t_i_o_n
______________________________________________________________________
[1mXmCR_BROWSE_SELECT     [0m_r_e_a_s_o_n, _e_v_e_n_t, _i_t_e_m, _i_t_e_m__l_e_n_g_t_h, _i_t_e_m__p_o_s_i_t_i_o_n
______________________________________________________________________
[1mXmCR_MULTIPLE_SELECT

		       [0m_r_e_a_s_o_n, _e_v_e_n_t, _i_t_e_m, _s_e_l_e_c_t_e_d__i_t_e_m_s,
		       _s_e_l_e_c_t_e_d__i_t_e_m__c_o_u_n_t
______________________________________________________________________
[1mXmCR_EXTENDED_SELECT

		       [0m_r_e_a_s_o_n, _e_v_e_n_t, _i_t_e_m, _s_e_l_e_c_t_e_d__i_t_e_m_s,
		       _s_e_l_e_c_t_e_d__i_t_e_m__c_o_u_n_t, _s_e_l_e_c_t_i_o_n__t_y_p_e

		    |
			|
			|
			|
			|
			|
			|
			|
			|
			|
			|
			|
			|














     [1mBehavior
     [0mList provides several methods for selecting its items. The
     general selection model is as follows:

	  The user moves the pointer to the item that is desired
	  to be selected, either by using the mouse to move the
	  pointer over the desired item, or, in keyboard traver-
	  sal mode, moving the active highlight to the desired
	  item with the up and down arrow keys. The item is
	  selected by clicking the select button on the mouse
	  (usually the left mouse button), or by pressing the
	  select key on the keyboard (usually defined to be the
	  Space key). Each of the selection modes provides some
	  variation of the above behavior.

	  Note that the keyboard selection interface is only
	  active when traversal is enabled for the List widget.

	  The selection mode is set by the [1mXmNselectionPolicy
	  [0mresource and is modified by the [1mXmNautomaticSelection



[0mPrinted 23/11/93						8






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



	  resource. The behavior of the various modes are defined
	  below:

     [1mXmSINGLE_SELECT (Single Selection)[0m:
	  Move the mouse pointer or keyboard highlight until it
	  is over the desired item and press the select button or
	  key.	The item inverts its foreground and background
	  colors to indicate that it is to be the selected
	  object.  Any previously selected items are unselected
	  (returned to their normal visual state).  When the but-
	  ton or key is released, [1mXmNsingleSelectionCallback [0mis
	  invoked.

     [1mXmBROWSE_SELECT (Browse Selection)[0m:
	  When using the mouse, press the select button; the item
	  under the pointer is highlighted.  While the button is
	  held down, drag the selection by moving the pointer.
	  When the select button is released, the object under
	  the pointer becomes the selected item and the
	  [1mXmNbrowseSelectionCallback [0mis invoked.

	  If [1mXmNautomaticSelection [0mis True, the [1mXmNbrowseSelec-
	  tionCallback [0mis invoked when the select button is
	  pressed.  For each subsequent item entered while the
	  select button is held down, the callback is invoked
	  when the pointer moves into the item.  No selection
	  callback is invoked when the button is released.

	  When selecting through the keyboard and [1mXmNautoma-
	  ticSelection [0mis False, browse selection is no different
	  from single-selection mode.  However, when [1mXmNautoma-
	  ticSelection [0mis True, the callback is invoked for each
	  element that is selected.  Both the keyboard highlight
	  and the selection highlight move as the user moves
	  through the list.

     [1mXmMULTIPLE_SELECT (Multiple Selection)[0m:
	  Move the mouse pointer or keyboard highlight until it
	  is over the desired item and press the select button or
	  key.	The item inverts its foreground and background
	  colors to indicate that it is a selected object.  Any
	  previously selected items are not affected by this
	  action.  When the button or key is released, the
	  [1mXmNmultipleSelectionCallback [0mis invoked.  To unselect
	  an item in this mode, move to a selected item and press
	  the select button or key.  The [1mXmNmultipleSelection-
	  Callback [0mis invoked with the updated selection list.

     [1mXmEXTENDED_SELECT (Extended Selection)[0m:
	  This mode selects a contiguous range of objects with
	  one action. Press the select button on the first item
	  of the range. This begins a new selection process,



Printed 23/11/93						9






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



	  which deselects any previous selection in the list.
	  That item inverts to show its inclusion in the selec-
	  tion.  While depressing the button, drag the cursor
	  through other items in the List. As the pointer moves
	  through the list, all items between the initial item
	  and the item currently under the pointer are inverted
	  to show that they are included in the selection.  When
	  the button is released, the [1mXmNextendedSelectionCall-
	  back [0mis invoked and contains a list of all selected
	  items.  The _s_e_l_e_c_t_i_o_n__t_y_p_e field is set to [1mXmINITIAL[0m.

	  Modify a selection by pressing and holding the shift
	  key, moving to the new endpoint, and pressing the
	  select button.  The items between the initial start
	  point and the new end point are selected.  The rest of
	  the selection process proceeds as above.  Any previous
	  selections are not unselected.  When the select button
	  is released, the [1mXmNextendedSelectionCallback [0mis
	  invoked and contains a list of all selected items, both
	  new and previous.  The _s_e_l_e_c_t_i_o_n__t_y_p_e field is to [1mXmMO-
	  DIFICATION[0m.

	  Items can be added to or deleted from a selected range
	  by using the CTRL key. To add an additional range to an
	  existing selection, move to the first item of the new
	  group, press and hold the CTRL key, and then press the
	  select button. The item under the pointer inverts; any
	  previous selections are unaffected. This item becomes
	  the initial item for the new selection range. If the
	  pointer is dragged through additional items while the
	  CTRL key and select button are held down, those items
	  invert as described above. When the select button is
	  released, the [1mXmNextendedSelectionCallback [0mis invoked
	  and contains a list of all selected items, both new and
	  previous.  The _s_e_l_e_c_t_i_o_n__t_y_p_e field is set to [1mXmADDI-
	  TION[0m.

	  To delete an item or a range of items from an existing
	  selection, move to the first item to be deselected,
	  press and hold the CTRL key, and then press the select
	  button. The item under the pointer returns to its nor-
	  mal visual state to indicate that it is no longer in
	  the selection. This item becomes the initial item for
	  the range to be deselected. If the pointer is dragged
	  through additional selected items while the CTRL key
	  and select button are held down, those items will be
	  deselected. Any other selections are unaffected.  When
	  the select button is released, the [1mXmNextendedSelec-
	  tionCallback [0mis invoked and contains a list of remain-
	  ing selected items, both new and previous.  The
	  _s_e_l_e_c_t_i_o_n__t_y_p_e field is set to [1mXmADDITION[0m.




Printed 23/11/93					       10






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



	  A range of items can also be deselected by setting the
	  initial item for the range as described above, then
	  moving to the end of the range, and pressing the select
	  button while holding the Shift key down. All items
	  between the two endpoints will be deselected. When the
	  button is released, the [1mXmNextendedSelectionCallback
	  [0mwill be issued as described above.

	  If the [1mXmNautomaticSelection [0mresource is set to True,
	  the [1mXmNextendedSelectionCallback [0mis invoked when the
	  select button is pressed.  For each subsequent item the
	  user selects or deselects, the callback is invoked when
	  the pointer is moved into the item.  The _s_e_l_e_c_t_i_o_n__t_y_p_e
	  field is set to reflect the current action.  No selec-
	  tion callback is invoked when the button is released.

	  Keyboard selection in extended selection mode is accom-
	  plished by moving the keyboard highlight to the start
	  of the desired range and pressing the select key.  The
	  selection callback is invoked with a _s_e_l_e_c_t_i_o_n__t_y_p_e
	  value of [1mXmINITIAL[0m. Then, using the arrow keys, move
	  the keyboard highlight to the end of the range, depress
	  the Shift key, and press the select key.  The [1mXmNexten-
	  dedSelectionCallback [0mis invoked with a value of [1mXmMO-
	  DIFICATION[0m. Select additional ranges by moving to the
	  beginning of a range, pressing the select key while
	  depressing the CTRL key, and then moving to the end of
	  the range and pressing the select key while holding the
	  Shift key. Erase previously selected elements by moving
	  to them and pressing the select key while holding down
	  the CTRL key. In all cases, callbacks are issued as
	  described above.

	  When using the keyboard with the [1mXmNautomaticSelection
	  [0mresource set to True, the [1mXmNextendedSelectionCallback
	  [0mis invoked when the select button is pressed.  For each
	  subsequent item the user selects, the callback is
	  invoked when the pointer is moved into the item if
	  there are modifier keys in use.  For example, start the
	  selection by pressing the select key, and then extend
	  it by using the arrow keys while holding down the Shift
	  key. The _s_e_l_e_c_t_i_o_n__t_y_p_e field is set to reflect the
	  current action. There is no selection callback invoked
	  when the button is released.

     [1mXmDEFAULT-ACTION (Double Click)
	  [0mIf an object is clicked twice within the interval
	  defined by the [1mXmNdoubleClickInterval [0mresource, the
	  List interprets that as a double click and the [1mXmNde-
	  faultActionCallback [0mis invoked. The item inverts to
	  indicate its selection.




Printed 23/11/93					       11






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



     [1mDefault Translations
     [0mThe following are the default Translations for XmList:

     [1mButton1<Motion>:	      ListButtonMotion()
     Shift  Ctrl ~Meta<Btn1Down>:ListShiftCtrlSelect()
     Shift  Ctrl ~Meta<Btn1Up>:ListShiftCtrlUnSelect()
     Shift  Ctrl ~Meta<KeyDown>space:ListKbdShiftCtrlSelect()
     Shift  Ctrl ~Meta<KeyUp>space:ListKbdShiftCtrlUnSelect()
     Shift  Ctrl ~Meta<KeyDown>Select:ListKbdShiftCtrlSelect()
     Shift  Ctrl ~Meta<KeyUp>Select:ListKbdShiftCtrlUnSelect()
     Shift  ~Ctrl ~Meta<Btn1Down>:ListShiftSelect()
     Shift  ~Ctrl ~Meta<Btn1Up>:ListShiftUnSelect()
     Shift  ~Ctrl ~Meta<KeyDown>space:ListKbdShiftSelect()
     Shift  ~Ctrl ~Meta<KeyUp>space:ListKbdShiftUnSelect()
     Shift  ~Ctrl ~Meta<KeyDown>Select:ListKbdShiftSelect()
     Shift  ~Ctrl ~Meta<KeyUp>Select:ListKbdShiftUnSelect()
     Ctrl  ~Shift ~Meta<Btn1Down>:ListCtrlSelect()
     Ctrl  ~Shift ~Meta<Btn1Up>:ListCtrlUnSelect()
     Ctrl  ~Shift ~Meta<KeyDown>space:ListKbdCtrlSelect()
     Ctrl  ~Shift ~Meta<KeyUp>space:ListKbdCtrlUnSelect()
     Ctrl  ~Shift ~Meta<KeyDown>Select:ListKbdCtrlSelect()
     Ctrl  ~Shift ~Meta<KeyUp>Select:ListKbdCtrlUnSelect()
     ~Shift ~Ctrl ~Meta<Btn1Down>:ListElementSelect()
     ~Shift ~Ctrl ~Meta<Btn1Up>:ListElementUnSelect()
     ~Shift ~Ctrl ~Meta<KeyDown>space:ListKbdSelect()
     ~Shift ~Ctrl ~Meta<KeyUp>space:ListKbdUnSelect()
     ~Shift ~Ctrl ~Meta<KeyDown>Select:ListKbdSelect()
     ~Shift ~Ctrl ~Meta<KeyUp>Select:ListKbdUnSelect()
     Shift Ctrl ~Meta<Key>Up: ListShiftCtrlPrevElement()
     Shift Ctrl ~Meta<Key>Down:ListShiftCtrlNextElement()
     Shift ~Ctrl ~Meta<Key>Up:ListShiftPrevElement()
     Shift ~Ctrl ~Meta<Key>Down:ListShiftNextElement()
     ~Shift Ctrl ~Meta<Key>Up:ListCtrlPrevElement()
     ~Shift Ctrl ~Meta<Key>Down:ListCtrlNextElement()
     ~Shift ~Ctrl ~Meta<Key>Up:ListPrevElement()
     ~Shift ~Ctrl ~Meta<Key>Down:ListNextElement()
     <Enter>:		      ListEnter()
     <Leave>:		      ListLeave()
     <FocusIn>:               ListFocusIn()
     <FocusOut>:	      ListFocusOut()
     <Unmap>:		      PrimitiveUnmap()
     Shift<Key>Tab:	      PrimitivePrevTabGroup()
     <Key>Tab:		      PrimitiveNextTabGroup()
     <Key>Home:               PrimitiveTraverseHome()


     Keyboard Traversal
     [0mFor those actions not inherited from [1mXmPrimitive(3Xm)[0m, key-
     board traversal is described in the behavior section of this
     man page.





Printed 23/11/93					       12






XmList(3Xm)	    UNIX Programmer's Manual	      XmList(3Xm)



[1mRELATED INFORMATION
     Core(3Xm)[0m, [1mXmCreateList(3Xm)[0m, [1mXmCreateScrolledList(3Xm),
     XmFontListCreate(3Xm) XmListAddItem(3Xm),
     XmListAddItemUnselected(3Xm), XmListDeleteItem(3Xm),
     XmListDeletePos(3Xm), XmListDeselectItem(3Xm),
     XmListDeselectAllItems(3Xm), XmListSelectItem(3Xm),
     XmListSetHorizPos(3Xm), XmListSetItem(3Xm),
     XmListSetPos(3Xm), XmListSetBottomItem(3Xm),
     XmListSetBottomPos(3Xm), XmListSelectPos(3Xm),
     XmListDeselectPos(3Xm), and XmListItemExists(3Xm),
     XmPrimitive(3Xm), and XmStringCreate(3Xm).












































[0mPrinted 23/11/93					       13



[0m