00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COIN_SOEVENT_H
00021 #define COIN_SOEVENT_H
00022
00023 #include <Inventor/SoType.h>
00024 #include <Inventor/SbVec2s.h>
00025 #include <Inventor/SbTime.h>
00026
00027 class SbViewportRegion;
00028 class SbVec2f;
00029
00030
00031 class COIN_DLL_API SoEvent {
00032
00033 public:
00034 SoEvent(void);
00035 virtual ~SoEvent();
00036
00037 SbBool isOfType(SoType type) const;
00038 static SoType getClassTypeId(void);
00039 virtual SoType getTypeId(void) const;
00040
00041 void setTime(const SbTime t);
00042 SbTime getTime(void) const;
00043
00044 void setPosition(const SbVec2s & p);
00045 const SbVec2s & getPosition(void) const;
00046 const SbVec2s getPosition(const SbViewportRegion & vpRgn) const;
00047 const SbVec2f getNormalizedPosition(const SbViewportRegion & vpRgn) const;
00048
00049 void setShiftDown(SbBool isDown);
00050 SbBool wasShiftDown(void) const;
00051 void setCtrlDown(SbBool isDown);
00052 SbBool wasCtrlDown(void) const;
00053 void setAltDown(SbBool isDown);
00054 SbBool wasAltDown(void) const;
00055
00056 static void initClass(void);
00057
00058 private:
00059 static SoType classTypeId;
00060
00061 SbTime timeofevent;
00062 SbVec2s positionofevent;
00063
00064 static void initEvents(void);
00065
00066 struct {
00067 unsigned int shiftdown : 1;
00068 unsigned int ctrldown : 1;
00069 unsigned int altdown : 1;
00070 } modifiers;
00071 };
00072
00073 #endif // !COIN_SOEVENT_H