class root.RootWidget(Widget)
For the GUI to function, there must be exactly one instance of
RootWidget. It implements the main event loop and serves as the
ultimate container for all other visible widgets.
Constructor
- RootWidget(surface)
- Initialises the root widget with the given surface, which will normally be the PyGame screen, but could be a subsurface of it.
Methods
- set_timer(interval)
- Arranges for the begin_frame method to be called every interval milliseconds.
- run(modal_widget = None)
- Runs the main event loop. If a modal_widget is given, it is run as a modal dialog until its dismiss method is called. Otherwise, control is retained until a QUIT event is received, whereupon SystemExit is raised.
Abstract Methods
- begin_frame()
- Called at the beginning of each frame time, as determined by a previous call to set_timer.
---