Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KeyEvent_H_HEADER_INCLUDED_C184F366
00020 #define KeyEvent_H_HEADER_INCLUDED_C184F366
00021
00022 #include "mitkCommon.h"
00023 #include "mitkEvent.h"
00024 #include "mitkVector.h"
00025
00026
00027 namespace mitk {
00028
00029
00030
00031
00032
00033
00034
00035
00036 class MITK_CORE_EXPORT KeyEvent : public Event
00037 {
00038 public:
00039
00040
00041
00042
00043
00044
00045 KeyEvent(BaseRenderer* sender, int type, int button, int buttonState, int key, std::string text, const Point2D& displPosition);
00046
00047 const Point2D& GetDisplayPosition() const
00048 {
00049 return m_DisplayPosition;
00050 }
00051
00052 void SetDisplayPosition(const Point2D& displPosition) { m_DisplayPosition = displPosition; }
00053
00054 const Point3D& GetWorldPosition() const;
00055
00056 int GetKey() const
00057 {
00058 return m_Key;
00059 }
00060
00061 const char* GetText() const {
00062 return m_Text.c_str();
00063 }
00064 int GetType() const {
00065 return m_Type;
00066 }
00067
00068 protected:
00069 Point2D m_DisplayPosition;
00070 int m_Key;
00071 std::string m_Text;
00072 mutable Point3D m_WorldPosition;
00073 mutable bool m_WorldPositionIsSet;
00074
00075 };
00076
00077 }
00078
00079 #endif