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 / ControlPress.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 255 "../blib/lib/Tk/Scale.pm (autosplit into ../blib/lib/auto/Tk/Scale/ControlPress.al)"
7# ControlPress --
8# This procedure handles button presses that are made with the Control
9# key down. Depending on the mouse position, it adjusts the scale
10# value to one end of the range or the other.
11#
12# Arguments:
13# w - The scale widget.
14# x, y - Mouse coordinates where the button was pressed.
15sub ControlPress
16{
17 my ($w,$x,$y) = @_;
18 my $el = $w->identify($x,$y);
19 return unless ($el);
20 if ($el eq 'trough1')
21 {
22 $w->set($w->cget('-from'))
23 }
24 elsif ($el eq 'trough2')
25 {
26 $w->set($w->cget('-to'))
27 }
28}
29
301;
31# end of Tk::Scale::ControlPress