Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoEventBuilder Class Reference

VSG extension Utility class that generates Open Inventor events. More...

#include <Inventor/ViewerComponents/SoEventBuilder.h>

Public Member Functions

 SoEventBuilder ()
 Constructor.
 
 ~SoEventBuilder ()
 Destructor.
 
SoMouseButtonEventgetMouseReleaseEvent (int x, int y, SoMouseButtonEvent::Button buttonId, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoMouseButtonEvent corresponding to given parameters.
 
SoMouseButtonEventgetMousePressEvent (int x, int y, SoMouseButtonEvent::Button buttonId, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoMouseButtonEvent corresponding to given parameters.
 
SoMouseButtonEventgetMouseDoubleClickEvent (int x, int y, SoMouseButtonEvent::Button buttonId, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoMouseButtonEvent corresponding to given parameters.
 
SoMouseWheelEventgetMouseWheelEvent (int delta, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoMouseWheelEvent corresponding to given parameters.
 
SoLocation2EventgetMouseMoveEvent (int x, int y, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoLocation2Event corresponding to given parameters.
 
SoLocation2EventgetMouseEnterEvent (int x, int y, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoLocation2Event corresponding to given parameters.
 
SoLocation2EventgetMouseLeaveEvent (int x, int y, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoLocation2Event corresponding to given parameters.
 
SoKeyboardEventgetKeyReleaseEvent (SoKeyboardEvent::Key key, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoKeyboardEvent corresponding to given parameters.
 
SoKeyboardEventgetKeyPressEvent (SoKeyboardEvent::Key key, bool isAltDown, bool isCtrlDown, bool isShiftDown)
 Return an SoKeyboardEvent corresponding to given parameters.
 
const std::vector< const SoEvent * > & getTouchDownEvent (int x, int y, unsigned long fingerId)
 Return a list of SoEvent corresponding to given parameters.
 
const std::vector< const SoEvent * > & getTouchUpEvent (int x, int y, unsigned long fingerId)
 Return a list of SoEvent corresponding to given parameters.
 
const std::vector< const SoEvent * > & getTouchMoveEvent (int x, int y, unsigned long fingerId)
 Return a list of SoEvent corresponding to given parameters.
 
SoTouchManagergetTouchManager () const
 Get the touch manager instance used by this event builder to build touch events.
 

Detailed Description

VSG extension Utility class that generates Open Inventor events.

This class is used to generate an Open Inventor event object from a system independent event description.

Note: The same SoEvent object is returned each time. This object is owned by the SoEventBuilder instance and must not be modified or destroyed by the application.

Definition at line 27 of file SoEventBuilder.h.

Constructor & Destructor Documentation

◆ SoEventBuilder()

SoEventBuilder::SoEventBuilder ( )

Constructor.

◆ ~SoEventBuilder()

SoEventBuilder::~SoEventBuilder ( )

Destructor.

Member Function Documentation

◆ getKeyPressEvent()

SoKeyboardEvent * SoEventBuilder::getKeyPressEvent ( SoKeyboardEvent::Key  key,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoKeyboardEvent corresponding to given parameters.

The returned object should not be destroyed.

Parameters
keykey that have been pressed.
isAltDownSpecify if Alt key was down when key has been pressed.
isCtrlDownSpecify if Ctrl key was down when key has been pressed.
isShiftDownSpecify if Shift key was down when key has been pressed.

◆ getKeyReleaseEvent()

SoKeyboardEvent * SoEventBuilder::getKeyReleaseEvent ( SoKeyboardEvent::Key  key,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoKeyboardEvent corresponding to given parameters.

The returned object should not be destroyed.

Parameters
keykey that have been released.
isAltDownSpecify if Alt key was down when key has been released.
isCtrlDownSpecify if Ctrl key was down when key has been released.
isShiftDownSpecify if Shift key was down when key has been released.

◆ getMouseDoubleClickEvent()

SoMouseButtonEvent * SoEventBuilder::getMouseDoubleClickEvent ( int  x,
int  y,
SoMouseButtonEvent::Button  buttonId,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoMouseButtonEvent corresponding to given parameters.

The returned object should not be destroyed.

Parameters
xX coordinate in pixel.
yY coordinate in pixel.
buttonIdWhich mouse button has been double clicked.
isAltDownSpecify if Alt key was down when mouse has been double clicked.
isCtrlDownSpecify if Ctrl key was down when mouse has been double clicked.
isShiftDownSpecify if Shift key was down when mouse has been double clicked.

◆ getMouseEnterEvent()

SoLocation2Event * SoEventBuilder::getMouseEnterEvent ( int  x,
int  y,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoLocation2Event corresponding to given parameters.

A MouseEnter event correspond to a mouse entering some GUI area like a panel or a window. The returned object should not be destroyed.

Parameters
xX coordinate in pixel.
yY coordinate in pixel.
isAltDownSpecify if Alt key was down when mouse has entered area.
isCtrlDownSpecify if Ctrl key was down when mouse has entered area.
isShiftDownSpecify if Shift key was down when mouse has entered area.

◆ getMouseLeaveEvent()

SoLocation2Event * SoEventBuilder::getMouseLeaveEvent ( int  x,
int  y,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoLocation2Event corresponding to given parameters.

A MouseLeave event correspond to a mouse leaving some GUI area like a panel or a window. The returned object should not be destroyed.

Parameters
xX coordinate in pixel.
yY coordinate in pixel.
isAltDownSpecify if Alt key was down when mouse has leaved area.
isCtrlDownSpecify if Ctrl key was down when mouse has leaved area.
isShiftDownSpecify if Shift key was down when mouse has leaved area.

◆ getMouseMoveEvent()

SoLocation2Event * SoEventBuilder::getMouseMoveEvent ( int  x,
int  y,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoLocation2Event corresponding to given parameters.

The returned object should not be destroyed.

Parameters
xX coordinate in pixel.
yY coordinate in pixel.
isAltDownSpecify if Alt key was down when mouse has been moved.
isCtrlDownSpecify if Ctrl key was down when mouse has been moved.
isShiftDownSpecify if Shift key was down when mouse has been moved.

◆ getMousePressEvent()

SoMouseButtonEvent * SoEventBuilder::getMousePressEvent ( int  x,
int  y,
SoMouseButtonEvent::Button  buttonId,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoMouseButtonEvent corresponding to given parameters.

The returned object should not be destroyed.

Parameters
xX coordinate in pixel.
yY coordinate in pixel.
buttonIdWhich mouse button has been pressed.
isAltDownSpecify if Alt key was down when mouse has been pressed.
isCtrlDownSpecify if Ctrl key was down when mouse has been pressed.
isShiftDownSpecify if Shift key was down when mouse has been pressed.

◆ getMouseReleaseEvent()

SoMouseButtonEvent * SoEventBuilder::getMouseReleaseEvent ( int  x,
int  y,
SoMouseButtonEvent::Button  buttonId,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoMouseButtonEvent corresponding to given parameters.

The returned object should not be destroyed.

Parameters
xX coordinate in pixel.
yY coordinate in pixel.
buttonIdWhich mouse button has been released.
isAltDownSpecify if Alt key was down when mouse has been released.
isCtrlDownSpecify if Ctrl key was down when mouse has been released.
isShiftDownSpecify if Shift key was down when mouse has been released.

◆ getMouseWheelEvent()

SoMouseWheelEvent * SoEventBuilder::getMouseWheelEvent ( int  delta,
bool  isAltDown,
bool  isCtrlDown,
bool  isShiftDown 
)

Return an SoMouseWheelEvent corresponding to given parameters.

The returned object should not be destroyed.

Parameters
deltaNumber of tick mouse wheel has done. For most of mice, one tick correspond to 15 degree on the wheel but it may change depending on hardware.
isAltDownSpecify if Alt key was down when wheel has been activated.
isCtrlDownSpecify if Ctrl key was down when when wheel has been activated.
isShiftDownSpecify if Shift key was down when when wheel has been activated.

◆ getTouchDownEvent()

const std::vector< const SoEvent * > & SoEventBuilder::getTouchDownEvent ( int  x,
int  y,
unsigned long  fingerId 
)

Return a list of SoEvent corresponding to given parameters.

This list may contain some recognized SoGestureEvent. The returned events should not be destroyed.

Parameters
xX coordinate in pixel of the finger position.
yY coordinate in pixel of the finger position.
fingerIdid of the finger used.

◆ getTouchManager()

SoTouchManager & SoEventBuilder::getTouchManager ( ) const

Get the touch manager instance used by this event builder to build touch events.

◆ getTouchMoveEvent()

const std::vector< const SoEvent * > & SoEventBuilder::getTouchMoveEvent ( int  x,
int  y,
unsigned long  fingerId 
)

Return a list of SoEvent corresponding to given parameters.

This list may contain some recognized SoGestureEvent. The returned events should not be destroyed.

Parameters
xX coordinate in pixel of the finger position.
yY coordinate in pixel of the finger position.
fingerIdid of the finger used.

◆ getTouchUpEvent()

const std::vector< const SoEvent * > & SoEventBuilder::getTouchUpEvent ( int  x,
int  y,
unsigned long  fingerId 
)

Return a list of SoEvent corresponding to given parameters.

This list may contain some recognized SoGestureEvent. The returned events should not be destroyed.

Parameters
xX coordinate in pixel of the finger position.
yY coordinate in pixel of the finger position.
fingerIdid of the finger used.

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