25 #include "../common/WLogger.h"
26 #include "WUIViewEventHandler.h"
37 GUIEvents::EventType et = ea.getEventType();
42 case( GUIEvents::NONE ) :
46 case( GUIEvents::PUSH ):
52 case( GUIEvents::RELEASE ):
58 case( GUIEvents::DOUBLECLICK ):
64 case( GUIEvents::DRAG ):
70 case( GUIEvents::MOVE ):
76 case( GUIEvents::KEYDOWN ):
82 case( GUIEvents::KEYUP ):
88 case( GUIEvents::FRAME ):
94 case( GUIEvents::RESIZE ):
96 m_sigResize( ea.getWindowX(), ea.getWindowY(), ea.getWindowWidth(), ea.getWindowHeight() );
97 handleResize( ea.getWindowX(), ea.getWindowY(), ea.getWindowWidth(), ea.getWindowHeight() );
100 case( GUIEvents::SCROLL ):
102 m_sigScroll( ea.getScrollingMotion(), ea.getScrollingDeltaX(), ea.getScrollingDeltaY() );
103 handleScroll( ea.getScrollingMotion(), ea.getScrollingDeltaX(), ea.getScrollingDeltaY() );
106 case( GUIEvents::PEN_PRESSURE ):
112 case( GUIEvents::PEN_ORIENTATION ):
118 case( GUIEvents::PEN_PROXIMITY_ENTER ):
124 case( GUIEvents::PEN_PROXIMITY_LEAVE ):
130 case( GUIEvents::CLOSE_WINDOW ):
136 case( GUIEvents::QUIT_APPLICATION ):
142 case( GUIEvents::USER ):
149 errorLog() <<
"Unknown GUI Event: " << et;
Is just a short hand to the long name "osgGA::GUIEventAdapter".
A fixed size matrix class.
virtual void handleKeyup(int keyID, unsigned int modKeyMask)
Called whenever the KEYUP event occurs.
TriggerSignalType m_sigQuitApplication
Signal used for notification of the QUIT_APPLICATION event.
DragSignalType m_sigDrag
Signal used for notification of the DRAG event.
virtual void handlePush(WVector2f mousePos, int button)
Called whenever the PUSH event occurs.
virtual void handleScroll(GUIEvents::ScrollingMotion motion, float deltaX, float deltaY)
Called whenever the SCROLL event occurs.
TriggerSignalType m_sigPenProximityLeave
Signal used for notification of the PEN_PROXIMITY_LEAVE event.
TriggerSignalType m_sigUser
Signal used for notification of the USER event.
virtual void handlePenPressure(float pressure)
Called whenever the PEN_PRESSURE event occurs.
virtual void subscribePenOrientation(PenOrientationSignalType::slot_type slot)
Registers a function slot to PEN_ORIENTATION events.
MoveSignalType m_sigMove
Signal used for notification of the MOVE event.
ButtonSignalType m_sigDoubleclick
Signal used for notification of the DOUBLECLICK event.
virtual void subscribeMove(MoveSignalType::slot_type slot)
Registers a function slot to MOVE events.
WUIViewEventHandler(WUIViewWidget::SPtr widget)
Constructor.
virtual void handleQuitApplication()
Called whenever the QUIT_APPLICATION event occurs.
wlog::WStreamedLogger errorLog() const
Logger instance for comfortable error logging.
virtual void handlePenProximityEnter()
Called whenever the PEN_PROXIMITY_ENTER event occurs.
virtual void handlePenProximityLeave()
Called whenever the PEN_PROXIMITY_LEAVE event occurs.
virtual void handleRelease(WVector2f mousePos, int button)
Called whenever the RELEASE event occurs.
virtual void subscribePenProximityLeave(TriggerSignalType::slot_type slot)
Registers a function slot to PEN_PROXIMITY_LEAVE events.
virtual void subscribeQuitApplication(TriggerSignalType::slot_type slot)
Registers a function slot to QUIT_APPLICATION events.
virtual void handleResize(int xPos, int yPos, int width, int height)
Called whenever the widget has resized.
virtual void handleCloseWindow()
Called whenever the CLOSE_WINDOW event occurs.
virtual void handleUser()
Called whenever the USER event occurs.
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
The OSG calls this function whenever a new event has occured.
ButtonSignalType m_sigPush
Signal used for notification of the PUSH event.
virtual void subscribePenPressure(PenPressureSignalType::slot_type slot)
Registers a function slot to PEN_PRESSURE events.
ButtonSignalType m_sigRelease
Signal used for notification of the RELEASE event.
KeySignalType m_sigKeydown
Signal used for notification of the KEYDOWN event.
unsigned int m_preselection
Binary mask describing which events should be used for notification or subscription.
PenOrientationSignalType m_sigPenOrientation
Signal used for notification of the PEN_ORIENTATION event.
virtual void subscribeFrame(TriggerSignalType::slot_type)
Registers a function slot to FRAME events.
ResizeSignalType m_sigResize
Signal used for notification of the RESIZE event.
virtual void subscribeKeydown(KeySignalType::slot_type slot)
Registers a function slot to KEYDOWN events.
virtual void handleDrag(WVector2f mousePos, int buttonMask)
Called whenever the DRAG event occurs.
virtual void subscribeCloseWindow(TriggerSignalType::slot_type slot)
Registers a function slot to CLOSE_WINDOW events.
virtual void handlePenOrientation(const osg::Matrix orientation)
Called whenever the PEN_ORIENTATION event occurs.
virtual void subscribeKeyup(KeySignalType::slot_type slot)
Registers a function slot to KEYUP events.
virtual void subscribeDrag(DragSignalType::slot_type slot)
Registers a function slot to DRAG events.
virtual void subscribePenProximityEnter(TriggerSignalType::slot_type slot)
Registers a function slot to PEN_PROXIMITY_ENTER events.
virtual void subscribeDoubleclick(ButtonSignalType::slot_type slot)
Registers a function slot to DOUBLECLICK events.
virtual void handleKeydown(int keyID, unsigned int modKeyMask)
Called whenever the KEYDOWN event occurs.
virtual void handleFrame()
Called whenever the FRAME event occurs.
virtual void subscribeResize(ResizeSignalType::slot_type slot)
Registers a function slot to RESIZE events.
KeySignalType m_sigKeyup
Signal used for notification of the KEYUP event.
WUIViewWidget::SPtr m_widget
Reference to the WUIViewWidget for which event handling should performed.
virtual void subscribeScroll(ScrollSignalType::slot_type slot)
Registers a function slot to SCROLL events.
ScrollSignalType m_sigScroll
Signal used for notification of the SCROLL event.
virtual void subscribePush(ButtonSignalType::slot_type slot)
Registers a function slot to PUSH events.
PenPressureSignalType m_sigPenPressure
Signal used for notification of the PEN_PRESSURE event.
TriggerSignalType m_sigCloseWindow
Signal used for notification of the CLOSE_WINDOW event.
TriggerSignalType m_sigFrame
Signal used for notification of the FRAME event.
virtual void subscribeUser(TriggerSignalType::slot_type slot)
Registers a function slot to USER events.
TriggerSignalType m_sigPenProximityEnter
Signal used for notification of the PEN_PROXIMITY_ENTER event.
virtual void handleMove(WVector2f mousePos)
Called whenever the MOVE event occurs.
virtual void subscribeRelease(ButtonSignalType::slot_type slot)
Registers a function slot to RELEASE events.
virtual void handleDoubleclick(WVector2f mousePos, int button)
Called whenever the DOUBLECLICK event occurs.
Resource class for streamed logging.
WStreamedLogger error(const std::string &source)
Logging an error message.