Method summary
- __init__(self, enable_window, **kwargs)
- draw(self)
- on_activate(self)
- on_close(self)
- on_context_lost(self)
- on_context_state_lost(self)
- on_deactivate(self)
- on_expose(self)
- on_hide(self)
- on_key_press(self, symbol, modifiers)
- on_key_release(self, symbol, modifiers)
- on_mouse_drag(self, x, y, dx, dy, buttons, modifiers)
- on_mouse_enter(self, x, y)
- on_mouse_leave(self, x, y)
- on_mouse_motion(self, x, y, dx, dy)
- on_mouse_press(self, x, y, button, modifiers)
- on_mouse_release(self, x, y, button, modifiers)
- on_mouse_scroll(self, x, y, scroll_x, scroll_y)
- on_move(self, x, y)
- on_resize(self, width, height)
- on_show(self)
- on_text(self, text)
- on_text_motion(self, motion)
- on_text_motion_select(self, motion)
- request_redraw(self, coordinates = None)
Methods
- __init__(self, enable_window, **kwargs)
PygletWindow needs a reference to the Enable window; other arguments are passed through directly to the pyglet.Window constructor.
- draw(self)
Called by the mainloop to perform the actual draw
- on_activate(self)
The window was activated.
- on_close(self)
- on_context_lost(self)
- on_context_state_lost(self)
- on_deactivate(self)
The window lost focus.
- on_expose(self)
- on_hide(self)
The window was minimized or hidden.
- on_key_press(self, symbol, modifiers)
- on_key_release(self, symbol, modifiers)
- on_mouse_drag(self, x, y, dx, dy, buttons, modifiers)
- on_mouse_enter(self, x, y)
- on_mouse_leave(self, x, y)
- on_mouse_motion(self, x, y, dx, dy)
- on_mouse_press(self, x, y, button, modifiers)
- on_mouse_release(self, x, y, button, modifiers)
- on_mouse_scroll(self, x, y, scroll_x, scroll_y)
- on_move(self, x, y)
The window was moved. x is the distance from the left edge of the screen to the left edge of the window. y is the distance from the top edge of the screen to the top edge of the window.
- on_resize(self, width, height)
- on_show(self)
The window was shown.
- on_text(self, text)
- on_text_motion(self, motion)
- on_text_motion_select(self, motion)
- request_redraw(self, coordinates = None)
Called by self.enable_window to request a redraw coordinates is a tuple (x,y,w,h) of a specific sub-region to redraw.