Phil's pyGame Utilities Documentation

Overview

Scripts
tileedit | leveledit | tganew | levelfancy

Reference
algo | ani | engine | fonts | high | html | layout | text | timer | vid

Tutorials
1 | 2 | 3 | 4 | 5

GUI Ref.
theme | style | widget | surface | const

Containers
container | app | table | document | area

Forms
form | group

Widgets
basic | button | input | keysym | slider | select | misc

Other
menus | dialog

Tutorials
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10

gui.app

sections
App
App.__init__
App.set_global_app
App.init
App.event
App.loop
App.paint
App.update
App.run
App.open
App.close
Desktop
Defines the top-level application widget

App

The top-level widget for an application. Example: import pygame from pgu import gui widget = gui.Button("Testing") app = gui.App() app.init(widget=widget) app.run()

App.__init__

Create a new application given the (optional) theme instance.

App.set_global_app

Registers this app as _the_ global PGU application. You generally shouldn't need to call this function.

App.init

Initialize the application. Keyword arguments: widget -- the top-level widget in the application screen -- the pygame surface to render to area -- the rectangle (within 'screen') to use for rendering

App.event

Pass an event to the main widget. If you are managing your own mainloop, this function should be called periodically when you are processing pygame events.

App.loop

Performs one iteration of the PGU application loop, which processes events and update the pygame display.

App.paint

Renders the application onto the given pygame surface

App.update

Update the screen in a semi-efficient manner, and returns a list of pygame rects to be updated.

App.run

Run an application. Automatically calls App.init and then forever loops while calling App.event and App.update Keyword arguments: widget -- the top-level widget to use screen -- the pygame surface to render to delay -- the delay between updates (in milliseconds)

App.open

Opens the given PGU window and positions it on the screen

App.close

Closes the previously opened PGU window

Desktop

Create an App using the desktop theme class.

all content (c) 2006 Phil Hassey - Phil's pyGame Utilities