00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef POINTEREVENT_H
00016 #define POINTEREVENT_H
00017
00018 #include "pandabase.h"
00019 #include "mouseData.h"
00020
00021 class Datagram;
00022 class DatagramIterator;
00023
00024
00025
00026
00027
00028 class EXPCL_PANDA_EVENT PointerEvent {
00029 public:
00030
00031 INLINE PointerEvent();
00032 INLINE PointerEvent(const PointerEvent ©);
00033 INLINE void operator = (const PointerEvent ©);
00034
00035 INLINE bool operator == (const PointerEvent &other) const;
00036 INLINE bool operator != (const PointerEvent &other) const;
00037 INLINE bool operator < (const PointerEvent &other) const;
00038
00039 void output(ostream &out) const;
00040
00041 void write_datagram(Datagram &dg) const;
00042 void read_datagram(DatagramIterator &scan);
00043
00044 public:
00045 bool _in_window;
00046 int _xpos;
00047 int _ypos;
00048 int _dx;
00049 int _dy;
00050 double _length;
00051 double _direction;
00052 double _rotation;
00053 int _sequence;
00054 double _time;
00055 };
00056
00057 INLINE ostream &operator << (ostream &out, const PointerEvent &pe) {
00058 pe.output(out);
00059 return out;
00060 }
00061
00062 #include "pointerEvent.I"
00063
00064 #endif
00065