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 / BeginToggle.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 287 "../blib/lib/Tk/Listbox.pm (autosplit into ../blib/lib/auto/Tk/Listbox/BeginToggle.al)"
7# BeginToggle --
8#
9# This procedure is typically invoked on control-button-1 presses. It
10# begins the process of toggling a selection in the listbox. Its
11# exact behavior depends on the selection mode currently in effect
12# for the listbox; see the Motif documentation for details.
13#
14# Arguments:
15# w - The listbox widget.
16# el - The element for the selection operation (typically the
17# one under the pointer). Must be in numerical form.
18sub BeginToggle
19{
20 my $w = shift;
21 my $el = shift;
22 if ($w->cget('-selectmode') eq 'extended')
23 {
24 @Selection = $w->curselection();
25 $Prev = $el;
26 $w->selectionAnchor($el);
27 if ($w->selectionIncludes($el))
28 {
29 $w->selectionClear($el)
30 }
31 else
32 {
33 $w->selectionSet($el)
34 }
35 }
36}
37
38# end of Tk::Listbox::BeginToggle
391;