Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoMouseWheelEvent Class Reference

Mouse wheel events. More...

#include <Inventor/events/SoMouseWheelEvent.h>

+ Inheritance diagram for SoMouseWheelEvent:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoMouseWheelEvent ()
 Constructor.
 
void setDelta (int delta)
 Sets the mouse wheel delta.
 
int getDelta () const
 Gets the mouse wheel delta.
 
- Public Member Functions inherited from SoEvent
 SoEvent ()
 Constructor.
 
virtual ~SoEvent ()
 Destructor.
 
virtual void setTime (SbTime t)
 Sets the time at which the event occurred.
 
SbTime getTime () const
 Gets the time at which the event occurred.
 
virtual void setPosition (const SbVec2s &p)
 Sets the window pixel location of the cursor when the event occurred.
 
virtual void setPosition (const SbVec2f &p)
 Float version of setPosition(const SbVec2s &p).
 
const SbVec2sgetPosition () const
 Returns the window pixel location of the cursor when the event occurred as integer values.
 
const SbVec2fgetPositionFloat () const
 Returns the window pixel location of the cursor when the event occurred as float values.
 
const SbVec2sgetPosition (const SbViewportRegion &vpRgn) const
 Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values.
 
const SbVec2fgetPositionFloat (const SbViewportRegion &vpRgn) const
 Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values.
 
const SbVec2fgetNormalizedPosition (const SbViewportRegion &vpRgn) const
 Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region.
 
void setShiftDown (SbBool isDown)
 Sets whether the shift key was down when the event occurred.
 
void setCtrlDown (SbBool isDown)
 Sets whether the CTRL key was down when the event occurred.
 
void setAltDown (SbBool isDown)
 Sets whether the ALT key was down when the event occurred.
 
void setButton1Down (SbBool isDown)
 Sets whether mouse Button 1 was down when the event occurred.
 
SbBool wasShiftDown () const
 Returns true if the shift key was down when the event occurred.
 
SbBool wasCtrlDown () const
 Returns true if the CTRL key was down when the event occurred.
 
SbBool wasAltDown () const
 Returns true if the ALT key was down when the event occurred.
 
SbBool wasButton1Down () const
 Returns true if mouse button 1 was down when the event occurred.
 
virtual const SbTrackerInfogetTrackerInfo () const
 Gets whether an event object has associated tracker information.
 
SbTrackerInfogetTrackerInfo ()
 Gets whether an event object has associated tracker information.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoEvent
static SoType getClassTypeId ()
 Returns the type id for the SoEvent class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

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

Definition at line 78 of file SoMouseWheelEvent.h.

Constructor & Destructor Documentation

◆ SoMouseWheelEvent()

SoMouseWheelEvent::SoMouseWheelEvent ( )

Constructor.

Member Function Documentation

◆ getClassTypeId()

static SoType SoMouseWheelEvent::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getDelta()

int SoMouseWheelEvent::getDelta ( ) const
inline

Gets the mouse wheel delta.

Definition at line 96 of file SoMouseWheelEvent.h.

◆ getTypeId()

virtual SoType SoMouseWheelEvent::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoEvent.

◆ setDelta()

void SoMouseWheelEvent::setDelta ( int  delta)
inline

Sets the mouse wheel delta.

Definition at line 91 of file SoMouseWheelEvent.h.


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