represents an Event with all its information More...
#include <mitkEvent.h>
Public Member Functions | |
Event (mitk::BaseRenderer *sender, int type, int button, int buttonState, int key) | |
virtual | ~Event () |
mitk::BaseRenderer * | GetSender () const |
int | GetType () const |
int | GetButton () const |
int | GetKey () const |
bool | operator== (const Event &event) const |
int | GetButtonState () const |
Protected Attributes | |
mitk::BaseRenderer * | m_Sender |
int | m_Type |
int | m_Button |
int | m_ButtonState |
int | m_Key |
represents an Event with all its information
Class, that stores mouse as well as key-events. Type stores the type of event, that has been activated (KeyPress, MouseMove...), Button and Key represent the cause of this event and ButtonState holds the Modifiers, that might have been pressed during the appearance of this event. Ether Button (Mouse) or Key (Keyboard) is set. if both are set accidentally then the button is accepted.
Definition at line 38 of file mitkEvent.h.
mitk::Event::Event | ( | mitk::BaseRenderer * | sender, |
int | type, | ||
int | button, | ||
int | buttonState, | ||
int | key | ||
) |
sender | Needed for DisplayCoordinateOperation in DisplayVectorInteractor....???? if not needed, then set on NULL |
type | Type of Event: Mouse or Key Event? (look in mitkInteractionConst.h) |
button | Mouse button |
buttonState | Which other key has been pressed? (Mouse/Keyboard modifier-keys) |
key | Pressed key |
Definition at line 21 of file mitkEvent.cpp.
: m_Sender( sender ), m_Type( type ), m_Button( button ), m_ButtonState( buttonState ), m_Key( key ) { }
mitk::Event::~Event | ( | ) | [virtual] |
Definition at line 28 of file mitkEvent.cpp.
{ }
int mitk::Event::GetButton | ( | ) | const |
Definition at line 47 of file mitkEvent.cpp.
Referenced by mitk::PointSetInteractor::ExecuteAction(), mitk::PointSelectorInteractor::ExecuteAction(), mitk::PointInteractor::ExecuteAction(), mitk::BaseRenderer::KeyPressEvent(), mitk::BaseRenderer::MouseMoveEvent(), mitk::VtkInteractorCameraController::MousePressEvent(), mitk::BaseRenderer::MousePressEvent(), mitk::VtkInteractorCameraController::MouseReleaseEvent(), mitk::BaseRenderer::MouseReleaseEvent(), operator==(), and mitk::BaseRenderer::WheelEvent().
{ return m_Button; }
int mitk::Event::GetButtonState | ( | ) | const |
Definition at line 42 of file mitkEvent.cpp.
Referenced by mitk::SurfaceInteractor::CanHandleEvent(), mitk::PointSetInteractor::ExecuteAction(), mitk::PointSelectorInteractor::ExecuteAction(), mitk::PointInteractor::ExecuteAction(), mitk::VtkInteractorCameraController::KeyPressEvent(), mitk::BaseRenderer::KeyPressEvent(), mitk::VtkInteractorCameraController::MouseMoveEvent(), mitk::BaseRenderer::MouseMoveEvent(), mitk::VtkInteractorCameraController::MousePressEvent(), mitk::BaseRenderer::MousePressEvent(), mitk::VtkInteractorCameraController::MouseReleaseEvent(), mitk::BaseRenderer::MouseReleaseEvent(), operator==(), and mitk::BaseRenderer::WheelEvent().
{ return m_ButtonState; }
int mitk::Event::GetKey | ( | ) | const |
Reimplemented in mitk::KeyEvent.
Definition at line 53 of file mitkEvent.cpp.
Referenced by mitk::PointSetInteractor::ExecuteAction(), mitk::PointSelectorInteractor::ExecuteAction(), mitk::PointInteractor::ExecuteAction(), operator==(), and mitk::WiiMoteAddOn::WiiMoteButtonPressed().
{ return m_Key; }
mitk::BaseRenderer * mitk::Event::GetSender | ( | ) | const |
Definition at line 32 of file mitkEvent.cpp.
Referenced by mitk::SurfaceInteractor::CanHandleEvent(), mitk::PointSetInteractor::CanHandleEvent(), mitk::MouseMovePointSetInteractor::CanHandleEvent(), mitk::AffineInteractor::CanHandleEvent(), mitk::SlicesRotator::ExecuteAction(), mitk::PositionTracker::ExecuteAction(), mitk::PointSetInteractor::ExecuteAction(), mitk::PointSelectorInteractor::ExecuteAction(), mitk::PointInteractor::ExecuteAction(), mitk::PlanarFigureInteractor::ExecuteAction(), mitk::ExtrudedContourInteractor::ExecuteAction(), mitk::DisplayVectorInteractor::ExecuteAction(), mitk::DisplayPointSetInteractor::ExecuteAction(), mitk::CoordinateSupplier::ExecuteAction(), mitk::ContourInteractor::ExecuteAction(), mitk::ConnectPointsInteractor::ExecuteAction(), mitk::SegTool2D::GetAffectedImageSliceAs2DImage(), mitk::SetRegionTool::OnInvertLogic(), mitk::SegTool2D::OnInvertLogic(), mitk::SegTool2D::OnMouseMoved(), mitk::RegionGrowingTool::OnMouseMoved(), mitk::CorrectorTool2D::OnMouseMoved(), mitk::ContourTool::OnMouseMoved(), mitk::SetRegionTool::OnMousePressed(), mitk::SegTool2D::OnMousePressed(), mitk::ContourTool::OnMousePressed(), mitk::RegionGrowingTool::OnMousePressedInside(), mitk::RegionGrowingTool::OnMousePressedOutside(), mitk::SetRegionTool::OnMouseReleased(), mitk::SegTool2D::OnMouseReleased(), mitk::RegionGrowingTool::OnMouseReleased(), mitk::CorrectorTool2D::OnMouseReleased(), and mitk::ContourTool::OnMouseReleased().
{ return m_Sender; }
int mitk::Event::GetType | ( | ) | const |
Reimplemented in mitk::KeyEvent.
Definition at line 37 of file mitkEvent.cpp.
Referenced by mitk::SurfaceInteractor::CanHandleEvent(), mitk::PointSetInteractor::CanHandleEvent(), mitk::Interactor::CanHandleEvent(), mitk::ConnectPointsInteractor::CanHandleEvent(), mitk::PointSetInteractor::ExecuteAction(), mitk::PointSelectorInteractor::ExecuteAction(), mitk::PointInteractor::ExecuteAction(), mitk::EventMapper::MapEvent(), mitk::BaseRenderer::MouseMoveEvent(), mitk::BaseRenderer::MousePressEvent(), mitk::BaseRenderer::MouseReleaseEvent(), operator==(), and mitk::BaseRenderer::WheelEvent().
{ return m_Type; }
bool mitk::Event::operator== | ( | const Event & | event ) | const |
Definition at line 58 of file mitkEvent.cpp.
References GetButton(), GetButtonState(), GetKey(), and GetType().
{ const mitk::Event *input = dynamic_cast<const mitk::Event*>(&event); if(input==NULL) return false; if ( (m_Type == event.GetType()) && (m_Button == event.GetButton()) && (m_ButtonState == event.GetButtonState()) && (m_Key == event.GetKey()) ) { return true; } else { return false; } }
int mitk::Event::m_Button [protected] |
Definition at line 68 of file mitkEvent.h.
int mitk::Event::m_ButtonState [protected] |
Definition at line 70 of file mitkEvent.h.
int mitk::Event::m_Key [protected] |
Reimplemented in mitk::KeyEvent.
Definition at line 72 of file mitkEvent.h.
mitk::BaseRenderer* mitk::Event::m_Sender [protected] |
Definition at line 64 of file mitkEvent.h.
Referenced by mitk::KeyEvent::GetWorldPosition().
int mitk::Event::m_Type [protected] |
Definition at line 66 of file mitkEvent.h.