Commit | Line | Data |
---|---|---|
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. | |
4 | package 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. | |
15 | sub 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 | ||
30 | 1; | |
31 | # end of Tk::Scale::ControlPress |