wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
wxm::WheelSteps Class Reference

Public Member Functions

int Add (int rotation, int delta)
 Add one wheel event's rotation; return the number of whole steps it completes.
 
void Reset ()
 Forget any partial step, e.g. when the wheel starts acting on something else.
 

Member Function Documentation

◆ Add()

int wxm::WheelSteps::Add ( int  rotation,
int  delta 
)
inline

Add one wheel event's rotation; return the number of whole steps it completes.

The sign of the result is the sign of the rotation (wx counts a vertical wheel turned away from the user as positive). Reversing the direction drops whatever was left over from the other direction, so the wheel reacts to the reversal as soon as a step's worth of movement in the new direction has come together, not only after first winding back the remainder.

Parameters
rotationwxMouseEvent::GetWheelRotation()
deltawxMouseEvent::GetWheelDelta(); a delta <= 0 (nothing sane reports that) counts every non-zero rotation as one step.

The documentation for this class was generated from the following file: