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 / Scale / Activate.al
CommitLineData
86530b38
AT
1# NOTE: Derived from ../blib/lib/Tk/Scale.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Tk::Scale;
5
6#line 86 "../blib/lib/Tk/Scale.pm (autosplit into ../blib/lib/auto/Tk/Scale/Activate.al)"
7# Activate --
8# This procedure is invoked to check a given x-y position in the
9# scale and activate the slider if the x-y position falls within
10# the slider.
11#
12# Arguments:
13# w - The scale widget.
14# x, y - Mouse coordinates.
15sub Activate
16{
17 my $w = shift;
18 my $x = shift;
19 my $y = shift;
20 return if ($w->cget('-state') eq 'disabled');
21 my $ident = $w->identify($x,$y);
22 if (defined($ident) && $ident eq 'slider')
23 {
24 $w->configure(-state => 'active')
25 }
26 else
27 {
28 $w->configure(-state => 'normal')
29 }
30}
31
32# end of Tk::Scale::Activate
331;