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 / ExtendUpDown.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 386 "../blib/lib/Tk/Listbox.pm (autosplit into ../blib/lib/auto/Tk/Listbox/ExtendUpDown.al)"
7# ExtendUpDown --
8#
9# Does nothing unless we're in extended selection mode; in this
10# case it moves the location cursor (active element) up or down by
11# one element, and extends the selection to that point.
12#
13# Arguments:
14# w - The listbox widget.
15# amount - +1 to move down one item, -1 to move back one item.
16sub ExtendUpDown
17{
18 my $w = shift;
19 my $amount = shift;
20 if ($w->cget('-selectmode') ne 'extended')
21 {
22 return;
23 }
24 $w->activate($w->index('active')+$amount);
25 $w->see('active');
26 $w->Motion($w->index('active'))
27}
28
29# end of Tk::Listbox::ExtendUpDown
301;