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 169 "../blib/lib/Tk/Scale.pm (autosplit into ../blib/lib/auto/Tk/Scale/Drag.al)" | |
7 | # Drag -- | |
8 | # This procedure is called when the mouse is dragged with | |
9 | # mouse button 1 down. If the drag started inside the slider | |
10 | # (i.e. the scale is active) then the scale's value is adjusted | |
11 | # to reflect the mouse's position. | |
12 | # | |
13 | # Arguments: | |
14 | # w - The scale widget. | |
15 | # x, y - Mouse coordinates. | |
16 | sub Drag | |
17 | { | |
18 | my $w = shift; | |
19 | my $x = shift; | |
20 | my $y = shift; | |
21 | if (!$Tk::dragging) | |
22 | { | |
23 | return; | |
24 | } | |
25 | $w->set($w->get($x-$Tk::deltaX,$y-$Tk::deltaY)) | |
26 | } | |
27 | ||
28 | # end of Tk::Scale::Drag | |
29 | 1; |