#include <mouseWatcherParameter.h>
Inheritance diagram for MouseWatcherParameter:
Public Types | |
enum | Flags { F_has_button = 0x001, F_has_mouse = 0x002, F_is_outside = 0x004, F_has_keycode = 0x008 } |
Public Member Functions | |
MouseWatcherParameter () | |
MouseWatcherParameter (const MouseWatcherParameter &other) | |
void | operator= (const MouseWatcherParameter &other) |
~MouseWatcherParameter () | |
void | set_button (const ButtonHandle &button) |
Sets the mouse or keyboard button that generated this event, if any. | |
void | set_keycode (int keycode) |
Sets the keycode associated with this event, if any. | |
void | set_modifier_buttons (const ModifierButtons &mods) |
Sets the modifier buttons that were being held while this event was generated. | |
void | set_mouse (const LPoint2f &mouse) |
Sets the mouse position that was current at the time the event was generated. | |
void | set_outside (bool flag) |
Sets the state of the "outside" flag. | |
bool | has_button () const |
Returns true if this parameter has an associated mouse or keyboard button, false otherwise. | |
ButtonHandle | get_button () const |
Returns the mouse or keyboard button associated with this event. | |
bool | has_keycode () const |
Returns true if this parameter has an associated keycode, false otherwise. | |
int | get_keycode () const |
Returns the keycode associated with this event. | |
const ModifierButtons & | get_modifier_buttons () const |
Returns the set of modifier buttons that were being held down while the event was generated. | |
bool | has_mouse () const |
Returns true if this parameter has an associated mouse position, false otherwise. | |
const LPoint2f & | get_mouse () const |
Returns the mouse position at the time the event was generated, in the normalized range (-1 .. | |
bool | is_outside () const |
Returns true if the mouse was outside the region at the time the event was generated, false otherwise. | |
void | output (ostream &out) const |
Public Attributes | |
ButtonHandle | _button |
short | _keycode |
ModifierButtons | _mods |
LPoint2f | _mouse |
int | _flags |
Definition at line 42 of file mouseWatcherParameter.h.
|
Definition at line 77 of file mouseWatcherParameter.h. |
|
Definition at line 32 of file mouseWatcherParameter.I. References INLINE. |
|
Definition at line 45 of file mouseWatcherParameter.I. References _button, _flags, _keycode, _mods, _mouse, and INLINE. |
|
Definition at line 80 of file mouseWatcherParameter.I. References _flags, _keycode, F_has_keycode, and INLINE. |
|
Returns the mouse or keyboard button associated with this event. If has_button(), above, returns false, this returns ButtonHandle::none(). Definition at line 195 of file mouseWatcherParameter.I. References _flags, and F_has_mouse. Referenced by PGButton::enter(), PGItem::exit(), and PGButton::exit(). |
|
Returns the keycode associated with this event. If has_keycode(), above, returns false, this returns 0. Definition at line 225 of file mouseWatcherParameter.I. |
|
Returns the set of modifier buttons that were being held down while the event was generated.
Definition at line 240 of file mouseWatcherParameter.I. |
|
Returns the mouse position at the time the event was generated, in the normalized range (-1 .. 1). It is valid to call this only if has_mouse() returned true. Definition at line 272 of file mouseWatcherParameter.I. |
|
Returns true if this parameter has an associated mouse or keyboard button, false otherwise.
Definition at line 178 of file mouseWatcherParameter.I. |
|
Returns true if this parameter has an associated keycode, false otherwise.
Definition at line 210 of file mouseWatcherParameter.I. References _flags, F_is_outside, and INLINE. |
|
Returns true if this parameter has an associated mouse position, false otherwise.
Definition at line 255 of file mouseWatcherParameter.I. |
|
Returns true if the mouse was outside the region at the time the event was generated, false otherwise. This is only valid for "release" type events. Definition at line 290 of file mouseWatcherParameter.I. Referenced by PGButton::exit(). |
|
Reimplemented in PGMouseWatcherParameter. Definition at line 63 of file mouseWatcherParameter.I. References INLINE. Referenced by PGMouseWatcherParameter::PGMouseWatcherParameter(). |
|
Reimplemented in PGMouseWatcherParameter. Definition at line 33 of file mouseWatcherParameter.cxx. Referenced by PGMouseWatcherParameter::~PGMouseWatcherParameter(). |
|
Sets the mouse or keyboard button that generated this event, if any.
Definition at line 94 of file mouseWatcherParameter.I. |
|
Sets the keycode associated with this event, if any.
Definition at line 108 of file mouseWatcherParameter.I. References _flags, _mouse, F_has_mouse, and INLINE. Referenced by MouseWatcher::press(). |
|
Sets the modifier buttons that were being held while this event was generated.
Definition at line 124 of file mouseWatcherParameter.I. References _flags, and F_is_outside. Referenced by MouseWatcher::press(). |
|
Sets the mouse position that was current at the time the event was generated.
Definition at line 139 of file mouseWatcherParameter.I. References _flags, and F_has_button. Referenced by MouseWatcher::press(). |
|
Sets the state of the "outside" flag. This is true if the mouse was outside the region at the time the event was generated, false otherwise. This only has meaning for "release" events. Definition at line 159 of file mouseWatcherParameter.I. References _flags, F_has_keycode, and INLINE. Referenced by MouseWatcher::press(). |
|
Definition at line 72 of file mouseWatcherParameter.h. Referenced by MouseWatcherParameter(). |
|
Definition at line 83 of file mouseWatcherParameter.h. Referenced by get_button(), has_keycode(), MouseWatcherParameter(), set_keycode(), set_modifier_buttons(), set_mouse(), set_outside(), and ~MouseWatcherParameter(). |
|
Definition at line 73 of file mouseWatcherParameter.h. Referenced by MouseWatcherParameter(), and ~MouseWatcherParameter(). |
|
Definition at line 74 of file mouseWatcherParameter.h. Referenced by has_button(), MouseWatcherParameter(), and set_button(). |
|
Definition at line 75 of file mouseWatcherParameter.h. Referenced by MouseWatcherParameter(), and set_keycode(). |