Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
WinEventToSoEvent.h
1/*=======================================================================
2** VSG_COPYRIGHT_TAG
3**=======================================================================*/
4
5#ifndef WinEventToSoEvent_h
6#define WinEventToSoEvent_h
7
8#include <Inventor/ViewerComponents/SoEventBuilder.h>
9#include <Inventor/Events/SoMouseButtonEvent.h>
10
11class RenderArea;
12
16class WINVIEWERCOMPONENTS_API WinEventToSoEvent
17{
18
19public:
20
25
30
35
39 static SoLocation2Event* getMouseMoveEvent( LPARAM loc, RenderArea* renderArea );
40
45
50
55
59 static SoKeyboardEvent* getKeyPressEvent( WPARAM param, RenderArea* );
60
65
69 static void getTouchEvents( WPARAM wParam, LPARAM lParam, RenderArea*, std::vector<const SoEvent*>& eventsList );
70
71private:
72 static bool initClass();
73 static bool s_init;
74
75 static SoKeyboardEvent::Key getIvKey( WPARAM param );
76 static SoEventBuilder m_ivEvent;
77 static std::map<DWORD, unsigned int> m_touchIDMap;
78
79 static SoKeyboardEvent::Key keyMap[256];
80 static int keyMapInitFlag;
81
82 static bool m_ctrlModifier;
83 static bool m_altModifier;
84 static bool m_shiftModifier;
85
86 static SbVec2s getMousePosition( LPARAM loc );
87};
88
89#endif // WinEventToSoEvent
Class to render an OpenInventor scene in a Qt OpenGL window.
Definition RenderArea.h:46
2D vector class.
Definition SbVec.h:700
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Utility class th...
Keyboard key press and release events.
Key
The keyboard keys.
2D location events.
Mouse button press and release events.
Mouse wheel events.
static SoKeyboardEvent * getKeyPressEvent(WPARAM param, RenderArea *)
Transform a Win key press event to a SoKeyboardEvent.
static SoMouseButtonEvent * getMouseReleaseEvent(LPARAM loc, SoMouseButtonEvent::Button button, RenderArea *renderArea)
Transform a Win mouse release event to a SoMouseButtonEvent.
static SoLocation2Event * getMouseLeaveEvent(RenderArea *)
Transform a Win mouse leave the window event to a SoLocation2Event.
static SoMouseButtonEvent * getMouseDoubleClickEvent(LPARAM loc, SoMouseButtonEvent::Button button, RenderArea *renderArea)
Transform a Win mouse double click event to a SoMouseButtonEvent.
static void getTouchEvents(WPARAM wParam, LPARAM lParam, RenderArea *, std::vector< const SoEvent * > &eventsList)
Transform Win touch events to a vector of SoEvent.
static SoKeyboardEvent * getKeyReleaseEvent(WPARAM param, RenderArea *)
Transform a Win key release event to a SoKeyboardEvent.
static SoLocation2Event * getMouseEnterEvent(RenderArea *)
Transform a Win mouse enter in the window event to a SoLocation2Event.
static SoMouseWheelEvent * getMouseWheelEvent(short zDelta, RenderArea *)
Transform a Win mouse wheel event to a SoMouseWheelEvent.
static SoMouseButtonEvent * getMousePressEvent(LPARAM loc, SoMouseButtonEvent::Button button, RenderArea *renderArea)
Transform a Win mouse press event to a SoMouseButtonEvent.
static SoLocation2Event * getMouseMoveEvent(LPARAM loc, RenderArea *renderArea)
Transform a Win mouse move event to a SoLocation2Event.