Class pyglet.window.event.WindowExitHandler

Known Subclasses:
Window

Determine if the window should be closed.

This event handler watches for the ESC key or the window close event and sets self.has_exit to True when either is pressed. An instance of this class is automatically attached to all new pyglet.window.Window objects.

Methods

  on_close(self)
  on_key_press(self, symbol, modifiers)

Instance Variables

bool has_exit = False
True if the user wants to close the window.