00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MOUSEWATCHERPARAMETER_H
00020 #define MOUSEWATCHERPARAMETER_H
00021
00022 #include "pandabase.h"
00023
00024 #include "buttonHandle.h"
00025 #include "modifierButtons.h"
00026 #include "luse.h"
00027
00028
00029
00030
00031
00032
00033
00034 class EXPCL_PANDA MouseWatcherParameter {
00035 public:
00036 INLINE MouseWatcherParameter();
00037 INLINE MouseWatcherParameter(const MouseWatcherParameter &other);
00038 INLINE void operator = (const MouseWatcherParameter &other);
00039 INLINE ~MouseWatcherParameter();
00040
00041 INLINE void set_button(const ButtonHandle &button);
00042 INLINE void set_keycode(int keycode);
00043 INLINE void set_modifier_buttons(const ModifierButtons &mods);
00044 INLINE void set_mouse(const LPoint2f &mouse);
00045 INLINE void set_outside(bool flag);
00046
00047 PUBLISHED:
00048 INLINE bool has_button() const;
00049 INLINE ButtonHandle get_button() const;
00050
00051 INLINE bool has_keycode() const;
00052 INLINE int get_keycode() const;
00053
00054 INLINE const ModifierButtons &get_modifier_buttons() const;
00055
00056 INLINE bool has_mouse() const;
00057 INLINE const LPoint2f &get_mouse() const;
00058
00059 INLINE bool is_outside() const;
00060
00061 void output(ostream &out) const;
00062
00063 public:
00064 ButtonHandle _button;
00065 short _keycode;
00066 ModifierButtons _mods;
00067 LPoint2f _mouse;
00068
00069 enum Flags {
00070 F_has_button = 0x001,
00071 F_has_mouse = 0x002,
00072 F_is_outside = 0x004,
00073 F_has_keycode = 0x008,
00074 };
00075 int _flags;
00076 };
00077
00078 INLINE ostream &operator << (ostream &out, const MouseWatcherParameter &parm);
00079
00080 #include "mouseWatcherParameter.I"
00081
00082 #endif