Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::MouseWheelEvent Class Reference

Interaction event class representing a mouse wheel scroll. More...

#include <mitkMouseWheelEvent.h>

Inheritance diagram for mitk::MouseWheelEvent:
Collaboration diagram for mitk::MouseWheelEvent:

Public Member Functions

 mitkClassMacro (MouseWheelEvent, InteractionPositionEvent) mitkNewMacro5Param(Self
 
BaseRenderer const Point2D int ModifierKeys GetModifiers () const
 Get the active modifier keys (Shift, Ctrl, Alt, etc.). More...
 
MouseButtons GetButtonStates () const
 Get the combined state of all mouse buttons at the time of the event. More...
 
void SetModifiers (ModifierKeys modifiers)
 Set the active modifier keys. More...
 
void SetButtonStates (MouseButtons buttons)
 Set the combined mouse button state. More...
 
int GetWheelDelta () const
 Get the wheel scroll delta. More...
 
void SetWheelDelta (int delta)
 Set the wheel scroll delta. More...
 
bool IsSuperClassOf (const InteractionEvent::Pointer &baseClass) const override
 Check if the given event is an instance of this class or a subclass. More...
 
- Public Member Functions inherited from mitk::InteractionPositionEvent
 mitkClassMacro (InteractionPositionEvent, InteractionEvent)
 
 mitkNewMacro2Param (Self, BaseRenderer *, const Point2D &)
 
Point2D GetPointerPositionOnScreen () const
 Get the pointer position in display (screen) coordinates. More...
 
Point3D GetPositionInWorld () const
 Get the pointer position converted to 3D world coordinates. More...
 
- Public Member Functions inherited from mitk::InteractionEvent
 mitkClassMacroItkParent (InteractionEvent, itk::LightObject)
 
 mitkNewMacro1Param (Self, BaseRenderer *)
 
void SetSender (BaseRenderer *sender)
 Set the BaseRenderer that sent this event. More...
 
BaseRenderer * GetSender () const
 Get the BaseRenderer that sent this event. More...
 

Public Attributes

BaseRenderer const Point2D MouseButtons
 
BaseRenderer const Point2D ModifierKeys
 

Protected Member Functions

 MouseWheelEvent (BaseRenderer *=nullptr, const Point2D &mousePosition=Point2D(), MouseButtons buttonStates=NoButton, ModifierKeys modifiers=NoKey, int wheelDelta=0)
 
 ~MouseWheelEvent () override
 
bool IsEqual (const InteractionEvent &) const override
 Compare this event to another for equality. More...
 
- Protected Member Functions inherited from mitk::InteractionPositionEvent
 InteractionPositionEvent (BaseRenderer *baseRenderer, const Point2D &mousePosition)
 
 ~InteractionPositionEvent () override
 
- Protected Member Functions inherited from mitk::InteractionEvent
 InteractionEvent (BaseRenderer *)
 
 ~InteractionEvent () override
 

Additional Inherited Members

- Public Types inherited from mitk::InteractionEvent
enum  MouseButtons { NoButton , LeftMouseButton , RightMouseButton , MiddleMouseButton }
 Enumeration of mouse button states. More...
 
enum  ModifierKeys { NoKey , ShiftKey , ControlKey , AltKey }
 Enumeration of keyboard modifier keys. More...
 
- Static Public Attributes inherited from mitk::InteractionEvent
static const std::string KeyEsc
 String constants for special keys used in key events and state machine patterns. More...
 
static const std::string KeyEnter
 "Enter" key constant. More...
 
static const std::string KeyReturn
 "Return" key constant. More...
 
static const std::string KeyDelete
 "Delete" key constant. More...
 
static const std::string KeyArrowUp
 "ArrowUp" key constant. More...
 
static const std::string KeyArrowDown
 "ArrowDown" key constant. More...
 
static const std::string KeyArrowLeft
 "ArrowLeft" key constant. More...
 
static const std::string KeyArrowRight
 "ArrowRight" key constant. More...
 
static const std::string KeyF1
 "F1" key constant. More...
 
static const std::string KeyF2
 "F2" key constant. More...
 
static const std::string KeyF3
 "F3" key constant. More...
 
static const std::string KeyF4
 "F4" key constant. More...
 
static const std::string KeyF5
 "F5" key constant. More...
 
static const std::string KeyF6
 "F6" key constant. More...
 
static const std::string KeyF7
 "F7" key constant. More...
 
static const std::string KeyF8
 "F8" key constant. More...
 
static const std::string KeyF9
 "F9" key constant. More...
 
static const std::string KeyF10
 "F10" key constant. More...
 
static const std::string KeyF11
 "F11" key constant. More...
 
static const std::string KeyF12
 "F12" key constant. More...
 
static const std::string KeyPos1
 "Pos1" (Home) key constant. More...
 
static const std::string KeyEnd
 "End" key constant. More...
 
static const std::string KeyInsert
 "Insert" key constant. More...
 
static const std::string KeyPageUp
 "PageUp" key constant. More...
 
static const std::string KeyPageDown
 "PageDown" key constant. More...
 
static const std::string KeySpace
 "Space" key constant. More...
 

Detailed Description

Interaction event class representing a mouse wheel scroll.

Stores the mouse position, the scroll delta, the combined state of all mouse buttons, and any active modifier keys. Two MouseWheelEvent instances are considered equal if they scroll in the same direction (same sign of delta).

Note
A click with the middle mouse button should be handled with MousePressEvent, not MouseWheelEvent.
See also
MousePressEvent
InteractionPositionEvent

Definition at line 42 of file mitkMouseWheelEvent.h.

Constructor & Destructor Documentation

◆ MouseWheelEvent()

mitk::MouseWheelEvent::MouseWheelEvent ( BaseRenderer *  = nullptr,
const Point2D &  mousePosition = Point2D(),
MouseButtons  buttonStates = NoButton,
ModifierKeys  modifiers = NoKey,
int  wheelDelta = 0 
)
protected

◆ ~MouseWheelEvent()

mitk::MouseWheelEvent::~MouseWheelEvent ( )
overrideprotected

Member Function Documentation

◆ GetButtonStates()

MouseButtons mitk::MouseWheelEvent::GetButtonStates ( ) const

Get the combined state of all mouse buttons at the time of the event.

◆ GetModifiers()

BaseRenderer const Point2D int ModifierKeys mitk::MouseWheelEvent::GetModifiers ( ) const

Get the active modifier keys (Shift, Ctrl, Alt, etc.).

◆ GetWheelDelta()

int mitk::MouseWheelEvent::GetWheelDelta ( ) const

Get the wheel scroll delta.

Returns
Positive values indicate scrolling up/forward, negative values down/backward.

◆ IsEqual()

bool mitk::MouseWheelEvent::IsEqual ( const InteractionEvent &  ) const
overrideprotectedvirtual

Compare this event to another for equality.

Two MouseWheelEvent instances are equal if they scroll in the same direction (same sign of wheel delta), have the same modifier keys, button states, and position.

Reimplemented from mitk::InteractionPositionEvent.

◆ IsSuperClassOf()

bool mitk::MouseWheelEvent::IsSuperClassOf ( const InteractionEvent::Pointer &  baseClass) const
overridevirtual

Check if the given event is an instance of this class or a subclass.

Returns
true if baseClass is a MouseWheelEvent.

Reimplemented from mitk::InteractionPositionEvent.

◆ mitkClassMacro()

mitk::MouseWheelEvent::mitkClassMacro ( MouseWheelEvent  ,
InteractionPositionEvent   
)

◆ SetButtonStates()

void mitk::MouseWheelEvent::SetButtonStates ( MouseButtons  buttons)

Set the combined mouse button state.

◆ SetModifiers()

void mitk::MouseWheelEvent::SetModifiers ( ModifierKeys  modifiers)

Set the active modifier keys.

◆ SetWheelDelta()

void mitk::MouseWheelEvent::SetWheelDelta ( int  delta)

Set the wheel scroll delta.

Parameters
deltaPositive values indicate scrolling up/forward, negative values down/backward.

Member Data Documentation

◆ ModifierKeys

◆ MouseButtons


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