0bad43ddec6e55c1ecf2ebf724c86633ce146182
[framework/uifw/xorg/lib/libxaw.git] / specs / List.xml
1 <sect1 id="List_Widget">
2 <title>List Widget</title>
3 <para>
4 <!-- .LP -->
5 <!-- .XS -->
6 <!--    List Widget -->
7 <!-- .XE -->
8 <!-- .IN "List widget" "" "@DEF@" -->
9 <literallayout class="monospaced">
10 <!-- .TA 2.0i -->
11 <!-- .ta 2.0i -->
12 <!-- .sp -->
13 Application header file &lt;X11/Xaw/List.h&gt;
14 <!-- .IN "List.h" "" -->
15 Class header file       &lt;X11/Xaw/ListP.h&gt;
16 <!-- .IN "ListP.h" "" -->
17 Class   listWidgetClass
18 <!-- .IN "listWidgetClass" "" -->
19 Class Name      List
20 <!-- .IN "List widget" "class name" -->
21 Superclass      Simple
22 <!-- .sp -->
23 </literallayout>
24 </para>
25 <para>
26 <!-- .LP -->
27
28 The List widget contains a list of strings formatted into rows and
29 columns. When one of the strings is selected, it is highlighted, and the
30 List widget's <function>Notify</function> action is invoked, calling all routines on
31 its callback list.  Only one string may be selected at a time.
32 </para>
33 <sect2 id="list_resources">
34 <title>Resources</title>
35 <para>
36 <!-- .LP -->
37 When creating a List widget instance, the following resources are
38 retrieved from the argument list or from the resource database:
39 </para>
40 <para>
41 <!-- .LP -->
42 <!-- .IN "List widget" "resources" -->
43 <informaltable>
44   <tgroup cols='5' align='center'>
45   <colspec colname='c1'/>
46   <colspec colname='c2'/>
47   <colspec colname='c3'/>
48   <colspec colname='c4'/>
49   <colspec colname='c5'/>
50   <thead>
51     <row>
52       <entry>Name</entry>
53       <entry>Class</entry>
54       <entry>Type</entry>
55       <entry>Notes</entry>
56       <entry>Default Value</entry>
57     </row>
58   </thead>
59   <tbody>
60     <row>
61       <entry>accelerators</entry>
62       <entry>Accelerators</entry>
63       <entry>AcceleratorTable</entry>
64       <entry></entry>
65       <entry>NULL</entry>
66     </row>
67     <row>
68       <entry>ancestorSensitive</entry>
69       <entry>AncestorSensitive</entry>
70       <entry>Boolean</entry>
71       <entry>D</entry>
72       <entry>True</entry>
73     </row>
74     <row>
75       <entry>background</entry>
76       <entry>Background</entry>
77       <entry>Pixel</entry>
78       <entry></entry>
79       <entry>XtDefaultBackground</entry>
80     </row>
81     <row>
82       <entry>backgroundPixmap</entry>
83       <entry>Pixmap</entry>
84       <entry>Pixmap</entry>
85       <entry></entry>
86       <entry>XtUnspecifiedPixmap</entry>
87     </row>
88     <row>
89       <entry>borderColor</entry>
90       <entry>BorderColor</entry>
91       <entry>Pixel</entry>
92       <entry></entry>
93       <entry>XtDefaultForeground</entry>
94     </row>
95     <row>
96       <entry>borderPixmap</entry>
97       <entry>Pixmap</entry>
98       <entry>Pixmap</entry>
99       <entry></entry>
100       <entry>XtUnspecifiedPixmap</entry>
101     </row>
102     <row>
103       <entry>borderWidth</entry>
104       <entry>BorderWidth</entry>
105       <entry>Dimension</entry>
106       <entry></entry>
107       <entry>1</entry>
108     </row>
109     <row>
110       <entry>callback</entry>
111       <entry>Callback</entry>
112       <entry>Callback</entry>
113       <entry></entry>
114       <entry>NULL</entry>
115     </row>
116     <row>
117       <entry>colormap</entry>
118       <entry>Colormap</entry>
119       <entry>Colormap</entry>
120       <entry></entry>
121       <entry>Parent's Colormap</entry>
122     </row>
123     <row>
124       <entry>columnSpacing</entry>
125       <entry>Spacing</entry>
126       <entry>Dimension</entry>
127       <entry></entry>
128       <entry>6</entry>
129     </row>
130     <row>
131       <entry>cursor</entry>
132       <entry>Cursor</entry>
133       <entry>Cursor</entry>
134       <entry></entry>
135       <entry>XC_left_ptr</entry>
136     </row>
137     <row>
138       <entry>cursorName</entry>
139       <entry>Cursor</entry>
140       <entry>String</entry>
141       <entry></entry>
142       <entry>NULL</entry>
143     </row>
144     <row>
145       <entry>defaultColumns</entry>
146       <entry>Columns</entry>
147       <entry>int</entry>
148       <entry></entry>
149       <entry>2</entry>
150     </row>
151     <row>
152       <entry>depth</entry>
153       <entry>Depth</entry>
154       <entry>int</entry>
155       <entry>C</entry>
156       <entry>Parent's Depth</entry>
157     </row>
158     <row>
159       <entry>destroyCallback</entry>
160       <entry>Callback</entry>
161       <entry>XtCallbackList</entry>
162       <entry></entry>
163       <entry>NULL</entry>
164     </row>
165     <row>
166       <entry>font</entry>
167       <entry>Font</entry>
168       <entry>FontStruct</entry>
169       <entry></entry>
170       <entry>XtDefaultFont</entry>
171     </row>
172     <row>
173       <entry>fontSet</entry>
174       <entry>FontSet</entry>
175       <entry>XFontSet</entry>
176       <entry></entry>
177       <entry>XtDefaultFontSet</entry>
178     </row>
179     <row>
180       <entry>forceColumns</entry>
181       <entry>Columns</entry>
182       <entry>Boolean</entry>
183       <entry></entry>
184       <entry>False</entry>
185     </row>
186     <row>
187       <entry>foreground</entry>
188       <entry>Foreground</entry>
189       <entry>Pixel</entry>
190       <entry></entry>
191       <entry>XtDefaultForeground</entry>
192     </row>
193     <row>
194       <entry>height</entry>
195       <entry>Height</entry>
196       <entry>Dimension</entry>
197       <entry>A</entry>
198       <entry>Enough space to contain the list</entry>
199     </row>
200     <row>
201       <entry>insensitiveBorder</entry>
202       <entry>Insensitive</entry>
203       <entry>Pixmap</entry>
204       <entry></entry>
205       <entry>GreyPixmap</entry>
206     </row>
207     <row>
208       <entry>internalHeight</entry>
209       <entry>Height</entry>
210       <entry>Dimension</entry>
211       <entry></entry>
212       <entry>2</entry>
213     </row>
214     <row>
215       <entry>internalWidth</entry>
216       <entry>Width</entry>
217       <entry>Dimension</entry>
218       <entry></entry>
219       <entry>4</entry>
220     </row>
221     <row>
222       <entry>international</entry>
223       <entry>International</entry>
224       <entry>Boolean</entry>
225       <entry>C</entry>
226       <entry>False</entry>
227     </row>
228     <row>
229       <entry>list</entry>
230       <entry>List</entry>
231       <entry>Pointer</entry>
232       <entry></entry>
233       <entry>name of widget</entry>
234     </row>
235     <row>
236       <entry>longest</entry>
237       <entry>Longest</entry>
238       <entry>int</entry>
239       <entry>A</entry>
240       <entry>0</entry>
241     </row>
242     <row>
243       <entry>mappedWhenManaged</entry>
244       <entry>MappedWhenManaged</entry>
245       <entry>Boolean</entry>
246       <entry></entry>
247       <entry>True</entry>
248     </row>
249     <row>
250       <entry>numberStrings</entry>
251       <entry>NumberStrings</entry>
252       <entry>int</entry>
253       <entry>A</entry>
254       <entry>computed for NULL terminated list</entry>
255     </row>
256     <row>
257       <entry>pasteBuffer</entry>
258       <entry>Boolean</entry>
259       <entry>Boolean</entry>
260       <entry></entry>
261       <entry>False</entry>
262     </row>
263     <row>
264       <entry>pointerColor</entry>
265       <entry>Foreground</entry>
266       <entry>Pixel</entry>
267       <entry></entry>
268       <entry>XtDefaultForeground</entry>
269     </row>
270     <row>
271       <entry>pointerColorBackground</entry>
272       <entry>Background</entry>
273       <entry>Pixel</entry>
274       <entry></entry>
275       <entry>XtDefaultBackground</entry>
276     </row>
277     <row>
278       <entry>rowSpacing</entry>
279       <entry>Spacing</entry>
280       <entry>Dimension</entry>
281       <entry></entry>
282       <entry>2</entry>
283     </row>
284     <row>
285       <entry>screen</entry>
286       <entry>Screen</entry>
287       <entry>Screen</entry>
288       <entry>R</entry>
289       <entry>Parent's Screen</entry>
290     </row>
291     <row>
292       <entry>sensitive</entry>
293       <entry>Sensitive</entry>
294       <entry>Boolean</entry>
295       <entry></entry>
296       <entry>True</entry>
297     </row>
298     <row>
299       <entry>translations</entry>
300       <entry>Translations</entry>
301       <entry>TranslationTable</entry>
302       <entry></entry>
303       <entry>See below</entry>
304     </row>
305     <row>
306       <entry>verticalList</entry>
307       <entry>Boolean</entry>
308       <entry>Boolean</entry>
309       <entry></entry>
310       <entry>False</entry>
311     </row>
312     <row>
313       <entry>width</entry>
314       <entry>Width</entry>
315       <entry>Dimension</entry>
316       <entry>A</entry>
317       <entry>Enough space to contain the list</entry>
318     </row>
319     <row>
320       <entry>x</entry>
321       <entry>Position</entry>
322       <entry>Position</entry>
323       <entry></entry>
324       <entry>0</entry>
325     </row>
326     <row>
327       <entry>y</entry>
328       <entry>Position</entry>
329       <entry>Position</entry>
330       <entry></entry>
331       <entry>0</entry>
332     </row>
333     <row>
334       <entry>_</entry>
335     </row>
336   </tbody>
337   </tgroup>
338 </informaltable>
339 <!-- .Ac -->
340 <!-- .As -->
341 <!-- .Bg -->
342 <!-- .Gp -->
343 <!-- .Bc -->
344 <!-- .Bp -->
345 <!-- .Bw -->
346 <variablelist>
347   <varlistentry>
348     <term>
349       <function>callback</function>
350     </term>
351     <listitem>
352       <para>
353 All functions on this list are called whenever the <function>notify</function> action is
354 invoked.  The <emphasis remap='I'>call_data</emphasis> argument contains information about the element
355 selected and is described in detail in the <function>List Callbacks</function> section.
356 <!-- .Cm -->
357       </para>
358     </listitem>
359   </varlistentry>
360   <varlistentry>
361     <term>
362       <function>columnSpacing</function>
363     </term>
364     <listitem>
365       <para>
366 <!-- .br -->
367 <!-- .ns -->
368       </para>
369     </listitem>
370   </varlistentry>
371   <varlistentry>
372     <term>
373       <function>rowSpacing</function>
374     </term>
375     <listitem>
376       <para>
377 The amount of space, in pixels, between each of the rows and columns
378 in the list.
379 <!-- .Cu -->
380 <!-- .Cn -->
381       </para>
382     </listitem>
383   </varlistentry>
384   <varlistentry>
385     <term>
386       <function>defaultColumns</function>
387     </term>
388     <listitem>
389       <para>
390 The default number of columns.  This value is used when neither the
391 width nor the height of the List widget is specified or when
392 <function>forceColumns</function> is <function>True</function>.
393 <!-- .Dp -->
394 <!-- .Dc -->
395       </para>
396     </listitem>
397   </varlistentry>
398   <varlistentry>
399     <term>
400       <function>font</function>
401     </term>
402     <listitem>
403       <para>
404 The text font to use when displaying the <function>list</function>, when the
405 <function>international</function> resource is <function>false</function>.
406       </para>
407     </listitem>
408   </varlistentry>
409   <varlistentry>
410     <term>
411       <function>fontSet</function>
412     </term>
413     <listitem>
414       <para>
415 The text font set to use when displaying the <function>list</function>, when the
416 <function>international</function> resource is <function>true</function>.
417       </para>
418     </listitem>
419   </varlistentry>
420   <varlistentry>
421     <term>
422       <function>forceColumns</function>
423     </term>
424     <listitem>
425       <para>
426 Forces the default number of columns to be used regardless of the
427 List widget's current size.
428       </para>
429     </listitem>
430   </varlistentry>
431   <varlistentry>
432     <term>
433       <function>foreground</function>
434     </term>
435     <listitem>
436       <para>
437 A pixel value which indexes the widget's colormap to derive the color
438 used to paint the text of the list elements.
439 <!-- .Hw -->
440 <!-- .Ib -->
441       </para>
442     </listitem>
443   </varlistentry>
444   <varlistentry>
445     <term>
446       \fPinternalHeight\fP
447     </term>
448     <listitem>
449       <para>
450 <!-- .br -->
451 <!-- .ns -->
452       </para>
453     </listitem>
454   </varlistentry>
455   <varlistentry>
456     <term>
457       \fPinternalWidth\fP
458     </term>
459     <listitem>
460       <para>
461 The margin, in pixels, between the edges of the list and the
462 corresponding edge of the List widget's window.
463       </para>
464     </listitem>
465   </varlistentry>
466   <varlistentry>
467     <term>
468       <function>list</function>
469     </term>
470     <listitem>
471       <para>
472 An array of text strings displayed in the List widget.  If
473 <function>numberStrings</function> is zero (the default) then the <function>list</function> must be
474 NULL terminated.  If a value is not specified for the <function>list</function>, then
475 <function>numberStrings</function> is set to 1, and the name of the widget is used as
476 the <function>list</function>, and <function>longest</function> is set to the length of the name of the
477 widget.  The <function>list</function> is used in place, and must be available
478 to the List widget for the lifetime of this widget, or until it is
479 changed with <function>XtSetValues</function> or <function>XawListChange</function>.
480 <!-- .In -->
481       </para>
482     </listitem>
483   </varlistentry>
484   <varlistentry>
485     <term>
486       <function>longest</function>
487     </term>
488     <listitem>
489       <para>
490 Specifies the width, in pixels, of the longest string in the current
491 list.  The List widget will compute this value if zero (the default)
492 is specified.  If this resource is set by hand, entries longer than this
493 will be clipped to fit.
494 <!-- .Mm -->
495       </para>
496     </listitem>
497   </varlistentry>
498   <varlistentry>
499     <term>
500       <function>numberStrings</function>
501     </term>
502     <listitem>
503       <para>
504 The number of strings in the current list.  If a value of zero (the
505 default) is specified, the List widget will compute it.  When computing
506 the number of strings the List widget assumes that the <function>list</function> is NULL
507 terminated.
508       </para>
509     </listitem>
510   </varlistentry>
511   <varlistentry>
512     <term>
513       <function>pasteBuffer</function>
514     </term>
515     <listitem>
516       <para>
517 If this resource is set to <function>True</function> then the name of the currently
518 selected list element will be put into <function>CUT_BUFFER_0</function>.
519 <!-- .Pf -->
520 <!-- .Pb -->
521 <!-- .Sc -->
522 <!-- .Se -->
523 <!-- .Tr -->
524       </para>
525     </listitem>
526   </varlistentry>
527   <varlistentry>
528     <term>
529       <function>verticalList</function>
530     </term>
531     <listitem>
532       <para>
533 If this resource is set to <function>True</function> then the list elements will be
534 presented in column major order.
535 <!-- .Xy -->
536     </para>
537   </listitem>
538   </varlistentry>
539 </variablelist>
540 </para>
541 </sect2>
542 <sect2 id="List_Actions">
543 <title>List Actions</title>
544 <!-- .IN "List widget" "actions" -->
545 <para>
546 <!-- .LP -->
547 The List widget supports the following actions:
548 </para>
549 <itemizedlist>
550   <listitem>
551     <para>
552 Highlighting and unhighlighting the list element under the
553 pointer with <function>Set</function> and <function>Unset</function>
554     </para>
555   </listitem>
556   <listitem>
557     <para>
558 Processing application callbacks with <function>Notify</function>
559     </para>
560   </listitem>
561 </itemizedlist>
562 <para>
563 <!-- .LP -->
564 The following is the default translation table used by the List Widget:
565 <!-- .IN "List widget" "default translation table" -->
566 </para>
567 <para>
568 <!-- .LP -->
569 <literallayout class="monospaced">
570 <!-- .TA .5i 2.25i -->
571 <!-- .ta .5i 2.25i -->
572 &lt;Btn1Down&gt;,&lt;Btn1Up&gt;:        Set(\|) Notify(\|)
573 <!-- .sp -->
574 </literallayout>
575 </para>
576 <para>
577 <!-- .LP -->
578 The full list of actions supported by List widget is:
579 <variablelist>
580   <varlistentry>
581     <term>
582       <function>Set</function>(\|)
583     </term>
584     <listitem>
585       <para>
586 <emphasis remap='I'>Sets</emphasis> the list element that is currently under the pointer.  To
587 inform the user that this element is currently set, it is drawn with
588 foreground and background colors reversed.  If this action is called when
589 there is no list element under the cursor, the currently <emphasis remap='I'>set</emphasis>
590 element will be <emphasis remap='I'>unset</emphasis>.
591       </para>
592     </listitem>
593   </varlistentry>
594   <varlistentry>
595     <term>
596       <function>Unset</function>(\|)
597     </term>
598     <listitem>
599       <para>
600 Cancels the <emphasis remap='I'>set</emphasis> state of the element under the pointer,
601 and redraws it with normal foreground and background colors.
602       </para>
603     </listitem>
604   </varlistentry>
605   <varlistentry>
606     <term>
607       <function>Notify</function>(\|)
608     </term>
609     <listitem>
610       <para>
611 Calls all callbacks on the List widget's callback list.  Information
612 about the currently selected list element is passed in the
613 <emphasis remap='I'>call_data</emphasis> argument (see <function>List Callbacks</function> below).
614     </para>
615   </listitem>
616   </varlistentry>
617 </variablelist>
618 </para>
619 </sect2>
620 <sect2 id="List_Callbacks">
621 <title>List Callbacks</title>
622 <!-- .IN "List widget" "callbacks" -->
623 <para>
624 <!-- .LP -->
625 All procedures on the List widget's callback list will have a
626 <function>XawListReturnStruct</function> passed to them as <emphasis remap='I'>call_data</emphasis>.  The
627 structure is defined in the List widget's application header file.
628 </para>
629 <!-- .LP -->
630 <literallayout class="monospaced">
631 <!-- .TA .5i 2.25i -->
632 <!-- .ta .5i 2.25i -->
633 <!-- .IN "XawListReturnStruct" "" "@DEF@" -->
634 typedef struct _XawListReturnStruct {
635         String string;  /* string shown in the list. */
636         int list_index; /* index of the item selected. */
637 } XawListReturnStruct;
638 <!-- .IN "XawListReturnStruct" "" -->
639 <!-- .NT -->
640 </literallayout>
641 <note><para>
642 The <emphasis remap='I'>list_index</emphasis> item used to be called simply <emphasis remap='I'>index</emphasis>.
643 Unfortunately, this name collided with a global name defined on some
644 operating systems, and had to be changed.
645 </para></note>
646 <!-- .NE -->
647 </sect2>
648 <sect2 id="Changing_the_List">
649 <title>Changing the List</title>
650 <para>
651 <!-- .LP -->
652 To change the list that is displayed, use
653 <function>XawListChange .</function>
654 <!-- .IN "XawListChange" "" "@DEF@" -->
655 <funcsynopsis>
656 <funcprototype>
657   <funcdef>void<function> XawListChange</function></funcdef>
658   <paramdef>Widget<parameter> w</parameter></paramdef>
659   <paramdef>String*<parameter> list</parameter></paramdef>
660   <paramdef>intnitems,<parameter> longest</parameter></paramdef>
661   <paramdef>Boolean<parameter> resize</parameter></paramdef>
662 </funcprototype>
663 </funcsynopsis>
664 <!-- .FN -->
665 <variablelist>
666   <varlistentry>
667     <term>
668       <emphasis remap='I'>w</emphasis>
669     </term>
670     <listitem>
671       <para>
672 Specifies the List widget.
673       </para>
674     </listitem>
675   </varlistentry>
676   <varlistentry>
677     <term>
678       <emphasis remap='I'>list</emphasis>
679     </term>
680     <listitem>
681       <para>
682 Specifies the new list for the List widget to display.
683       </para>
684     </listitem>
685   </varlistentry>
686   <varlistentry>
687     <term>
688       <emphasis remap='I'>nitems</emphasis>
689     </term>
690     <listitem>
691       <para>
692 Specifies the number of items in the <emphasis remap='I'>list</emphasis>.  If a value less than 1
693 is specified, <emphasis remap='I'>list</emphasis> must be NULL terminated, and the number of
694 items will be calculated by the List widget.
695       </para>
696     </listitem>
697   </varlistentry>
698   <varlistentry>
699     <term>
700       <emphasis remap='I'>longest</emphasis>
701     </term>
702     <listitem>
703       <para>
704 Specifies the length of the longest item in the <emphasis remap='I'>list</emphasis> in pixels.
705 If a value less than 1 is specified, the List widget will calculate the
706 value.
707       </para>
708     </listitem>
709   </varlistentry>
710   <varlistentry>
711     <term>
712       <emphasis remap='I'>resize</emphasis>
713     </term>
714     <listitem>
715       <para>
716 Specifies a Boolean value that if <function>True</function> indicates that the
717 List widget should try to resize itself after making the change.
718 The constraints of the List widget's parent are always enforced,
719 regardless of the value specified here.
720     </para>
721   </listitem>
722   </varlistentry>
723 </variablelist>
724 </para>
725 <para>
726 <!-- .LP -->
727 <function>XawListChange</function>
728 will <emphasis remap='I'>unset</emphasis> all list elements that are currently <function>set</function> before
729 the list is actually changed.  The <emphasis remap='I'>list</emphasis> is used in place, and must
730 remain usable for the lifetime of the List widget, or until <emphasis remap='I'>list</emphasis>
731 has been changed again with this function or with <function>XtSetValues</function>.
732 </para>
733 </sect2>
734 <sect2 id="Highlighting_an_Item">
735 <title>Highlighting an Item</title>
736 <para>
737 <!-- .LP -->
738 To highlight an item in the list, use
739 <function>XawListHighlight .</function>
740 <!-- .IN "XawListHighlight" "" "@DEF@" -->
741 <funcsynopsis>
742 <funcprototype>
743   <funcdef>void<function> XawListHighlight</function></funcdef>
744   <paramdef>Widget<parameter> w</parameter></paramdef>
745   <paramdef>int<parameter> item</parameter></paramdef>
746 </funcprototype>
747 </funcsynopsis>
748 <!-- .FN -->
749 <variablelist>
750   <varlistentry>
751     <term>
752       <emphasis remap='I'>w</emphasis>
753     </term>
754     <listitem>
755       <para>
756 Specifies the List widget.
757       </para>
758     </listitem>
759   </varlistentry>
760   <varlistentry>
761     <term>
762       <emphasis remap='I'>item</emphasis>
763     </term>
764     <listitem>
765       <para>
766 Specifies an index into the current list that indicates the item to be
767 highlighted.
768     </para>
769   </listitem>
770   </varlistentry>
771 </variablelist>
772 </para>
773 <para>
774 <!-- .LP -->
775 Only one item can be highlighted at a time.
776 If an item is already highlighted when
777 <function>XawListHighlight</function>
778 is called,
779 the highlighted item is unhighlighted before the new item is highlighted.
780 </para>
781 </sect2>
782 <sect2 id="Unhighlighting_an_Item">
783 <title>Unhighlighting an Item</title>
784 <para>
785 <!-- .LP -->
786 To unhighlight the currently highlighted item in the list, use
787 <function>XawListUnhighlight .</function>
788 <!-- .IN "XawListUnhighlight" "" "@DEF@" -->
789 <funcsynopsis>
790 <funcprototype>
791   <funcdef>void<function> XawListUnhighlight</function></funcdef>
792   <paramdef>Widget<parameter> w</parameter></paramdef>
793 </funcprototype>
794 </funcsynopsis>
795 <!-- .FN -->
796 <variablelist>
797   <varlistentry>
798     <term>
799       <emphasis remap='I'>w</emphasis>
800     </term>
801     <listitem>
802       <para>
803 Specifies the List widget.
804     </para>
805   </listitem>
806   </varlistentry>
807 </variablelist>
808 </para>
809 </sect2>
810 <sect2 id="Retrieving_the_Currently_Selected_Item">
811 <title>Retrieving the Currently Selected Item</title>
812 <para>
813 <!-- .LP -->
814 To retrieve the list element that is currently <emphasis remap='I'>set</emphasis>, use
815 <function>XawListShowCurrent .</function>
816 <!-- .IN "XawListShowCurrent" "" "@DEF@" -->
817 <funcsynopsis>
818 <funcprototype>
819   <funcdef>XawListReturnStruct<function> *XawListShowCurrent</function></funcdef>
820   <paramdef>Widget<parameter> w</parameter></paramdef>
821 </funcprototype>
822 </funcsynopsis>
823 <!-- .FN -->
824 <variablelist>
825   <varlistentry>
826     <term>
827       <emphasis remap='I'>w</emphasis>
828     </term>
829     <listitem>
830       <para>
831 Specifies the List widget.
832     </para>
833   </listitem>
834   </varlistentry>
835 </variablelist>
836 </para>
837 <para>
838 <!-- .LP -->
839 <function>XawListShowCurrent</function>
840 returns a pointer to an
841 <function>XawListReturnStruct</function>
842 structure,
843 containing the currently highlighted item.
844 If the value of the index member is XAW_LIST_NONE,
845 <!-- .IN "XAW_LIST_NONE" -->
846 the string member is undefined, and no item is currently selected.
847 </para>
848 </sect2>
849 <sect2 id="Restrictions">
850 <title>Restrictions</title>
851 <para>
852 <!-- .LP -->
853 Many programmers create a ``scrolled list'' by putting a List
854 widget with many entries as a child of a Viewport widget.  The
855 List continues to create a window as big as its contents, but
856 that big window is only visible where it intersects the parent
857 Viewport's window.  (I.e., it is ``clipped.'')
858 </para>
859 <para>
860 <!-- .LP -->
861 While this is a useful technique, there is a serious drawback.
862 X does not support windows above 32,767 pixels in width or
863 height, but this height limit will be exceeded by a List's
864 window when the List has many entries (i.e., with a 12 point
865 font, about 3000 entries would be too many.)
866 </para>
867 <para>
868 <!-- .LP -->
869
870 </para>
871 </sect2>
872 </sect1>