"KARASIK via RT" <bug-Prima@rt.cpan.org> writes:
Show quoted text>
> If you can think of a patch to the docs I'll apply.
Perhaps something like below. I like "INCR" or "STEP" or something for
the parameter name. "Z" suggested 3-D coordinates on first reading,
which of course is not what the wheel does.
diff --git a/pod/Prima/Widget.pod b/pod/Prima/Widget.pod
index 944eedb..8c6826d 100644
--- a/pod/Prima/Widget.pod
+++ b/pod/Prima/Widget.pod
@@ -753,7 +753,7 @@ The first set deals with button actions. Pressing, de-pressing, clicking
notifications. The notifications are sent together with the mouse pointer coordinates,
the button that was touched, and the eventual modifier keys that were pressed.
In addition, C<MouseClick> provides the boolean flag if the click was single or double,
-and C<MouseWheel> - the Z-range of the wheel turn. These notifications occur
+and C<MouseWheel> the wheel turn amount. These notifications occur
when the mouse event occurs within the geometrical bounds of a widget,
with one notable exception, when a widget is in I<capture> mode.
If the C<::capture> is set to 1, then these events are sent to the widget even
@@ -2684,14 +2684,22 @@ X and Y are the mouse pointer coordinates.
See also: C<MouseDown>, C<MouseClick>, C<MouseWheel>,
C<MouseMove>, C<MouseEnter>, C<MouseLeave>
-=item MouseWheel MOD, X, Y, Z
+=item MouseWheel MOD, X, Y, INCR
Occurs when the user rotates mouse wheel on a widget.
MOD is a combination of C<km::XXX> constants,
reflecting the pressed modificator keys during the event,
-X and Y are the mouse pointer coordinates. Z is the virtual
-coordinate of a wheel. Typical ( 2001 A.D. ) mouse produces
-Z 120-fold values.
+X and Y are the mouse pointer coordinates.
+
+INCR is the wheel movement, scaled by 120. +120 is a step upwards, or
+-120 downwards. For wheels which are discrete button clicks INCR is
++/-120 but other devices may give other amounts. A widget should
+scroll by INCR/120 many units, or partial unit, for whatever its unit
+of movement might be, such as lines of text, slider ticks, etc.
+
+A widget might like to vary its unit move according to the MOD keys.
+For example C<Prima::SpinEdit> has a C<step> and C<pageStep> and moves
+by C<pageStep> when C<km::Ctrl> is held down (see L<Prima::Sliders>).
See also: C<MouseDown>, C<MouseUp>, C<MouseClick>,
C<MouseMove>, C<MouseEnter>, C<MouseLeave>
--
Food jargon elucidated for the layman:
"Gourmet selection" -- twice the price.