Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / auto / Tk / Listbox / SelectAll.al
CommitLineData
86530b38
AT
1# NOTE: Derived from ../blib/lib/Tk/Listbox.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Tk::Listbox;
5
6#line 471 "../blib/lib/Tk/Listbox.pm (autosplit into ../blib/lib/auto/Tk/Listbox/SelectAll.al)"
7# SelectAll
8#
9# This procedure is invoked to handle the "select all" operation.
10# For single and browse mode, it just selects the active element.
11# Otherwise it selects everything in the widget.
12#
13# Arguments:
14# w - The listbox widget.
15sub SelectAll
16{
17 my $w = shift;
18 my $mode = $w->cget('-selectmode');
19 if ($mode eq 'single' || $mode eq 'browse')
20 {
21 $w->selectionClear(0,'end');
22 $w->selectionSet('active')
23 }
24 else
25 {
26 $w->selectionSet(0,'end')
27 }
28}
29
30# end of Tk::Listbox::SelectAll
311;