ButtonHandle
from panda3d.core import ButtonHandle
- class ButtonHandle
Bases:
DTOOL_SUPER_BASE
A ButtonHandle represents a single button from any device, including keyboard buttons and mouse buttons (but see KeyboardButton and MouseButton).
Inheritance diagram
- __init__(*args, **kwargs)
- alias
- ascii_equivalent
- compareTo()
C++ Interface: compare_to(ButtonHandle self, const ButtonHandle other)
- /**
Sorts ButtonHandles arbitrarily (according to <, >, etc.). Returns a
number less than 0 if this type sorts before the other one, greater than
zero if it sorts after, 0 if they are equivalent.
*/
- compare_to()
C++ Interface: compare_to(ButtonHandle self, const ButtonHandle other)
- /**
Sorts ButtonHandles arbitrarily (according to <, >, etc.). Returns a
number less than 0 if this type sorts before the other one, greater than
zero if it sorts after, 0 if they are equivalent.
*/
- getAlias()
C++ Interface: get_alias(ButtonHandle self)
- /**
Returns the alias (alternate name) associated with the button, if any, or
ButtonHandle::none() if the button has no alias.
Each button is allowed to have one alias, and multiple different buttons
can refer to the same alias. The alias should be the more general name for
the button, for instance, shift is an alias for lshift, but not vice-versa.
*/
- getAsciiEquivalent()
C++ Interface: get_ascii_equivalent(ButtonHandle self)
- /**
Returns the character code associated with the button, or ‘0’ if no ASCII
code was associated.
*/
- getClassType()
C++ Interface: get_class_type()
- getHash()
C++ Interface: get_hash(ButtonHandle self)
- /**
Returns a hash code suitable for phash_map.
*/
- getIndex()
C++ Interface: get_index(ButtonHandle self)
- /**
Returns the integer index associated with this ButtonHandle. Each
different ButtonHandle will have a different index. However, you probably
shouldn’t be using this method; you should just treat the ButtonHandles as
opaque classes. This is provided for the convenience of non-C++ scripting
languages to build a hashtable of ButtonHandles.
*/
- get_alias()
C++ Interface: get_alias(ButtonHandle self)
- /**
Returns the alias (alternate name) associated with the button, if any, or
ButtonHandle::none() if the button has no alias.
Each button is allowed to have one alias, and multiple different buttons
can refer to the same alias. The alias should be the more general name for
the button, for instance, shift is an alias for lshift, but not vice-versa.
*/
- get_ascii_equivalent()
C++ Interface: get_ascii_equivalent(ButtonHandle self)
- /**
Returns the character code associated with the button, or ‘0’ if no ASCII
code was associated.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_hash()
C++ Interface: get_hash(ButtonHandle self)
- /**
Returns a hash code suitable for phash_map.
*/
- get_index()
C++ Interface: get_index(ButtonHandle self)
- /**
Returns the integer index associated with this ButtonHandle. Each
different ButtonHandle will have a different index. However, you probably
shouldn’t be using this method; you should just treat the ButtonHandles as
opaque classes. This is provided for the convenience of non-C++ scripting
languages to build a hashtable of ButtonHandles.
*/
- hasAsciiEquivalent()
C++ Interface: has_ascii_equivalent(ButtonHandle self)
- /**
Returns true if the button was created with an ASCII equivalent code (e.g.
for a standard keyboard button).
*/
- has_ascii_equivalent()
C++ Interface: has_ascii_equivalent(ButtonHandle self)
- /**
Returns true if the button was created with an ASCII equivalent code (e.g.
for a standard keyboard button).
*/
- index
- matches()
C++ Interface: matches(ButtonHandle self, const ButtonHandle other)
- /**
Returns true if this ButtonHandle is the same as the other one, or if the
other one is an alias for this one. (Does not return true if this button
is an alias for the other one, however.)
This is a more general comparison than operator ==.
*/
- name
- none()
C++ Interface: none()