SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Mandrake Other XITE-3.3-3.i386.rpm

MultiList

Section: Free Widget Foundation (3)
Updated: 19 May 1992
Index 

Name

MultiList - list from which multiple entries can be selected 

Synopsis

#include <X11/Intrinsic.h>#include <X11/MultiList.h>

widget = XtCreateManagedWidget(name, multiListWidgetClass, ...); 

Class Hierarchy

Core-->Simple-->MultiList 

Description

MultiList is a replacement for the Athena List widget, which allowsmultiple selections to be made. The aesthetics have also beenslightly improved: the highlight colors can now be selected, and theselection extends across the entire width of the column rather thanjust the length of the string.

The maximum number of multiple selections can be specified. Items areselected and unselected by an action interface. By default, mousebutton 1 is used to select, unselect, and toggle items. When themouse button is lifted, any callbacks in the callback list are calledwith a data structure which describes the count of select items, andlists the indices of the selected items. The return structurecontains some additional information describing the last item modifiedand the last action performed, which will probably not be of generaluse, 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).

 

Resources

In addition to the resources defined by superclasses, this widgetdefines the following:
NameClassTypeDefault
XtNbackgroundBackgroundPixelXtDefaultBackground
XtNborderBorderColorPixelXtDefaultForeground
XtNborderWidthBorderWidthDimension1
XtNcallbackCallbackXtCallbackListNULL
XtNcolumnWidthWidthDimension0
XtNcolumnSpacingSpacingDimension8
XtNcursorCursorCursorleft_ptr
XtNdefaultColumnsColumnsint1
XtNdestroyCallbackCallbackPointerNULL
XtNfontFontXFontStructXtDefaultFont
XtNforceColumnsColumnsBooleanFalse
XtNforegroundForegroundPixelXtDefaultForeground
XtNheightHeightDimension0
XtNhighlightBackgroundHBackgroundPixelXtDefaultForeground
XtNhighlightForegroundHForegroundPixelXtDefaultBackground
XtNinsensitiveBorderInsensitivePixmapGray
XtNlistListStringNULL
XtNlongestLongestint0
XtNmappedWhenManagedMappedWhenManagedBooleanTrue
XtNmaxSelectableValueint1
XtNnumberStringsNumberStringsint0
XtNpasteBufferBooleanBooleanFalse
XtNrowHeightHeightDimension0
XtNrowSpacingSpacingDimension2
XtNsensitiveSensitiveBooleanTrue
XtNsensitiveArrayListBooleanNULL
XtNtablistStringStringNULL
XtNtabsListintNULL
XtNverticalListBooleanBooleanFalse
XtNwidthWidthDimension0
XtNxPositionPosition0
XtNyPositionPosition0
 

Public Functions

void XfwfMultiListHighlightItem(mlw,item_index)XfwfMultiListWidget mlw;int item_index;

This routine selects an item with index <item_index> in the MultiListwidget <mlw>. If a maximum number of selections is specified andexceeded, the earliest selection will be unselected. If <item_index>doesn't correspond to an item the most recently clicked item will beset to -1 and this routine will immediately return, otherwise the mostrecently clicked item will be set to the current item.

void XfwfMultiListHighlightAll(mlw)XfwfMultiListWidget mlw;

This routine highlights all highlightable items in the MultiListwidget <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 theMultiList widget <mlw>. If <item_index> doesn't correspond to aselected item, then nothing will happen. Otherwise, the item isunselected and the selection 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 isunhighlighted and unhighlights it if it is already highlighted. Theaction performed by the toggle is returned (XfwfMultiListActionHighlightor XfwfMultiListActionUnhighlight).

XfwfMultiListReturnStruct *MultiListGetHighlighted(mlw)XfwfMultiListWidget mlw;

This routine takes a MultiList widget <mlw> and returns aMultiListReturnStruct whose num_selected and selected_items fieldscontain the highlight information. The action field is set toXfwfMultiListActionStatus, and the item_index and string fields areinvalid.

Boolean XfwfMultiListIsHighlighted(plw,item_index)XfwfMultiListWidget mlw;int item_index;

This routine checks if the item with index <item_index> is highlightedand 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 sensitivityinformation for the item with index <item_index> via the pointers<str_ptr>, <h_ptr> and <s_ptr>. If the item index is invalid, Falseis 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 MultiListwidget <mlw>. If <resize> is True, the MultiList widget will try toresize itself.

 

Restrictions

There are likely to be inadequacies in this code. Specifically, I amnot sure what the callback interface should look like when you canselect and unselect multiple items. This is the reason for theconfusing return structure fields. Please send bug reports andfeature requests to the email address below. 

Author

Brian Totty, tottyAATTcs.uiuc.eduDepartment of Computer Science,University of Illinois at Urbana-Champaign1304 W. Springfield AvenueUrbana, IL 61801


 

Index

Name
Synopsis
Class Hierarchy
Description
Resources
Public Functions
Restrictions
Author

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector