SoMouseWheelEvent Class Reference
[Events]

Mouse wheel events. More...

#include <Inventor/events/SoMouseWheelEvent.h>

Inheritance diagram for SoMouseWheelEvent:
SoEvent SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoMouseWheelEvent ()
void setDelta (int delta)
int getDelta () const

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

Mouse wheel events.

SoMouseWheelEvent represents a change in mouse wheel rotation event in the Open Inventor event model.

The wheel has discrete, evenly spaced notches. When you rotate the wheel, a wheel message is sent as each notch is encountered. Most modern mouse wheels generate an event with a value of 120 per each notch of the wheel. Pressing the shift key while moving the mouse wheel will generate events of double the wheel delta (i.e., 240 by default). If necessary, you can use environment variable OIV_WHEEL_DELTA to change this value (see SoPreferences).

The getDelta() method returns the distance that the mouse wheel has been rotated. A positive value indicates the wheel was rotated forward (away from the user); a negative value indicates the wheel was rotated backwards (toward the user). The values are specified in multiples of the wheel delta.

NOTE: Wheel delta values are NOT always +/- 120. In the case of wheel delta values in a browser, i.e. using RemoteViz, the base delta value seems to be scaled by the Windows Zoom level. E.g. with Windows 7 and Chrome, when using the default/typical "Medium" setting, the zoom level is 125% and the browser returns 125% * 120 = 150. It is safe to use the sign of the value (positive or negative).

SEE ALSO

SoEvent, SoButtonEvent, SoKeyboardEvent, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice, SoMouseWheelEvent


Constructor & Destructor Documentation

SoMouseWheelEvent::SoMouseWheelEvent (  ) 

Constructor.


Member Function Documentation

static SoType SoMouseWheelEvent::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoEvent.

int SoMouseWheelEvent::getDelta (  )  const [inline]

Gets the mouse wheel delta.

virtual SoType SoMouseWheelEvent::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoEvent.

void SoMouseWheelEvent::setDelta ( int  delta  )  [inline]

Sets the mouse wheel delta.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/