WindowEventLogger
(logfile=None)¶Print all events to a file.
When this event handler is added to a window it prints out all events and their parameters; useful for debugging or discovering which events you need to handle.
Example:
win = window.Window()
win.push_handlers(WindowEventLogger())
Constructor:
__init__
(logfile=None)¶Create a WindowEventLogger which writes to logfile.
Parameters: | logfile (file-like object) – The file to write to. If unspecified, stdout will be used. |
---|
Methods:
on_activate
()on_close
()on_context_lost
()on_context_state_lost
()on_deactivate
()on_draw
()on_expose
()on_hide
()on_key_press
(symbol, modifiers)on_key_release
(symbol, modifiers)on_mouse_drag
(x, y, dx, dy, buttons, modifiers)on_mouse_enter
(x, y)on_mouse_leave
(x, y)on_mouse_motion
(x, y, dx, dy)on_mouse_press
(x, y, button, modifiers)on_mouse_release
(x, y, button, modifiers)on_mouse_scroll
(x, y, dx, dy)on_move
(x, y)on_resize
(width, height)on_show
()on_text
(text)on_text_motion
(motion)on_text_motion_select
(motion)
WindowEventLogger.
on_activate
()¶WindowEventLogger.
on_close
()¶WindowEventLogger.
on_context_lost
()¶WindowEventLogger.
on_context_state_lost
()¶WindowEventLogger.
on_deactivate
()¶WindowEventLogger.
on_draw
()¶WindowEventLogger.
on_expose
()¶WindowEventLogger.
on_hide
()¶WindowEventLogger.
on_key_press
(symbol, modifiers)¶WindowEventLogger.
on_key_release
(symbol, modifiers)¶WindowEventLogger.
on_mouse_drag
(x, y, dx, dy, buttons, modifiers)¶WindowEventLogger.
on_mouse_enter
(x, y)¶WindowEventLogger.
on_mouse_leave
(x, y)¶WindowEventLogger.
on_mouse_motion
(x, y, dx, dy)¶WindowEventLogger.
on_mouse_press
(x, y, button, modifiers)¶WindowEventLogger.
on_mouse_release
(x, y, button, modifiers)¶WindowEventLogger.
on_mouse_scroll
(x, y, dx, dy)¶WindowEventLogger.
on_move
(x, y)¶WindowEventLogger.
on_resize
(width, height)¶WindowEventLogger.
on_show
()¶WindowEventLogger.
on_text
(text)¶WindowEventLogger.
on_text_motion
(motion)¶WindowEventLogger.
on_text_motion_select
(motion)¶