.TH ScrollingList 3w "19 July 91" "Version 3.0" "OLIT Widget Set"
.SH "CLASS NAME"
ScrollingList \- scrolling list widget
.SH "SYNOPSIS"
.	\"  phony BP macro for PostScript using -mex's CP
.	\"  
.	\"  made changes to:
.	\"  1) prevent $2 vertical space needed from forcing a page break
.	\"	this is necessary because large apparent offsets are used
.	\" 	when invoking the macro eg, .BP ATT_PS_file 6i -1i 
.	\"  	This is necessary to get the ATT PS figures onto the page,
.	\"  	Following the .BP macro, there is a .sp -3.5i to move back
.	\"  	up the page.  A page break happens if the test is performed.
.	\"  	So I fiddled it.
.	\"  
.	\" 	 removed test that forces page break
.	\"		.if (\\n(tYu-\\$8+1v)>(\\n(.tu-\\nz) \{ 
.	\"  
.	\"  	 added $8 to do a .sp -$8 back/upward space
.	\"  
.	\"  	 move ^B bottom-of-page-trap off page temporarily
.	\"  	  to print diagram, then restore it
.	\"  1a) Sept 90 renamed to .CP	 
.	\"  	 
.	\"  	 
.	\"  2) added other -mex functions
.	\"  	.FN - figure numbers
.	\"  	.TN - table numbers
.	\"  	.IX - index macro
.	\"  
.	\"  
.	\"  3) added .TH from mansun to get header name right
.	\"  
.	\"  4) added J series macros
.	\"  	JL	bold if nroff, listing if troff
.	\"  	JR	roman font
.	\"  	JS	= JL
.	\"  	JE	= JR
.	\"  
.	\"  
.	\"  
.	\"  obsoleted by putting them in a tbl with no box
.	\"  5a)	added nr Ji - indent for args in function prototypes
.	\"  5b)	JF macro to align args to function prototypes
.	\"	  \\$1 = type
.	\"	  \\$2 = name
.	\"	  \\$3 = allow enough space for a string this long
.	\"	    if \\n(Jf string variable is defined, it will
.	\"	    be used if $3 is not present
.	\"
.	\"  6) Jq macro to put a box around items at the beginning
.	\"     of an X resource in the widgets
.	\"     syntax: .Jq \fIclass\fP:XtCAlignment	\
.	\"     \fItype\fP:OlDefine	\fIdefault\fP:OL_CENTER	\fIaccess\fP:SGI
.	\"
.	\"	uses nr jq
.	\"
.	\"
.	\"
.	\"
.de Jo
.mk jo
 \\$1\h'2.0i-\w'\\$1'u'\
\\$2\h'1.5i-\w'\\$2'u'\
\\$3\h'1.5i-\w'\\$3'u'\\$4
.sp -.5
.nf
.\" original - for reference
.\"\h'-.5n'\L'|\\nzu-1'\l'\\n(.lu+1n\(ul'\L'-|\\nzu+1'\l'|0u-.5n\(ul'
\h'-.5n'\L'|\\n(jou-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jou+1'\l'|0u-.5n\(ul'
.fi
..
.de Jp
.mk jp
 \\fI\\$1\\fP:\0\\fL\\$2\\fP\h'1.5i-\w'\\fL\\$2\\fP'u'\
\\fI\\$3\\fP:\0\\fL\\$4\\fP\h'1.25i-\w'\\fL\\$4\\fP'u'\
\\fI\\$5\\fP:\0\\fL\\$6\\fP\h'1.0i-\w'\\fL\\$6\\fP'u'\
\\fI\\$7\\fP:\0\\fL\\$8\\fP\h'1.0i-\w'\\fL\\$8\\fP'u'
.sp -.5
.nf
\h'-.5n'\L'|\\n(jpu-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jpu+1'\l'|0u-.5n\(ul'
.fi
..
.de Jp
.mk jq
 \\fIclass\\fP:\0\\&\\fL\\$1\\fP\h'1.5i-\w'\\fL\\$1\\fP'u'\
