Responder
Base class of Window and View for event processing.
Module | require("gui") |
Type | Class |
Methods
setCapture()
Set mouse capture to the responder.
releaseCapture()
Release mouse capture if the responder has mouse capture.
hasCapture()
Return whether the responder has mouse capture.
Return
Boolean
Events
onMouseDown(self, event)
Emitted when pressing mouse buttons.
Parameters
Responder
selfMouseEvent
event
Preventable
Yes.onMouseUp(self, event)
Emitted when releasing mouse buttons.
Parameters
Responder
selfMouseEvent
event
Preventable
Yes.onMouseMove(self, event)
Emitted when user moves mouse in the responder.
Parameters
Responder
selfMouseEvent
event
Preventable
No.onMouseEnter(self, event)
Emitted when mouse enters the responder.
Parameters
Responder
selfMouseEvent
event
Preventable
No.onMouseLeave(self, event)
Emitted when mouse leaves the responder.
Parameters
Responder
selfMouseEvent
event
Preventable
No.onKeyDown(self, event)
Emitted when pressing keyboard.
Parameters
Preventable
Yes.onKeyUp(self, event)
Emitted when releasing keyboard.
Parameters
Preventable
Yes.onCaptureLost(self)
Emitted when the mouse capture on responder has been released.
Parameters
Responder
self