Panda3D
|
This is sent along as a parameter to most events generated for a region to indicate the mouse and button state for the event. More...
Public Member Functions | |
ButtonHandle | getButton () |
Returns the mouse or keyboard button associated with this event. | |
string | getCandidateStringEncoded (Encoding encoding) |
Returns the candidate string associated with this event. | |
string | getCandidateStringEncoded () |
Returns the candidate string associated with this event. | |
unsigned int | getCursorPos () |
Returns the position of the user's edit cursor within the candidate string. | |
unsigned int | getHighlightEnd () |
Returns one more than the last highlighted character in the candidate string. | |
unsigned int | getHighlightStart () |
Returns the first highlighted character in the candidate string. | |
int | getKeycode () |
Returns the keycode associated with this event. | |
ModifierButtons const | getModifierButtons () |
Returns the set of modifier buttons that were being held down while the event was generated. | |
Point2 const | getMouse () |
Returns the mouse position at the time the event was generated, in the normalized range (-1 . | |
bool | hasButton () |
Returns true if this parameter has an associated mouse or keyboard button, false otherwise. | |
bool | hasCandidate () |
Returns true if this parameter has an associated candidate string, false otherwise. | |
bool | hasKeycode () |
Returns true if this parameter has an associated keycode, false otherwise. | |
bool | hasMouse () |
Returns true if this parameter has an associated mouse position, false otherwise. | |
bool | isKeyrepeat () |
Returns true if the button-down even was generated due to keyrepeat, or false if it was an original button down. | |
bool | isOutside () |
Returns true if the mouse was outside the region at the time the event was generated, false otherwise. | |
output (ostream out) |
This is sent along as a parameter to most events generated for a region to indicate the mouse and button state for the event.
ButtonHandle getButton | ( | ) |
Returns the mouse or keyboard button associated with this event.
If has_button(), above, returns false, this returns ButtonHandle.none().
string getCandidateStringEncoded | ( | Encoding | encoding | ) |
Returns the candidate string associated with this event.
If has_candidate(), above, returns false, this returns the empty string.
string getCandidateStringEncoded | ( | ) |
Returns the candidate string associated with this event.
If has_candidate(), above, returns false, this returns the empty string.
unsigned int getCursorPos | ( | ) |
Returns the position of the user's edit cursor within the candidate string.
unsigned int getHighlightEnd | ( | ) |
Returns one more than the last highlighted character in the candidate string.
unsigned int getHighlightStart | ( | ) |
Returns the first highlighted character in the candidate string.
int getKeycode | ( | ) |
Returns the keycode associated with this event.
If has_keycode(), above, returns false, this returns 0.
ModifierButtons const getModifierButtons | ( | ) |
Returns the set of modifier buttons that were being held down while the event was generated.
Point2 const getMouse | ( | ) |
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.
bool hasButton | ( | ) |
Returns true if this parameter has an associated mouse or keyboard button, false otherwise.
bool hasCandidate | ( | ) |
Returns true if this parameter has an associated candidate string, false otherwise.
bool hasKeycode | ( | ) |
Returns true if this parameter has an associated keycode, false otherwise.
bool hasMouse | ( | ) |
Returns true if this parameter has an associated mouse position, false otherwise.
bool isKeyrepeat | ( | ) |
Returns true if the button-down even was generated due to keyrepeat, or false if it was an original button down.
bool isOutside | ( | ) |
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.
output | ( | ostream | out | ) |
Reimplemented in PGMouseWatcherParameter.