Utility class that generates Open Inventor events. More...
#include <Inventor/ViewerComponents/SoEventBuilder.h>
Public Member Functions | |
SoEventBuilder () | |
~SoEventBuilder () | |
SoMouseButtonEvent * | getMouseReleaseEvent (int x, int y, SoMouseButtonEvent::Button buttonId, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoMouseButtonEvent * | getMousePressEvent (int x, int y, SoMouseButtonEvent::Button buttonId, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoMouseButtonEvent * | getMouseDoubleClickEvent (int x, int y, SoMouseButtonEvent::Button buttonId, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoMouseWheelEvent * | getMouseWheelEvent (int delta, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoLocation2Event * | getMouseMoveEvent (int x, int y, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoLocation2Event * | getMouseEnterEvent (int x, int y, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoLocation2Event * | getMouseLeaveEvent (int x, int y, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoKeyboardEvent * | getKeyReleaseEvent (SoKeyboardEvent::Key key, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
SoKeyboardEvent * | getKeyPressEvent (SoKeyboardEvent::Key key, bool isAltDown, bool isCtrlDown, bool isShiftDown) |
const std::vector< const SoEvent * > & | getTouchDownEvent (int x, int y, unsigned long fingerId) |
const std::vector< const SoEvent * > & | getTouchUpEvent (int x, int y, unsigned long fingerId) |
const std::vector< const SoEvent * > & | getTouchMoveEvent (int x, int y, unsigned long fingerId) |
SoTouchManager & | getTouchManager () const |
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.
MFCRenderAreaExaminer, MFCRenderAreaGuiIntegration, QtRenderAreaExaminer, QtRenderAreaGuiIntegration, WinRenderAreaExaminer
SoEventBuilder::SoEventBuilder | ( | ) |
Constructor.
SoEventBuilder::~SoEventBuilder | ( | ) |
Destructor.
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.
key | key that have been pressed. | |
isAltDown | Specify if Alt key was down when key has been pressed. | |
isCtrlDown | Specify if Ctrl key was down when key has been pressed. | |
isShiftDown | Specify if Shift key was down when key has been pressed. |
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.
key | key that have been released. | |
isAltDown | Specify if Alt key was down when key has been released. | |
isCtrlDown | Specify if Ctrl key was down when key has been released. | |
isShiftDown | Specify if Shift key was down when key has been released. |
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.
x | X coordinate in pixel. | |
y | Y coordinate in pixel. | |
buttonId | Which mouse button has been double clicked. | |
isAltDown | Specify if Alt key was down when mouse has been double clicked. | |
isCtrlDown | Specify if Ctrl key was down when mouse has been double clicked. | |
isShiftDown | Specify if Shift key was down when mouse has been double clicked. |
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.
x | X coordinate in pixel. | |
y | Y coordinate in pixel. | |
isAltDown | Specify if Alt key was down when mouse has entered area. | |
isCtrlDown | Specify if Ctrl key was down when mouse has entered area. | |
isShiftDown | Specify if Shift key was down when mouse has entered area. |
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.
x | X coordinate in pixel. | |
y | Y coordinate in pixel. | |
isAltDown | Specify if Alt key was down when mouse has leaved area. | |
isCtrlDown | Specify if Ctrl key was down when mouse has leaved area. | |
isShiftDown | Specify if Shift key was down when mouse has leaved area. |
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.
x | X coordinate in pixel. | |
y | Y coordinate in pixel. | |
isAltDown | Specify if Alt key was down when mouse has been moved. | |
isCtrlDown | Specify if Ctrl key was down when mouse has been moved. | |
isShiftDown | Specify if Shift key was down when mouse has been moved. |
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.
x | X coordinate in pixel. | |
y | Y coordinate in pixel. | |
buttonId | Which mouse button has been pressed. | |
isAltDown | Specify if Alt key was down when mouse has been pressed. | |
isCtrlDown | Specify if Ctrl key was down when mouse has been pressed. | |
isShiftDown | Specify if Shift key was down when mouse has been pressed. |
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.
x | X coordinate in pixel. | |
y | Y coordinate in pixel. | |
buttonId | Which mouse button has been released. | |
isAltDown | Specify if Alt key was down when mouse has been released. | |
isCtrlDown | Specify if Ctrl key was down when mouse has been released. | |
isShiftDown | Specify if Shift key was down when mouse has been released. |
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.
delta | Number 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. | |
isAltDown | Specify if Alt key was down when wheel has been activated. | |
isCtrlDown | Specify if Ctrl key was down when when wheel has been activated. | |
isShiftDown | Specify if Shift key was down when when wheel has been activated. |
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.
x | X coordinate in pixel of the finger position. | |
y | Y coordinate in pixel of the finger position. | |
fingerId | id of the finger used. |
SoTouchManager& SoEventBuilder::getTouchManager | ( | ) | const |
Get the touch manager instance used by this event builder to build touch events.
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.
x | X coordinate in pixel of the finger position. | |
y | Y coordinate in pixel of the finger position. | |
fingerId | id of the finger used. |
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.
x | X coordinate in pixel of the finger position. | |
y | Y coordinate in pixel of the finger position. | |
fingerId | id of the finger used. |