GraphicsWindowInputDevice
from panda3d.core import GraphicsWindowInputDevice
- class GraphicsWindowInputDevice
Bases:
Bases:
InputDevice
This is a virtual input device that represents the keyboard and mouse pair that is associated with a particular window. It collects mouse and keyboard events from the windowing system while the window is in focus.
Inheritance diagram
- button_down(button: ButtonHandle, time: float)
The following interface is for the various kinds of
GraphicsWindows
to record the data incoming on the device.
- button_resume_down(button: ButtonHandle, time: float)
Records that the indicated button was depressed earlier, and we only just detected the event after the fact. This is mainly useful for tracking the state of modifier keys.
- button_up(button: ButtonHandle, time: float)
Records that the indicated button has been released.
- candidate(candidate_string: str, highlight_start: int, highlight_end: int, cursor_pos: int)
Records that the indicated candidate string has been highlighted. This is used to implement IME support for typing in international languages, especially Chinese/Japanese/Korean.
- focus_lost(time: float)
This should be called when the window focus is lost, so that we may miss upcoming button events (especially “up” events) for the next period of time. It generates keyboard and mouse “up” events for those buttons that we previously sent unpaired “down” events, so that the Panda application will believe all buttons are now released.
- static get_class_type() TypeHandle
- get_pointer() PointerData
Returns the
PointerData
associated with the input device’s pointer. This only makes sense if has_pointer() also returns true.
- pointer_moved(x: float, y: float, time: float)
To be called by a particular kind of
GraphicsWindow
to indicate that the pointer has moved by the given relative amount.
- raw_button_down(button: ButtonHandle, time: float)
Records that the indicated button has been depressed.
- raw_button_up(button: ButtonHandle, time: float)
Records that the indicated button has been released.
- remove_pointer(id: int)
To be called by a particular kind of
GraphicsWindow
to indicate that the pointer no longer exists.
- set_pointer_in_window(x: float, y: float, time: float)
To be called by a particular kind of
GraphicsWindow
to indicate that the pointer is within the window, at the given pixel coordinates.
- set_pointer_out_of_window(time: float)
To be called by a particular kind of
GraphicsWindow
to indicate that the pointer is no longer within the window.
- update_pointer(data: PointerData, time: float)
To be called by a particular kind of
GraphicsWindow
to indicate that the pointer data has changed.