\\fItype\\fP:\0\\&\\fL\\$2\\fP\h'1.25i-\w'\\fL\\$2\\fP'u'\
\\fIdefault\\fP:\0\\&\\fL\\$3\\fP\h'1.0i-\w'\\fL\\$3\\fP'u'\
\h'|5i'\\fIaccess\\fP:\0\\&\\fL\\$4\\fP\h'1.0i-\w'\\fL\\$4\\fP'u'
.sp -.5
.nf
\h'-.5n'\L'|\\n(jqu-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jqu+1'\l'|0u-.5n\(ul'
.fi
..
.de Jq
.if n class: \\$1\\t\tt\ttype: \\$2
.if n .br
.if n default: \\$3\\t\tt\taccess: \\$4
.if t \{\
.nr jw \w'\\fL\\$1\\fP'
.nr jw \\n(jw+\w'\\fL\\$2\\fP'
.nr jw \\n(jw+\w'\\fL\\$3\\fP'
.br
.mk jq
.ie \\n(jw>1300 \{\
 \\fIclass\\fP:\|\\&\\fL\\$1\0\fItype\\fP:\|\\&\\fL\\$2\0\
\\fIdefault\\fP:\|\\&\\fL\\$3\\fP\
\h'|4.9i'\\fIaccess\\fP:\|\|\\&\\fL\\$4\\fP\h'0.8i-\w'\\fL\\$4\\fP'u'\
\}
.el \{\
 \\fIclass\\fP:\|\\&\\fL\\$1\\fP\h'1.5i-\w'\\fL\\$1\\fP'u'\
\\fItype\\fP:\|\\&\\fL\\$2\\fP\h'1.25i-\w'\\fL\\$2\\fP'u'\
\\fIdefault\\fP:\|\\&\\fL\\$3\\fP\h'1.0i-\w'\\fL\\$3\\fP'u'\
\h'|5i'\\fIaccess\\fP:\|\\&\\fL\\$4\\fP\h'0.8i-\w'\\fL\\$4\\fP'u'\
\}
.sp -.5
.nf
\h'-.5n'\L'|\\n(jqu-1'\l'\\n(.lu-1.25i+1n\(ul'\L'-|\\n(jqu+1'\l'|0u-.5n\(ul'
.sp -1
\}
.fi
..
.nr Ji 16
.	\"
.de JF
.ie !"\\$3"" .nr  Jf \w'\\$3'
.el .nr Jf \w'\\*(Jf'
\\$1 \h'.25i+\\n(Jfu-\w'\\$1'u'\\$2
.br
..
.	\"
.	\"
.	\" I - italic font
.de I
.nr PQ \\n(.f
.if t .ft 2
.ie \\$1 .if n .ul 999
.el .if n .ul 1
.if t .if !\\$1 \{\
.	ie '\\*(.T'psc' \&\f\\n(PQ\\$3\fI\\$1\f\\n(PQ\\$2
.	el \&\f\\n(PQ\\$3\fI\\$1\|\f\\n(PQ\\$2
.\}
.if n .if \\n(.$=1 \&\\$1
.if n .if \\n(.$>2 \&\\$3\c
.if n .if \\n(.$>1 \&\\$1\c
.if n .if \\n(.$>1 \&\\$2
..
.	\" B - bold font
.de B
.nr PQ \\n(.f
.if t .ft 3
.ie \\$1 .if n .ul 999
.el .if n .ul 1
.if t .if !\\$1 \&\f\\n(PQ\\$3\fB\\$1\f\\n(PQ\\$2
.if n .if \\n(.$=1 \&\\$1
.if n .if \\n(.$>2 \&\\$3\c
.if n .if \\n(.$>1 \&\\$1\c
.if n .if \\n(.$>1 \&\\$2
..
.	\" R - Roman font
.de R
.if n .ul 0
.ft 1
..
.	\" L - listing font
.de L
.nr PQ \\n(.f
.ie \\$1 .if n .ul 999
.el .if n .ul 1
.if t .if !\\$1 \&\f\\n(PQ\\$3\fL\\$1\f\\n(PQ\\$2
.if n .if \\n(.$=1 \&\\$1
.if n .if \\n(.$>2 \&\\$3\c
.if n .if \\n(.$>1 \&\\$1\c
.if n .if \\n(.$>1 \&\\$2
..
.	\" LB - bold listing font
.de LB
.nr PQ \\n(.f
.ie \\$1 .if n .ul 999
.el .if n .ul 1
.if t .if !\\$1 \&\f\\n(PQ\\$3\f(LB\\$1\f\\n(PQ\\$2
.if n .if \\n(.$=1 \&\\$1
.if n .if \\n(.$>2 \&\\$3\c
.if n .if \\n(.$>1 \&\\$1\c
.if n .if \\n(.$>1 \&\\$2
..
.	\" LX - listing font with index
.	\"
.	\" - jl - invented these
.	\"
.de Lx
.L "\\$1" "\\$2" "\\$3"
.IX "\\$1" "" "\fL\\$1\f1"
..
.de Ix
.I "\\$1" "\\$2" "\\$3"
.IX "\\$1" "" "\fL\\$1\f1"
..
.de Bx
.I "\\$1" "\\$2" "\\$3"
.IX "\\$1" "" "\fL\\$1\f1"
..
.	\"
.	\" - jl - invented these
.	\"
.de JL
.if t .if \\n(.$=0 .ft L
.if t .if \\n(.$>0 .L "\\$1" "\\$2" "\\$3"
.if n .if \\n(.$=0 .ft B
.if n .if \\n(.$>0 .I "\\$1" "\\$2" "\\$3"
..
.de Jx
.ie t .Lx "\\$1" "\\$2" "\\$3"
.el  .Bx "\\$1" "\\$2" "\\$3"
..
.de JX
.ie t .Lx "\\$1" "\\$2" "\\$3"
.el  .Bx "\\$1" "\\$2" "\\$3"
..
.de JR
.ft 1
..
.de JS
.JL
.nf
..
.de JE
.JR
.fi
..
.\"	
.\"	start FN/TN related
.\"	
.\"	end FN/TN
.\"
.	\" TF - print TN or FN
.de TF
.nr TF \\n(.f
.nr TX \\n(.s
.	\" - jl force it to full page, rather than strip out stuff
.nr PL 3
.if \\n(PL=1 \{\
.	ta \\n(GIu-\\n(GUuR \\n(GIu 
.	ti 0
	\&\s11\\*(tS\t\fI\&\\$1\f\\n(TF\\s\\n(TX
.\}
.if \\n(PL=2 \{\
.	ta \\n(LLuR \\n(LLu+\\n(GUu 
.	nf
	\&\s11\fI\&\\$1\f\\n(TF\t\&\\*(tS\\s\\n(TX
.	fi
.\}
.if \\n(PL=3 \{\
.	ta 2iR 2.25i
.	ti 0
	\&\s11\0\0\\*(tS\t\fI\&\\$1\f\\n(TF\\s\\n(TX
.\}
..
.	\" TN - table name
.	\" changed \\n(PN to \\n%
.de TN
.nr T1 +1
.ll \\n(LLu
.ds tH \\$1
.	\" - jl only number, not chapter 
.	\".ds tS Table \\n(H1-\\n(T1
.ds tS Table \\n(T1
.if \\nM>1 .ds tS Table \\n(T1
.if !\\n(IK \{\
.	if \\n(nlu>\\n(L#u .sp 1v
.	if \\n(B#>0 .if \\n(B#u>=\\n(nlu .sp |\\n(B#u+2v
.	nr B# 0
.\}
.if \\n(IK \{\
.	sp 1v
.	ie \\n(K# \{\
.		sp |\\n(K#u+2v
.		nr K# 0 \}
.	el \{\
.		if \\n(B#u>=\\n(nlu .sp (\\n(B#u-\\n(nlu+1v)u
.		nr B# 0 \}
.\}
.ne 2i
.TF "\\*(tH"
.if \\nF .if \\n(IK \!.tm .CE T 1 "\\$1" \\\\n% \\n(H1 \\n(T1
.if \\nF .if !\\n(IK .tm .CE T 1 "\\$1" \\n% \\n(H1 \\n(T1
..
.	\" TC - table continued (multi-page)
.de TC
.if !\\n(tC \{\
.	as tH \(em Continued
.	nr tC 1
.\}
.TF "\\*(tH"
.sp \\n(PDu
..
.	\" FN - figure name
.de FN
.nr F1 +1
.ll \\n(LLu
.	\" - jl only number, not chapter too
.	\".ds tS Figure \\n(H1-\\n(F1
.ds tS Figure \\n(F1
.if \\nM>1 .ds tS Figure \\n(F1
.sp 1v
.TF "\\$1"
.if \\nF .if \\n(IK \!.tm .CE F 1 "\\$1" \\\\n% \\n(H1 \\n(F1
.if \\nF .if !\\n(IK .tm .CE F 1 "\\$1" \\n% \\n(H1 \\n(F1
..
.\"	
.\"	start IX index
.\"	
.	\" IX - Make an Index Entry
.	\" $1 and $2: primary and secondary collating terms
.	\" $3 and $4: primary and secondary printing terms
.	\" $5 and $6: PAGE specifications or PRINT field
.	\".de IX
.	\" - jl PN to %
.	\".if \\nF .if !\\n(IK .tm .IE\tENTRY\t\\$1\t\\$2\t\\$3\t\\$4\t\\$5\t\\$6\t\\n%
.	\".if \\nF .if \\n(IK \!.tm .IE\tENTRY\t\\$1\t\\$2\t\\$3\t\\$4\t\\$5\t\\$6\t\\\\n%
..
.\"	end IX index
.\"	
.\"	
.\"	
.\"	
.ig
.	\"
.	\" - jl added from -mansun 0
.	# title heading
.de TH
.PD
.DT
.nr F1 0
.if n .nr IN .5i
.if t .nr IN .5i
.ll 7i
.nr LL \\n(.l
.ds ]H \\$1\|(\|\\$2\|)
.ds ]D Misc. Reference Manual Pages
.	\" added this one - removed the rest
.if '\\$2'3W' .ds ]D OPEN LOOK Widgets
.if !'\\$4''  .ds ]W \\$4
.if !'\\$5''  .ds ]D \\$5
.ds ]D 3W
.wh 0 }H
.wh -.8i }F
.em }M
.if !\\n(nl .if !\\nP .nr P 1
.if !\\n(nl .if \\nP .pn \\nP
.if \\nA .if \\nP>=\\nA \{\
.	ds PN \\nP
.	pn 1
.	af % a
.	nr A 0
.\}
.if !\\n(nl .if \\nP .nr P 0
.if  \\nC .if \\n(nl .bp
.if  !\\nC .if \\n(nl .bp 1
.ds ]L modified \\$3
.nr ]L \\$3
.if \\n(]L=0 .rm ]L
.}E
.DT
.nr )I .5i
.nr )R 1i
.mk ka
.if !'\\n(ka'-1' .bp
.if \\nF .tm .CE MAN-PAGE 1 \\$1(\\$2) \\n%
.ev 1
.if n .tl \\*(]W\\*(]D\\*(]H
.ev
..
.	\" careful - only 1 return at bottom
.JL
.nf
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xol/OpenLook.h>
#include <Xol/ScrollingL.h>
 . . .
.br
.ds Jf Cardinal
.JF Widget "\fImy_scrollinglist\fP, \fImy_parent\fP;"
.JF String \fImy_name\fP;
.JF ArgList \fIargs\fP;
.JF Cardinal \fInum_args\fP;
.fi
.I my_scrollinglist
=  XtCreate( 
.I my_name , 
scrollingListWidgetClass,
.br
.in \n(Ji
.I my_parent ,
.I args ,
.I num_args );
.in
.br
 . . .
.br
.ds Jf WidgetClass
.JF Widget \fItextfield\fP;
.fi
XtSetArg( 
.I args[0] ,
XtNtextField,
(XtArgVal)
.I textfield ); &
.br
.fi
XtGetValues( 
.I my_scrollinglist ,
.I args ,
1);
.br
.JR
.fi
.SH "DESCRIPTION"
.IX "ScrollingList" "" "\fLScrollingList\fP"  PAGE MAJOR
.IX "scrolling list"
.IX "widget" "scrolling list"
.#
.#
.SS "Components"
.IX "components" "ScrollingList" "components" "\fLScrollingList\fP"
.LP
Each 
.JL "ScrollingList"
widget has the following parts:
.HP
\(bu border
.HP
\(bu current item
.HP
\(bu
current item border
.HP
\(bu
items
.HP
\(bu
scrollbar
.HP
\(bu
view
.br
.sp 
.LP
If the application allows the list to be edited in place
(in the view),
the 
.JL "ScrollingList"
widget uses the following component:
.HP
\(bu
editable text field
.FN "Scrolling List Components" Scrolling_List_Components_fig
.IX "ScrollingList components" "figure" "\fLScrollingList\fP components" "figure"
.IX "figures" "ScrollingList components" "figures" "\fLScrollingList\fP components"
.CP PSART/ScrollingList.components.ps 2.85i
.#
.#
.SS "Editable ScrollingList"
.IX "editable ScrollingList" "" "editable \fLScrollingList\fP
.LP
The application can choose whether to allow the end user to
eidt the items in a scrolling list.
The editable text field is the interface for entering the new
item,
and is described later.
Other aspects of the user interface for editing are controlled
by the application.
For example,
the application can attach a menu to the scrolling list
to allow the end user to select where a new item is to be inserted,
and can employ pop-up windows
to gather additional information about a new item.
.FN "Editable Scrolling List Additional Components" Editable_Scrolling_List_Additional_Components_fig
.IX "editable scrolling list additional components" "" "editable scrolling list additional components"
.CP PSART/ScrollingList.addcomponents.ps 2.25i
.#
.#
.SS "Subwidgets"
.IX "subwidgets" "ScrollingList"  "subwidgets" "\fLScrollingList\fP"
.LP
The
.JL ScrollingList
contains one subwidget, a
.JL TextField
provided automatically, and accessible through the
.JL XtNtextfield
resource.
.FN "ScrollingList Subwidgets" ScrollingList_Subwidgets_fig
.IX "ScrollingList subwidgets" "figure" "\fLScrollingList\fP subwidgets"
.IX "figures" "ScrollingList subwidgets" "figures" "\fLScrollingList\fP subwidgets"
ScrollingList
      |
      |
  TextField
(XtNtextField)
.#
.#
.SS "Editable TextField"
.IX "editable TextField" "ScrollingList"  "editable \fLTextField\fP" "\fLScrollingList\fP"
.LP
The application can request that the 
.JL "ScrollingList"
widget manage part
of the visual aspect of 
changing an
existing item in the view.
The 
.JL "TextField"
subwidget
implements this editable text field.
The 
.JL "ScrollingList"
widget manages the 
.Jx TextField
widget as
follows:
.HP
Opening/closing \(en
The application asks the 
.JL "ScrollingList"
widget to "open" and "close"
the editable text field.
Opening the editable text field widget maps it and positions it
so that,
as the end user types in the name of a new or changed item,
the name lines up with the existing item names.
Closing the editable text field widget unmaps it.
(As described below,
there may be times when the widget is unmapped yet still open.)
.HP
Editing \(en
If an existing item is being edited,
the application requests the editable text field to overlay the
item.
.HP
Insertion \(en
If a new item is being inserted,
the application requests items to be scrolled down in the view to
accommodate the editable text field.
.HP
Mapping \(en
The 
.JL "ScrollingList"
widget maps and unmaps the editable text field
widget; the application does not.
.HP
Scrolling \(en
If the end user scrolls the list while the editable text field is
still open,
the 
.JL "ScrollingList"
widget scrolls it with the rest of the items.
If it has to be scrolled out of the view,
it is scrolled out entirely,
causing it to be unmapped but not closed.
The application should not try to remap the child since it will be
remapped when the list is scrolled back again.
.HP
Setting/selecting \(en
If the end user attempts to make a selection or set a current
item,
the editable text field is automatically closed.
.LP
The application is responsible for handling the verification
callbacks of the editable text field
and for telling the 
.JL "ScrollingList"
widget to add a new item or change an
existing item as a result of the user input.
.SS "Selectable Scrolling List"
.IX "Selectable ScrollingList" "" "Selectable \fLScrollingList\fP"
.LP
The application can choose whether to allow the end user to
select items from a scrolling list.
If items can be selected,
they can be copied elsewhere as text,
and may be deletable ("cut").
.#
.#
.SS "Deleting Selected Items"
.IX "deleting selected items" "ScrollingList" "deleting selected items" "\fLScrollingList\fP"
.LP
The end user can delete selected items.
The 
.JL "ScrollingList"
widget provides some deletion capabilities through
the selection mechanisms
(see the discussion under "Selecting and Operating on the
Items" below),
and the application can provide other capabilities,
such as with a pop-up menu choice.
The application verifies that each selected item can be
deleted;
it is responsible for providing feedback to the end user for
any items it will not delete.
The 
.JL "ScrollingList"
widget updates the view to remove any deleted items.
.#
.#
.SS "Virtual List"
.SS "virtual list" "ScrollingList" "virtual list" "\fLScrollingList\fP"
.LP
The 
.JL "ScrollingList"
widget "virtualizes" the list to allow the
application to use list data structures best suited to its
needs.
The 
.JL "ScrollingList"
widget provides routines the application uses to
build and maintain a version of the list for the 
.JL "ScrollingList"
widget
to use.
With these routines, the application:
.RS
.HP
\(en
adds new items to the list;
.HP
\(en
deletes items from the list;
.HP
\(en
marks items as changed;
.HP
\(en
shifts the view to show a particular item;
.HP
\(en
and opens and closes the editable text field for a new or
changed item.
.RE
.LP
The application is responsible for defining callbacks that the
.JL "ScrollingList"
widgets invoke when the end user
attempts to change a Current item,
or cuts items from the list.
Each item is identified by the item name that is shown in the
view for the end user,
a token assigned by the 
.JL "ScrollingList"
widget that uniquely identifies
the item,
and an attributes
.I bit-vector
that
identifies
if the item is a current item.
.#
.#
.SS "Item Order"
.IX "item order, virtual list" "ScrollingList" "item order, virtual list" "\fLScrollingList\fP"
.LP
The list
is assumed to have an order defined by
the application.
As it adds items,
the application tells the 
.JL "ScrollingList"
widget where to insert
them:  either before an item already in the list
or at the end of the list.
.LP
The application may change the content of a list at any time,
including while it is displayed.
The widget updates the view,
if necessary,
to reflect the changed list.
To avoid unnecessary updates to the view when several changes
need to be made,
the application can tell the 
.JL "ScrollingList"
widget to avoid updates
until the changes are finished.
.#
.#
.SS "Setting Current Item"
.SS "setting current item" "ScrollingList" "setting current item" "\fLScrollingList\fP"
.LP
The end user can make one or more of the items
a current item,
as determined by the application,
by:
.RS
.HP
\(en
pressing SELECT over it,
.HP
\(en
or moving the input focus inside the border and typing the
first letter of the item's name.
.RE
.LP
Either of these actions causes a callback to the
application,
which can decide if the item should be made a current item,
remain a current item,
or be changed to a regular item,
depending on the current state of the item and the needs of the
application.
Thus, the application can make the scrolling list behave as a
set of exclusive or nonexclusive items.
.LP
Pressing SELECT also starts a selection,
as described below.
.#
.#
.SS "Selecting Items"
.IX "selecting items" "ScrollingList" "selecting items" "\fLScrollingList\fP"
.LP
The 
.JL "ScrollingList"
widget allows
selection
operations on the items.
items that are moved or copied from the view are treated as a
newline-separated list of text items,
in the order they appear in the scrolling list,
with no leading or trailing blanks on any item.
.TP
Selecting a single item
Clicking SELECT on an item selects it and deselects any
other active selection on the screen.
.TP
Selecting other items
Clicking ADJUST on an item toggles its state,
making an unselected item selected and a selected item
unselected.
.TP
Wipe-through selection, with SELECT
Pressing and dragging SELECT over items selects them and
deselects any other active selection on the screen.
.sp
The selection starts with the item where SELECT is pressed
and extends to the item where SELECT is released.
If the pointer moves above or below the view,
the view scrolls additional items into the view,
selecting them as well.
.sp
The rate at which items scroll into the view is the same as
when pressing SELECT on the up or down arrows of the Scrollbar.
The pointer can move out of the view to the left or right
without interrupting the selection.
.TP
Wipe-through selection, with ADJUST"
Pressing and dragging ADJUST marks the bounds of a selection
the same way as
pressing and dragging SELECT,
except that the items covered are "toggled".  (Previously
selected items are deselected and previously unselected items
are selected.)
.TP
Copying items
Pressing COPY copies any selected items to the clipboard and
deselects them.
.TP
Cutting items
Pressing CUT moves any selected items to the clipboard and
deletes them from the list.  This operation is allowed only if the
scrolling list is editable.
.LP
.#
.#
.SS "Coloration"
.IX "coloration" "ScrollingList" "coloration" "\fLScrollingList\fP"
.LP
On a monochrome display, the
.JL ScrollingList
widget indicates that it
has input focus by 
inverting foreground and background colors.
When an editable Text Field has input focus, it shows that
it has input focus by showing an active caret.
.LP
On color displays,
the
.JL ScrollingList
widget shows that the current item has input focus by
filling the background of the current item with the input focus
color set in the 
.Jx XtNinputFocusColor
resource.
When a selected item has input focus, the label is drawn with
the input focus color.
When an item is both selected and current, it shows that it
has input focus by drawing the text of the label in the 
input focus color.
When an editable
.JL TextField
has input focus, it shows that
it has input focus by showing an active caret in the input focus
color.
.LP
.B EXCEPTIONS:
.LP
If the input focus color is the same as either the background,
foreground, or font color, then revert to the monochrome
coloration scheme.
The
.JL Scrollbar
subwidgets inherit their
.XtNforeground
and
.XtNbackground
colors from the
.JL ScrollingList
parent at initialization time.
If the colors are subsequently changed in the parent, the 
subwidgets' colors ahange also.
.LP
.XR The following diagrams illustrates the resources that affect
the coloration of the 
.JL "ScrollingList"
widget.
.FN "ScrollingList Coloration"
.IX "ScrollingList coloration" "figure" "\fLScrollingList\fP coloration" "figure"
.IX "figures" "ScrollingList coloration" "figures" "\fLScrollingList\fP coloration"
.CP PSART/ScrollingList.color.ps  2.75i
.FN "Selected Item and Unselected Item Coloration"
.IX "ScrollingList item coloration" "figure" "\fLScrollingList\fP item coloration" "figure"
.IX "figures" "ScrollingList item coloration" "figures" "\fLScrollingList\fP item coloration" 
.CP PSART/ScrollingList.itemcolor.ps 2.5i
.#
.#
.SS "Keyboard Traversal"
.IX "keyboard traversal" "ScrollingList" "keyboard traversal" "\fLScrollingList\fP" 
.LP
The default value of the \f4XtNtraversalOn\fP resource is True.
.LP
The ScrollingList widget responds to the following keyboard navigation keys:
.IP \(em 1.5P
NEXT_FIELD moves to the next traversable widget in the window
.IP \(em 1.5P
PREV_FIELD moves to the previous traversable widget in the window
.IP \(em 1.5P
NEXTWINDOW moves to the next window in the application
.IP \(em 1.5P
PREVWINDOW moves to the previous window in the application
.IP \(em 1.5P
NEXTAPP moves to the first window in the next application
.IP \(em 1.5P
PREVAPP moves to the first window in the previous application
.IP \(em 1.5P
MOVEUP moves the input focus up one line
.IP \(em 1.5P
MOVEDOWN moves the input focus down one line
.IP \(em 1.5P
PANESTART moves the input focus to the first item in the pane
.IP \(em 1.5P
PANEEND moves the input focus to the last item in the pane
.IP \(em 1.5P
SCROLLUP scrolls up one item in the list
.IP \(em 1.5P
SCROLLDOWN scrolls down one item in the list
.IP \(em 1.5P
SCROLLTOP scrolls to the first item in the list
.IP \(em 1.5P
SCROLLBOTTOM scrolls to the last item in the list
.IP \(em 1.5P
PAGEUP scrolls up one page so that the first item visible is
the last item visible in the pane
.IP \(em 1.5P
PAGEDOWN scrolls down one page so that the last item visible is
the first item visible in the pane
.LP
When an Editable Text Field is in the ScrollingList, the keyboard
traversal keys defined for \f4TextField\fP widgets apply.
.LP
The SELECTKEY selects the Current Item and unselects any other
active selection on the screen.
The ADJUSTKEY toggles the Current Item's state, making an
unselected Item selected and a selected Item unselected.
.LP
Note that the scrolling keys of interest are defined with in the
ScrollingList and traversal to the Scrollbar is not necessary to manipulate
the ScrollingList.
.LP
.nf
.nf
Scrolling  List  Activation Types   
_                                   
Activation Type  Expected   Results 
_                                   
                                    
OL_MENUKEY Popup scrolling  List    
.fi
.#
.#
.SS "Keyboard Mnemonic Display"
.IX "keyboard mnemonic display" "ScrollingList" "keyboard mnemonic display" "\fLScrollingList\fP"
.LP
The 
.JL ScrollingList
widget displays the mnemonic accelerator for
each item as part of its label.
If the mnemonic character is in the label, then
that character is displayed/highlighted according to the
value returned by
.Jx OlQueryMnemonicDisplay() .
If the mnemonic character is not in the label,
it is displayed to the right of the label in
parentheses and highlighted according to the
value returned by
.Jx OlQueryMnemonicDisplay() .
.LP
If truncation is necessary, the mnemonic displayed
in parentheses is truncated as a unit.
.SH "RESOURCES"
.LP
.br
\(bu These defaults are set to agree with those of the 
.JL ScrollingList
widget
.TN "ScrollingList Resource Set" Scrolling_List_Resource_Set_tbl
.IX "ScrollingList Resource Set" "" "\fLScrollingList Resource Set\fP"
.nf
.nf
ScrollingList        Resource         Set                        
Name                 Type             Default             Access 
                                                                 
XtNancestorSensitive Boolean          TRUE                G      
XtNapplAddItem       OlListToken(*)() (n/a)               G      
XtNapplDeleteItem    void(*)()        (n/a)               G      
XtNapplEditClose     void(*)()        (n/a)               G      
XtNapplEditOpen      void(*)()        (n/a)               G      
XtNapplTouchItem     void(*)()        (n/a)               G      
XtNapplUpdateView    void(*)()        (n/a)               G      
XtNapplViewItem      void(*)()        (n/a)               G      
XtNbackground        Pixel            XtDefaultBackground SGI    
XtNbackgroundPixmap  Pixmap           (n/a)               SGI    
XtNborderColor       Pixel            XtDefaultForeground SGI    
XtNborderPixmap      Pixmap           (n/a)               SGI    
XtNconsumeEvent      XtCallbackList   NULL                SG     
XtNdepth             int              (parent's)          GI     
XtNdestroyCallback   XtCallbackList   NULL                SI     
XtNfont              XFontStruct*     (OPEN               LOOK   
XtNfontColor         Pixel            XtDefaultForeground SGI    
XtNforeground        Pixel            XtDefaultForeground SGI    
XtNheight            Dimension        (calculated)        SGI    
XtNinputFocusColor   Pixel            Black               SGI    
XtNlistPane          Widget           NULL                G      
XtNmappedWhenManaged Boolean          TRUE                SGI    
XtNprefMaxWidth      Dimension        0                   SGI    
XtNprefMinWidth      Dimension        0                   SGI    
XtNrecomputeWidth    Boolean          TRUE                SGI    
XtNreferenceName     String           NULL                GI     
XtNreferenceWidget   Widget           NULL                SGI    
XtNresizeCallback    XtCallbackList   NULL                SGI    
XtNselectable        Boolean          TRUE                SGI    
XtNsensitive         Boolean          TRUE                GIO    
XtNtextField         Widget           (none)              G      
XtNtraversalOn       Boolean          TRUE                SGI    
XtNuserData          XtPointer        NULL                SGI    
XtNuserDeleteItems   XtCallbackList   NULL                SI     
XtNuserMakeCurrent   XtCallbackList   NULL                SI     
XtNviewHeight        Dimension        (none)              SI     
XtNwidth             Dimension        (calculated)        SGI    
XtNx                 Position         0                   SGI    
XtNy                 Position         0                   SGI    
.fi
.br
\(dg see
.BR resources (3w)
.br
.SS "OlListItem Structure"
.IX "OlListItem structure" "" "\fLOlListItem\fP structure"
.LP
Several of the resources defined below use the following
.JL "OlListItem"
structure:
.JL
.nf
typedef struct _OlListItem {
        OlDefine    \fIlabel_type\fP;
        XtPointer   \fIlabel\fP;
        XImage      *\fIglyph\fP;
        OlBitMask   \fIattr\fP;
	XtPointer   \fIuser_data\fP;
	unsigned char \fImnemonic\fP;
} OlListItem;
.fi
.JR
.HP
.I "label_type" " \(en"
identifies the type of label to display for the Item in the
view.
It can have one of the values:
.RS
.HP
.Jx "OL_STRING"
for a text label;
.HP
.Jx "OL_IMAGE"
for an image label.
.LP
.B "Note:"
Only text labels are supported in this version of the 
.JL "ScrollingList"
widget, so the only value allowed is
.Jx "OL_STRING" .
.sp
Any other legal values generate an error message that tells
the application programmer that the value is not yet supported.
Any illegal values generate a different error message.
.RE
.HP
.I label  " \(en"
is what to display for the Item in the view.
The type of the value of this member depends on the value of
the
.I "label_type"
member:
.RS
.HP
.Jx "OL_STRING"
for a
.Jx "String"
.HP
.Jx "OL_IMAGE"
for a
.Jx "XImage" *
.RE
.HP
.I "glyph" " \(en"
is currently unused.
.HP
.I "attr" " \(en"
defines attributes of the Item.
It is a  32-bit vector with the field:
.RS
.LP
.Jx "OL_LIST_ATTR_APPL"
available for application use.
This field consists of the low-order 16 bits,
to be used as
the application sees fit.
.LP
.Jx "OL_LIST_ATTR_CURRENT"
if the Item is a current item.
.LP
Other bit values are defined but should not be used by the
application.
.HP
.I "mnemonic"  " \(en"
is a single character that is used as a mnemonic accelerator for
keyboard traversal.
.RE
.SS "OlListToken Structure"
.IX "OlListToken Structure" "" "\fLOlListToken\fP Structure"
The 
.JL "ScrollingList"
widget identifies each item with a "token" of type
.Jx "OlListToken" .
The 
.JL "ScrollingList"
widget assigns the token when an item is added by the
application,
and the application uses the token in later references to the
item.
A zero value is allowed in some contexts where an
.Jx "OlListToken"
is expected,
as a way to refer to no item.
.LP
As a convenience to the application,
the macro
.JL "OlListItemPointer(token)"
.IX "OlListItemPointer" "" "\fLOlListItemPointer\fP"
converts an
.Jx "OlListToken"
value into a pointer to the corresponding
.Jx "OlListItem" .
The application can change the values of the
.Jx "OlListItem"
members,
but should let the 
.JL "ScrollingList"
widget know that they have changed,
using the
.Jx "XtNapplTouchItem"
routine.
No checking is done for incorrect
.Jx "OlListToken"
arguments to the
.Jx "OlListItemPointer"
macro.
.	\" - jl
.LP
The
.Jx "OlListToken"
value can be coerced into the type
.Jx "caddr_t"
and back without loss of precision.
.SS "XtNapplAddItem"
.IX "XtNapplAddItem" "" "\fLXtNapplAddItem\fP"
.Jq XtCApplAddItem OlListToken(*)() (n/a) G
.HP
Action: points to a routine the application can
call when it adds a new item to the list.
.HP
Synopsis:
.nf
.RS
.JL
OlListToken (*applAddItem)(), \fItoken\fP;
static Arg \fIquery\fP[] = {
        { XtNapplAddItem, (XtArgVal)&applAddItem }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
\fItoken\fP = (*\fIapplAddItem\fP)(\fIwidget\fP, \fIparent\fP, \fIreference\fP, \fIitem\fP)
Widget \fIwidget\fP;
OlListToken \fIparent\fP, \fIreference\fP;
OlListItem \fIitem\fP;
.RE
.JR
.fi
.sp
.HP
.I "widget" " \(en"
identifies the 
.JL "ScrollingList"
widget instance.
.HP
.I "parent" " \(en"
should be set to 0, for compatibility with future changes.
.HP
.I "reference" " \(en"
identifies an item before which to insert the new item.
This value can be zero to append the new item to the list.
.HP
.I "item" " \(en"
describes the new item.
.RS
.LP
The content of the
.Jx "OlListItem"
structure is copied by the 
.JL "ScrollingList"
widget into space that it
maintains;
however,
the data pointed to by the
.I "label"
and
.I "glyph"
members are not copied.
The application can access the copied data directly,
using the
.Jx "OlListItemPointer()"
macro to get a pointer to the
.Jx "OlListItem"
structure for the item.
.LP
If it changes the data,
the application should use the
.Jx "XtNapplTouchItem"
routine to let the 
.JL "ScrollingList"
widget know the data has changed.
.RE
.LP
If mapped and if allowed by the application
(see
.Jx "XtNapplUpdateView"
),
the 
.JL "ScrollingList"
widget updates the view if the new item will be in
the view.
The view is changed as little as possible:
if the new item is in the upper half of the view, the items
above it are scrolled up and the top item is scrolled off;
if the new item is in the lower half of the view, the items
below it are scrolled down and the bottom item is scrolled off.
.LP
This routine is also used to build the item list from scratch.
.SS "XtNapplDeleteItem"
.IX "XtNapplDeleteItem" "" "\fLXtNapplDeleteItem\fP"
.Jq XtCApplDeleteItem void(*)() (n/a) G
.HP
Action: points to a routine the application can
call when it deletes an item from the list.
.HP
Synopsis:
.nf
.RS
.JL
void (*applDeleteItem)();
static Arg \fIquery\fP[] = {
        { XtNapplDeleteItem, (XtArgVal)&applDeleteItem }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
(*applDeleteItem)(\fIwidget\fP, \fItoken\fP)
Widget \fIwidget\fP;
OlListToken \fItoken\fP;
.RE
.JR
.fi
.HP
.I "widget" " \(en"
identifies the 
.JL "ScrollingList"
widget instance.
.HP
.I "token" " \(en"
identifies the deleted item.
.LP
If mapped and if allowed by the application
(see
.Jx "XtNapplUpdateView"
),
the 
.JL "ScrollingList"
widget updates the view if the deleted item was
visible.
.LP
The view is changed as little as possible:
.RS
.HP
If the deleted item was in the upper half of the view,
items above it are scrolled down and an item is scrolled in
from the top;
.HP
If the deleted item was in the lower half of the view,
items below it are scrolled up and an item is scrolled in
from the bottom.
.HP
If the view is already at the top or bottom, the additional item
is scrolled in from the other end,
if possible.
.RE
.SS "XtNapplEditClose"
.IX "XtNapplEditClose" "" "\fLXtNapplEditClose\fP"
.Jq XtCApplEditClose void(*)() (n/a) G
.HP
Action: points to to a routine the application can
call when the user has finished editing an item in the view.
.HP
Synopsis:
.nf
.RS
.JL
void (*applEditClose)();
static Arg \fIquery\fP[] = {
        { XtNapplEditClose, (XtArgVal)&applEditClose }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
(*applEditClose)(\fIwidget\fP)
Widget \fIwidget\fP;
.RE
.JR
.fi
.sp
.HP
.I "widget" " \(en"
identifies the 
.JL "ScrollingList"
widget instance.
.LP
When this routine is called,
the 
.JL "ScrollingList"
widget unmaps the editable text field widget,
scrolling up the items below it if they had been scrolled down
to allow an insert.
.LP
The application is responsible for calling the
.Jx "XtNapplAddItem"
routine to add the new item,
or calling the
.Jx "XtNapplTouchItem"
routine to mark the item as changed.
.LP
To avoid unnecessary updates to the view,
the application should add the new item (\c
.Jx "XtNapplAddItem" )
or mark the changed item
(
.Jx "XtNapplTouchItem" )
before closing the editable text field.
A later call to the
.Jx "XtNapplEditClose"
routine without an intervening call to the
.Jx "XtNapplEditOpen"
routine is ignored.
.LP
If mapped, the 
.JL "ScrollingList"
widget updates the view,
even if the application had halted updates
(see
.Jx "XtNapplUpdateView"
).
If the application had halted updates,
they will continue to be halted afterwards.
.SS "XtNapplEditOpen"
.IX "XtNapplEditOpen" "" "\fLXtNapplEditOpen\fP"
.Jq XtCApplEditClose void(*)() (n/a) G
.HP
Action: points to a routine the application can
call when it wants to allow the end user to insert a new item
or change an existing item in the view.
.HP
Synopsis:
.nf
.RS
.JL
void (*applEditOpen)();
static Arg \fIquery\fP[] = {
        { XtNapplEditOpen, (XtArgVal)&applEditOpen }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
(*applEditOpen)(\fIwidget\fP, \fIinsert\fP, \fIreference\fP)
Widget \fIwidget\fP;
Boolean \fIinsert\fP;
OlListToken \fIreference\fP;
.RE
.JR
.fi
.HP
.I "widget" " \(en"
identifies the 
.JL "ScrollingList"
widget instance.
.HP
.I "insert" " \(en"
tells whether items should be scrolled down to make room for
inserting a new item.
A value of
.JL "FALSE"
implies that an item is being edited in place and no items are
to be scrolled.
.HP
.I "reference" " \(en"
identifies an item before which a new item is to be inserted
(
.I "insert"
is
.JL "TRUE" )
or identifies the item that is being changed
(
.I "insert"
is
.JL "FALSE"
).
If
.I "insert"
is
.JL "TRUE" ,
this value can be zero to append a new item at the end of the
list.
If
.I "insert"
is
.JL "FALSE" ,
this value must refer to an existing item.
The referenced item does not have to be in the view (see below).
.LP
If a new item is being inserted,
the 
.JL "ScrollingList"
widget makes room for the editable text field by scrolling
down the referenced item and any items below it.
If the referenced item is not in the view,
it is automatically made visible just as if the application had
called the
.Jx "XtNapplViewItem"
routine first.
The
.Jx "XtNapplEditOpen"
routine can be called again before an intervening call to the
.Jx "XtNapplEditClose"
routine.
The effect is as if the
.Jx "XtNapplEditClose"
routine was called,
but without multiple updates to the view.
For example, this allows the application to
let the end user insert several new items in succession:
the editable text field moves down as each item is inserted,
but is never removed from the view.
.LP
If mapped, the 
.JL "ScrollingList"
widget updates the view,
even if the application had halted updates
(see
.Jx "XtNapplUpdateView"
).
If the application had halted updates,
they will continue to be halted afterwards.
.SS "XtNapplTouchItem"
.IX "XtNapplTouchItem" "" "\fLXtNapplTouchItem\fP"
.Jq XtCApplTouchItem void(*)() (n/a) G
.HP
Action: points to a routine the application can
call when it changes an item in the list.
.HP
Synopsis:
.nf
.RS
.JL
void (*applTouchItem)();
static Arg \fIquery\fP[] = {
        { XtNapplTouchItem, (XtArgVal)&applTouchItem }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
(*applTouchItem\fP)(\fIwidget\fP, \fItoken\fP)
Widget \fIwidget\fP;
OlListToken \fItoken\fP;
.RE
.JR
.fi
.HP
.I "widget" " \(en"
identifies the 
.JL "ScrollingList"
widget instance.
.HP
.I "token"  " \(en"
identifies the item that has changed.
.LP
If mapped and if allowed by the application
(see
.Jx "XtNapplUpdateView"
),
the 
.JL "ScrollingList"
widget updates the view if the changed item is
visible.
.SS "XtNapplUpdateView"
.IX "XtNapplUpdateView" "" "\fLXtNapplUpdateView\fP"
.Jq XtCApplUpdateView void(*)() (n/a) G
.HP
Action: points to a routine the application can
call to keep the 
.JL "ScrollingList"
widget from updating the view,
or to let it again update the view.
.HP
Synopsis:
.nf
.RS
.JL
void (*applUpdateView)();
static Arg \fIquery\fP[] = {
        { XtNapplUpdateView, (XtArgVal)&applUpdateView }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
(*applUpdateView)(\fIwidget\fP, \fIok\fP)
Widget \fIwidget\fP;
Boolean \fIok\fP;
.RE
.JR
.fi
.sp
.HP
.I "ok" "\(en"
is either
.JL "TRUE"
or
.JL "FALSE" ,
depending on whether the 
.JL "ScrollingList"
can update the View as it
changes,
or not,
respectively.
.LP
From the time the
.Jx "XtNapplUpdateView"
routine is called with a
.JL "FALSE"
argument
until it is called with a
.JL "TRUE"
argument,
the 
.JL "ScrollingList"
does not update the view in response to 
application-made changes,
unless:
.RS
.HP
\(en the application opens or closes the editable text field
(see
.Jx "XtNapplEditOpen"
and
.Jx "XtNapplEditClose"
);
.HP
\(en the end user manipulates the list
by scrolling it,
selecting an item,
cutting,
etc.
.RE
.LP
The 
.JL "ScrollingList"
widget updates the view once for each of these
exceptions,
each time an exception occurs.
An application should use this routine to bracket a set of
changes
to avoid spurious changes to the view.
This routine is not needed if only one change is made to the
list.
The following example illustrates the use of the
.Jx "XtNapplUpdateView"
routine.
.nf
.RS
.JL
/*
 * Stop view updates.
 */
(*applUpdateView)(\fIwidget\fP, FALSE);
/*
 * Make some changes.
 */
(*applDeleteItem)(\fIwidget\fP, ...);
(*applDeleteItem)(\fIwidget\fP, ...);
(*applDeleteItem)(\fIwidget\fP, ...);
(*applAddItem)(\fIwidget\fP, ...);
(*applTouchItem)(\fIwidget\fP, ...);
/*
 * Allow the view to be updated again.
 */
(*applUpdateView)(\fIwidget\fP, TRUE);
.JR
.RE
.fi
.SS "XtNapplViewItem"
.IX "XtNapplViewItem" "" "\fLXtNapplViewItem\fP"
.Jq XtCApplViewItem void(*)() (n/a) G
.HP
Action: points to a routine the application can
call when it wants a particular item placed in the view.
.HP
Synopsis:
.nf
.RS
.JL
void (*applViewItem)();
.sp
static Arg \fIquery\fP[] = {
        { XtNapplViewItem, (XtArgVal)&applViewItem }
};
XtGetValues(\fIwidget\fP, \fIquery\fP, XtNumber(\fIquery\fP));
.sp
(*applViewItem)(\fIwidget\fP, \fItoken\fP)
Widget \fIwidget\fP;
OlListToken \fItoken\fP;
.RE
.fi
.JR
.sp
.HP
.I "widget" " \(en"
identifies the 
.JL "ScrollingList"
widget instance.
.HP
.I "token" " \(en"
identifies the item to move into the view.
.sp
.LP
The item is moved into the view in a way that minimizes the
change to the view.
If the item is currently in the view,
nothing is changed.
If scrolling the list up or down brings the item into the view
while keeping at least one previously viewed item in
the view,
the list is scrolled.
Otherwise,
the item is placed at the top of the view,
or as close to the top as possible if there aren't enough items
in the current Level to fill the view below it.
If mapped and if allowed by the application
(see
.Jx "XtNapplUpdateView"
),
the 
.JL "ScrollingList"
widget updates the view.
.SS "XtNfont"
.IX "XtNfont" "" "\fLXtNfont\fP"
.Jq XtCFont XFontStruct* (OPEN\0LOOK\0font) SI
.HP
Action: identifies the font to be used to display the
label
Values: any valid return from
.Jx "XLoadQueryFonT" "()"
.HP
Default: chosen to match the scale and screen resolution
.HP
.B "Note:"
The default value points to a cached font structure.
An application should not expect to get this value with a call
to          
.Jx "XtGetValues" "()"
and use it reliably thereafter.
.	\" - jl workspace manager
.SS "XtNfontColor"
.IX "XtNfontColor" "" "\fLXtNfontColor\fP"
.Jq XtCFontColor Pixel XtDefaultForeground SGI
.HP
Action: specifies the font color.
.HP
Values: any pixel value valid for the current display, or
.br
any name from the 
.Jx rgb.txt
file
.LP
.	\" - jl workspace manager
is used for the font.
.SS "XtNforeground"
.IX "XtNforeground" "" "\fLXtNforeground\fP"
.Jq XtCForeground Pixel XtDefaultForeground SGI
.HP
Action:
.#
.#
.SS "XtNlistPane"
.IX "XtNforeground" "" "\fLXtNforeground\fP"
.Jq XtCReadOnly Widget NULL G
.HP
Action:
returns the 
.JL ListPane
child of the
.JL ScrollingList .
.SS "XtNprefMaxWidth"
.IX "XtNprefMaxWidth" "" "\fLXtNprefMaxWidth\fP"
.Jq XtCPrefMaxWidth Dimension 0 SGI
.SS "XtNprefMinWidth"
.IX "XtNprefMinWidth" "" "\fLXtNprefMinWidth\fP"
.Jq XtCPrefMinWidth Dimension 0 SGI
.HP
Action: controls dynamic resizing.
.HP
Values:
.JL "0 \(<= XtNprefMaxWidth"
.br
.JL "0 \(<= XtNprefMinWidth"
.LP
If the value of these resources is specified as zero, then
the static sizing behavior is preserved (which is the default).
However, if these are specified as non-zero, then the width
of the
.JL ScrollingList
will be no less than
.JL XtNprefMinWidth
and no greater than
.JL XtNprefMaxWidth ,
regardless of the length of
the items inside.  Items which are longer than the
.JL XtNprefMaxWidth ,
will automatically be marked with a caret, indicating that they
are not completely visible.
.LP
If the programmer wishes to set the List to a single width,
then
.JL XtNprefMinWidth
should equal
.JL XtNprefMaxWidth ,
thus forcing the
.JL ScrollingList
width to a particular size.
.SS "XtNrecomputeWidth"
.IX "XtNrecomputeWidth" "" "\fLXtNrecomputeWidth\fP"
.Jq XtCRecomputeWidth Boolean TRUE SGI
.HP
Action: controls how the 
.JL "ScrollingList"
widget should respond to
requests to resize itself.
.HP
.HP
Values:
.JL "TRUE" " \(en"
the 
.JL "ScrollingList"
shrinks the view of the content in the
corresponding direction to absorb the change in the 
.JL "ScrollingList"
widget's size. 
.sp .3v
.JL "FALSE" " \(en"
the 
.JL "ScrollingList"
does not shrink the view in that direction.
.LP
This resource, together with the 
.Jx "XtNviewWidth"
and
.Jx "XtNviewHeight"
resources, are typically used to set a
preferred dimension in a direction that should not be scrolled.
.#
.#
.#
.#
.SS "XtNselectable"
.IX "XtNselectable" "" "\fLXtNselectable\fP
.Jq XtCSelectable Boolean TRUE SGI
.HP
Action: controls whether the end user can select items in
the scrolling list.
.HP
Values:
.JL "TRUE" " \(en"
items can be selected with
.SM SELECT
and
.SM ADJUST
and copied
with the
.SM COPY
key.
Items may be deleted with the
.SM CUT
key,
although the application can stop some or all selected items
from being deleted. 
.sp .3v
.JL "FALSE" " \(en"
items cannot be selected and the
.SM COPY
and
.SM CUT
keys have no effect.
.SS "XtNtextField"
.IX "XtNtextField" "" "\fLXtNtextField\fP"
.Jq XtCTextField Widget (none) G
.HP
Action: widget ID of the
.JL "TextField"
class editable text field widget
.LP
This value is available once the 
.JL "ScrollingList"
widget has been created.
The 
.JL "ScrollingList"
widget resets the following values before returning
from each invocation of the
.Jx "XtNapplEditOpen"
routine:
.TN "Editable Text Field Reset Values" Editable_Text_Field_Reset_Values_tbl
.IX "editable TextField Reset Values" "" "editable \fLTextField\fP reset values"
.nf
.nf
Editable  TextField Reset Values    
Name      Class     Value           
=                                   
XtNwidth  XtCWidth  width available 
_                                   
XtNstring XtCString name  of        
.fi
.SS "XtNtraversalOn"
.IX "XtNtraversalOn" "" "\fLXtNtraversalOn\fP"
.Jq XtCTraversalOn Boolean TRUE SGI
.HP
Action: specifies whether or not this widget is selectable during
traversal.
.HP
Values:
.JL "TRUE" ,
.JL "FALSE
.SS "XtNuserDeleteItems"
.IX "XtNuserDeleteItems" "" "\fLXtNuserDeleteItems\fP"
.Jq XtCCallback XtCallbackList NULL SI
.HP
Action: defines the callbacks issued when the end user
tries to delete items from the list.
.LP
Currently, the only way the 
.JL "ScrollingList"
widget handles deletions is
through a cut operation.
.LP
The
.I "call_data"
parameter points to a structure
.Jx "OlListDelete"
that looks like:
.nf
.RS
.JL
typedef struct _OlListDelete {
        OlListToken *\fItokens\fP
        Cardinal \fInum_tokens\fP;
} OlListDelete;
.JR
.fi
.HP
.I "tokens" " \(en"
is a list identifying the items to be deleted.
The application is expected to act on each item separately,
calling the
.Jx "XtNapplDeleteItem"
routine to delete each from the list.
The application may refuse to delete some or all of the items,
and is responsible for providing any feedback to the end-user.
.HP
.I "num_tokens" " \(en"
is the number of items to delete.
.RE
.SS "XtNuserMakeCurrent"
.IX "XtNuserMakeCurrent" "" "\fLXtNuserMakeCurrent\fP"
.Jq XtCCallback XtCallbackList NULL SI
.HP
Action: defines the callbacks issued when the end user
presses SELECT over an item.
.LP
The
.I "call_data"
parameter is the
.Jx "OlListToken"
value that identifies the item.
The application is expected to decide if the current item
status of this item should change.
The
.I "\&attributes"
member of the
.Jx "OlListItem"
structure for this item is not automatically changed by the
.JL "ScrollingList"
widget.
.SS "XtNviewHeight"
.IX "XtNviewHeight" "" "\fLXtNviewHeight\fP"
.Jq XtCViewHeight Dimension (none) SI
.HP
Action: gives the preferred height of the view
as the number of items to show.
.HP
Values:
.JL "0 \(<= XtNviewHeight"
.LP
If a nonzero value is given, the corresponding
.Jx "XtNheight"
resource is computed by converting this number to pixels and
adding any padding or border thickness.
In this case, any value given in the
.Jx "XtNheight"
resource is overwritten.
If a zero value is given in the
.Jx "XtNviewHeight"
resource,
the
.Jx "XtNheight"
resource is used as an estimate.
The view is sized to show an integral number of items,
such that the overall height of the 
.JL "ScrollingList"
widget is less than
or equal to
.Jx "XtNheight" ,
if possible.
However,
the view is always large enough to show at least one item,
and is no shorter than the minimum scroll bar size.
If neither the
.Jx "XtNviewHeight"
resource nor the
.Jx "XtNheight"
resource is set,
or both are set to zero,
the view is made as small as possible,
limited as described above.



.SH "SEE ALSO"
