Blob Blame History Raw
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH XmMultiList 3x ""
.SH NAME
\fBXmMultiList\fP \(em The Multi-column List widget
.SH SYNOPSIS
.nf
#include <Xm/MultiList\&.h>
.fi
.SH DESCRIPTION
.PP
This widget contains a multi-column list with headers along the top and a search area 
along the bottom. The list has scrollbars along the right and bottom edges that allow 
vertical and horizontal scrolling both by column and by pixel. The portion of the list 
data that is currently visible can be altered by scrollbar actions, widget resource setting 
and the redisplay of the list data after a string search has been successful. The sorting 
of elements within a particular column is also supported. To sort the list by the elements 
in a given column, select the column's title.
.PP
To search for a particular string in the list, type the string value to be searched for in 
the list's associated text field and then press the "Find" pushbutton. The search for the 
string begins in the currently selected row, after the location of the previously 
searched for string, or at the first column and first row if there is no column selected. 
If the string is not found in that row, then the search continues through all rows after 
and then before, the currently selected row. If the string is found, the display of the 
list is adjusted to make the string visible. If the string was not found, or if the string is 
visible, the application will issue a warning beep.
.PP
Pointer button one allows the user to select a row or a column for sorting. The callbacks 
on the doubleClickCallback list are called when the user double clicks pointer 
button one. If the list data can contain a row pixmap to display at the extreme left of 
the row.
.SS "Classes"
.PP
MultiList inherits behavior, resources, and traits from \fBCore\fP,
\fBComposite\fP, \fBConstraint\fP, and
\fBXmManager\fP\&.
.PP
The class pointer is \fBxmMultiListWidgetClass\fP\&.
.PP
The class name is \fBXmMultiList\fP\&.
.SS "New Resources"
.PP
The 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 \fB\&.Xdefaults\fP file,
remove the \fBXmN\fP or \fBXmC\fP prefix and use the remaining letters\&.
To specify one of the defined values for a resource in a \fB\&.Xdefaults\fP
file, remove the \fBXm\fP prefix and use the remaining letters (in
either lowercase or uppercase, but include any underscores between
words)\&. The codes in the access column indicate if the given resource
can be set at creation time (C), set by using \fBXtSetValues\fP
(S), retrieved by using \fBXtGetValues\fP (G), or is not
applicable (N/A)\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmMultiList Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNcolumnTitlesXmCColumnTitlesXmString *NULLCSG
_____
XmNdoubleClickCallbackXmCCallbackXtCallbackListNULLC
_____
XmNentryDataXmCEntryDataXtPointerNULLCSG
_____
XmNfindLabelXmCFindLabelXmStringFindCSG
_____
XmNfirstColumnXmCFirstLocationshort0CSG
_____
XmNfirstColumnPixmapsXmCFirstColumnPixmapsBooleanFalseCSG
_____
XmNfirstRowXmCFirstLocationshort0CSG
_____
XmNfontListXmCFontListXmFontListdynamicCSG
_____
XmNheightXmCHeightDimension300CSG
_____
XmNnumColumnsXmCNumColumnsshort0CSG
_____
XmNnumRowsXmCNumRowsshort0CSG
_____
XmNselectedColumnXmCSelectedColumnshort0CSG
_____
XmNselectionPolicyXmCSelectionPolicyunsigned charXmEXTENDED_SELECTCSG
_____
XmNshowFindXmCShowFindBooleanTrueCSG
_____
XmNsingleSelectionCallbackXmCCallbackXtCallbackListNULLCSG
_____
XmNsortFunctionsXmCFunctionXmMultiListSortFunction **NULLCSG
_____
XmNtitleXmCTitleXmStringNULLCSG
_____
XmNwidthXmCWidthDimension300CSG
_____
.TE
.IP "\fBXmNcolumnTitles\fP" 10
This is an array of length numColumns of strings displayed at the top of each 
column. The data is allocated and maintained by the client.
.IP "\fBXmNdoubleClickCallback\fP" 10
All routines in this list will be called whenever the user double clicks on a row in 
the list.
.IP "\fBXmNentryData\fP" 10
This resource is the data associated with each row in the list. The data is an array
of XmMultiListRowInfo structures of length numRows allocated by the client. The data
is allocated and maintained by the client. The XmMultiListRowInfo structure is defined
below.
.IP "\fBXmNfindLabel\fP" 10
The label to be shown on the find button. 
.IP "\fBXmNfirstColumn\fP" 10
This resource allows the client to adjust the current view of the list data to have a 
new top left column location. When setting this resource, firstRow should also be 
updated.
.IP "\fBXmNfirstColumnPixmaps\fP" 10
This resource specifies that the pixmap stored in the row info structure should be 
used instead of XmMultiListRowInfo values[0]. If pixmaps are present, the rows may be 
dragged by pressing on the pixmap with pointer button three. If this resource is 
True, then values[0] is never referenced. If False, then the XmMultiListRowInfo data 
pixmap is never referenced. 
.IP "\fBXmNfirstRow\fP" 10
This resource allows the client to adjust the current view of the list data to have a 
new top left row location. When setting this resource, firstColumn should also 
be updated.
.IP "\fBXmNfontList\fP" 10
This is an OSF/Motif style font list. The first font in this list will be used to 
display all text in the MultiList widget. The MultiList widget currently 
supports only one font.
.IP "\fBXmNheight\fP" 10
This is the overall height value assigned to the MultiList widget. Modifying 
this resource will affect scrollbar size and location.
.IP "\fBXmNnumColumns\fP" 10
.IP "\fBXmNnumRows\fP" 10
These resources specify the number of columns and rows the widget expects to 
display. These resources are used as the maximum indices for many of the other 
resources in this widget. Care should be taken when modifying these resources to 
ensure that the other values have also been modified.
.IP "\fBXmNselectedColumn\fP" 10
This is the index of the currently selected column. This also the column by which 
the list is being sorted.
.IP "\fBXmNselectionPolicy\fP" 10
Defines the interpretation of the select action. This resource can have the values 
XmSINGLE_SELECT or XmEXTENDED_SELECT. Other values result in 
undefined behavior.
.IP "\fBXmNshowFind\fP" 10
This boolean manages and unmanages the find button
.IP "\fBXmNsingleSelectionCallback\fP" 10
All routines in this list will be called whenever the user clicks on a line in the list. 
A pointer to the XmMultiListRowInfo structure corresponding to the line selected is passed 
as call_data. If in extended select mode the value of call_data is undefined.
.IP "\fBXmNsortFunctions\fP" 10
This is an array of functions, one for each column, called to determine the 
ordering of the rows in the column, similar to qsort.
.IP "\fBXmNtitle\fP" 10
This is the title that is displayed at the top of the MultiList widget.
If this value is NULL, the title area will not be shown.
.IP "\fBXmNwidth\fP" 10
This is the overall width value assigned to the MultiList widget. Modifying 
this resource will affect scrollbar size and location.
.PP
.SS "Specifying Children Resources"
.PP
The MultiList widget is composed of many simple widgets. In order to 
achieve full functionality of the Toolkit, it is sometimes desirable to set attribute 
values directly on those widgets. The widget ids of the sub-widgets can be 
obtained by using the XtNameToWidget() function provided by the Xt 
Intrinsics.
.PP
XmMultiList <named by application>

	XmLabel title

	XmScrollbar vertBar

	XmScrollBar horizBar

	XmFrame frame

		XmPushButton find

		XmText findText

.PP
.SS "Using the Resource Database"
.PP
The MultiList widget is actually a collection of pieces. It provides the geometry 
layout for the collection as well as tying together the pieces to form a consistent package. 
Many of the resources that are documented as being part of the MultiList 
widget are really part of the internal list sub-component. The MultiList widget 
will pass these values through to the proper child when they are set at time of creation 
or with XtSetValues or XtGetValues. However, when setting a resource via the resource 
database you must use either the name of the child or the general specification 
(*) rather than the specific one (.).
.PP
.SS "The XmMultiListRowInfo Structure"
.PP
The XmMultiListRowInfo structure is used to contain the entryData associated with each
Row in the List.
.PP
.nf
typedef struct {

	String * values;	/* The array of column strings */
	Pixmap pixmap;	/* mini-icon pixmaps. */
	Boolean selected;	/* row selected. */

	/*
	 * Provided for the convenience of the application programmer
	 */

	short * sort_id;
	XtPointer data;

	/*
	 * Private to the MultiList widget (do not modify these)
	 */

	short pix_width;	/* of the pixmap. */
	short pix_height;	/* of the pixmap. */
	short pix_depth;	/* of the pixmap. */

	Boolean old_sel_state;

} XmMultiListRowInfo;
.fi
.PP
\fIvalues\fP	This is an array of strings of length numColumns which 
represents the strings displayed in each column of this row. The 
data is allocated and maintained by the client. If 
firstColumnPixmaps is True, then value[0] is never referenced.
\fIpixmap\fP	This is the pixmap displayed to the left of this row. If 
firstColumnPixmaps is True then this value is never referenced 
and mayn remain unset. If no pixmap is desired for this row, even 
though firstColumnPixmaps is True, set the value of pixmap to 
None. Color pixmaps may be used.
\fIsort_id\fP	This is provided for the convenience of the client and is expected 
to be used as a sort index for this row. One value should be 
specified for each column of the row. See "sortFunctions" below 
for details.
\fIdata\fP	This is provided for the convenience of the client and may be 
used for any purpose. It is intended to be used as an identifier for 
the object pointed to by this row 
.PP
\fIselected\fP	This value is True if this row is selected; may be set by the 
application.
.PP
Neither \fIsort_id\fP nor \fIdata\fP are used by the MultiList widget;
they exist solely for the convenience of the programmer.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmManager Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
_____
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNforegroundXmCForegroundPixeldynamicCSG
_____
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
_____
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
_____
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
_____
XmNinitialFocusXmCInitialFocusWidgetdynamicCSG
_____
XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG
_____
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmTAB_GROUPCSG
_____
XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC
_____
XmNshadowThicknessXmCShadowThicknessDimensiondynamicCSG
_____
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBComposite Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNchildrenXmCReadOnlyWidgetListNULLG
_____
XmNinsertPositionXmCInsertPositionXtOrderProcNULLCSG
_____
XmNnumChildrenXmCReadOnlyCardinal0G
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBCore Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicN/A
_____
XmNancestorSensitiveXmCSensitiveBooleandynamicG
_____
XmNbackgroundXmCBackgroundPixeldynamicCSG
_____
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG
_____
XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderWidthXmCBorderWidthDimension0CSG
_____
XmNcolormapXmCColormapColormapdynamicCG
_____
XmNdepthXmCDepthintdynamicCG
_____
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
_____
XmNheightXmCHeightDimensiondynamicCSG
_____
XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC
_____
XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG
_____
XmNscreenXmCScreenScreen *dynamicCG
_____
XmNsensitiveXmCSensitiveBooleanTrueCSG
_____
XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG
_____
XmNwidthXmCWidthDimensiondynamicCSG
_____
XmNxXmCPositionPosition0CSG
_____
XmNyXmCPositionPosition0CSG
_____
.TE
.SS "Translations"
.PP
The following are the default translation bindings used by the icon button:
.PP
.TS
tab ();
l l.
~Ctrl ~Shift <Btn1Down>:ButtonDown()
Ctrl ~Shift  <Btn1Down>:ButtonDown(Toggle)
~Ctrl Shift  <Btn1Down>:ButtonDown(Extend)
Button1 <Motion>:Motion()
<Btn1Up>:ButtonUpOrLeave()
.TE
.PP
The following actions are supported by the MultiList:
.RS
.IP "\fBButtonDown(type)\fP" 10
Processes a button press action that may begin with 
either a select or a double click. The type argument can 
be either Toggle or Extend. These values determine 
which mode of an extended select will be initiated on 
this button event. Consult the OSF/Motif Style 
Guide for details.
.IP "\fBMotion()\fP" 10
Processes motion events to allow the selection region to 
be modified when in extended selection mode. It is 
assumed that this action is called between a 
ButtonDown() and ButtonUpOrLeave() action.
.IP "\fBButtonUpOrLeave()\fP" 10
Cleans up after ButtonDown() and Motion().
.RE
.SH Callback Routines
.PP
All procedures on the MultiList's singleSelectionCallback and doubleClickCallback 
lists will have a pointer to a XmMultiListRowInfo structure passed to them in the
call_data field. This structure is defined above.
.PP
Note: if a single SelectionCallback is registered on an MultiList in
extended_select_mode, the value of call_data is undefined.
.IP "" 10
\fBvoid\fP (callback)(\fBWidget\fP \fIw\fP, \fBXtPointer\fP \fIclient_data\fP, \fBXtPointer\fP \fIcall_data\fP)
.IP "\fIw\fP" 10
the MultiList widget
.IP "\fIclient_data\fP" 10
the client data specified by the application
.IP "\fIcall_data\fP" 10
a pointer to an XmMultiListRowInfo structure corrsponding the the row selected
.PP
.SH Sort Function
.PP
typedef \fBint\fP (XmMultiListSortFunction) (\fBshort\fP \fIcolumn\fP, \fBXmMultiRowInfo *\fP \fIrow1\fP, \fBXmMultiRowInfo *\fP \fIrow2\fP);
.IP "\fIcolumn\fP" 10
the column currently being sorted
.IP "\fIrow1\fP, \fIrow2\fP" 10
the two rows being compared. The return value must be an 
integer less than, equal to, or greater than 0, depending on 
whether the first argument is less than, equal to, or greater than 
the second.
.SH "RELATED"
.PP
\fBComposite\fP(3), \fBConstraint\fP(3),
\fBCore\fP(3),
\fBXmCreateMultiList\fP(3),
\fBXmManager\fP(3),
\fBXmMultiListDeselectAllItems\fP(3),
\fBXmMultiListDeselectItem\fP(3),
\fBXmMultiListDeselectItems\fP(3),
\fBXmMultiListDeselectRow\fP(3),
\fBXmMultiListGetSelectedRowArray\fP(3),
\fBXmMultiListGetSelectedRows\fP(3),
\fBXmMultiListMakeRowVisible\fP(3),
\fBXmMultiListSelectAllItems\fP(3),
\fBXmMultiListSelectItems\fP(3),
\fBXmMultiListSelectRow\fP(3),
and \fBXmMultiListToggleRow\fP(3)\&.

.PP
.SH COPYRIGHT
.PP
Copyright (c) 1992 by Integrated Computer Solutions, Inc.