# NOTE: Derived from ../blib/lib/Tk/Listbox.pm.
# Changes made here will be lost when autosplit is run again.
#line 210 "../blib/lib/Tk/Listbox.pm (autosplit into ../blib/lib/auto/Tk/Listbox/Motion.al)"
# This procedure is called to process mouse motion events while
# button 1 is down. It may move or extend the selection, depending
# on the listbox's selection mode.
# w - The listbox widget.
# el - The element under the pointer (must be a number).
if (defined($Prev) && $el == $Prev)
$anchor = $w->index('anchor');
my $mode = $w->cget('-selectmode');
$w->selectionClear(0,'end');
elsif ($mode eq 'extended')
if ($w->selectionIncludes('anchor'))
$w->selectionClear($i,$el);
$w->selectionSet('anchor',$el)
$w->selectionClear($i,$el);
$w->selectionClear('anchor',$el)
while ($i < $el && $i < $anchor)
if (Tk::lsearch(\@Selection,$i) >= 0)
while ($i > $el && $i > $anchor)
if (Tk::lsearch(\@Selection,$i) >= 0)
# end of Tk::Listbox::Motion