# PGMouseWatcherParameter

from pandac.PandaModules import PGMouseWatcherParameter

Class : PGMouseWatcherParameter
Description : This specialization on MouseWatcherParameter allows us to tag on additional elements to events for the gui system, and also inherits from TypedWritableReferenceCount so we can attach this thing to an event.

## Inheritance:

PGMouseWatcherParameter: TypedWritableReferenceCount MouseWatcherParameter
TypedWritableReferenceCount: TypedWritable ReferenceCount
TypedWritable: TypedObject
TypedObject:
ReferenceCount:
MouseWatcherParameter:

## Methods of PGMouseWatcherParameter:

getClassType
output

## Methods of TypedWritableReferenceCount:

getClassType

## Methods of TypedWritable:

getClassType

## Methods of TypedObject:

getBestParentFromSet
getClassType
getType
getTypeIndex
isExactType
isOfType

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
unref

## Methods of MouseWatcherParameter:

getButton
getCandidateStringEncoded
getCursorPos
getHighlightEnd
getHighlightStart
getKeycode
getModifierButtons
getMouse
hasButton
hasCandidate
hasKeycode
hasMouse
isOutside
output

getClassType static TypeHandle PGMouseWatcherParameter::get_class_type(void); Undocumented function.

output void PGMouseWatcherParameter::output(ostream &out) const; Description:

getClassType static TypeHandle TypedWritableReferenceCount::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedWritable::get_class_type(void); Undocumented function.

getBestParentFromSet int TypedObject::get_best_parent_from_Set(set< int > const &) const; Description: Returns true if the current object is the indicated type exactly.

getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function.

getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type().

getTypeIndex int TypedObject::get_type_index(void) const; Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly.

isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.

getButton ButtonHandle MouseWatcherParameter::get_button(void) const; Description: Returns the mouse or keyboard button associated with this event. If has_button(), above, returns false, this returns ButtonHandle::none().

getCandidateStringEncoded string MouseWatcherParameter::get_candidate_string_encoded(void) const; Description: Returns the candidate string associated with this event. If has_candidate(), above, returns false, this returns the empty string.

getCursorPos unsigned int MouseWatcherParameter::get_cursor_pos(void) const; Description: Returns the position of the user's edit cursor within the candidate string.

getHighlightEnd unsigned int MouseWatcherParameter::get_highlight_end(void) const; Description: Returns one more than the last highlighted character in the candidate string.

getHighlightStart unsigned int MouseWatcherParameter::get_highlight_start(void) const; Description: Returns the first highlighted character in the candidate string.

getKeycode int MouseWatcherParameter::get_keycode(void) const; Description: Returns the keycode associated with this event. If has_keycode(), above, returns false, this returns 0.

getModifierButtons ModifierButtons const &MouseWatcherParameter::get_modifier_buttons(void) const; Description: Returns the set of modifier buttons that were being held down while the event was generated.

getMouse LPoint2f const &MouseWatcherParameter::get_mouse(void) const; Description: 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.

hasButton bool MouseWatcherParameter::has_button(void) const; Description: Returns true if this parameter has an associated mouse or keyboard button, false otherwise.

hasCandidate bool MouseWatcherParameter::has_candidate(void) const; Description: Returns true if this parameter has an associated candidate string, false otherwise.

hasKeycode bool MouseWatcherParameter::has_keycode(void) const; Description: Returns true if this parameter has an associated keycode, false otherwise.

hasMouse bool MouseWatcherParameter::has_mouse(void) const; Description: Returns true if this parameter has an associated mouse position, false otherwise.

isOutside bool MouseWatcherParameter::is_outside(void) const; Description: 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 void MouseWatcherParameter::output(ostream &out) const; Description: