p.Display(Plane) : class documentation

Part of planes View In Hierarchy

planes main screen class.
A Display instance serves as the root Plane in planes.

Additional attributes:

Display.display
    The Pygame display Surface

Display.dragged_plane
    The currently dragged plane

Display.key_sensitive_plane
    The Plane to be notified of Pygame keyboard events. Initially None.

Display.last_mouseover_plane
    The last Plane a mouseover condition was found for. Initially None.

Display.mouse_buttons
    A dict mapping Pygame mouse button numbers to description strings.

Display.show_stats
    Boolean flag to indicate whether to display performance statistics.
    Set in Display.process() by examining user input. Initially False.

Display.font
    A pygame.font.Font instance using the system default font.
Method __init__ Calling pygame.display.set_mode(). If fullscreen is True, the display will use the full screen.
Method key_sensitive No summary
Method process No summary
Method render Call base class render(), then blit to the Pygame display if something has changed. If force is True, blit to Pygame display regardless.

Inherited from Plane:

Method sub Remove the Plane given from its current parent and add it as a subplane of this Plane.
Method remove Remove subplane by name or Plane instance.
Method remove_all Convenience method to call Plane.remove() for all subplanes.
Method __getattr__ Access subplanes as attributes.
Method get_plane_at Return the (sub)plane and the succeeding parent coordinates at the given coordinates. Subplanes are tested in reverse order of their addition (i.e. latest first).
Method update No summary
Method clicked Called when there is a MOUSEDOWN event on this plane. If click callbacks are set, the appropriate one is called with this Plane as argument.
Method dropped_upon If a plane is dropped on top of this one, call dropped_upon_callback() and conditionally grab it.
Method destroy Remove this Plane from the parent plane, remove all subplanes and delete all pygame Surfaces.
Method sync Save the Plane given as master Plane and the position offset to that Plane for position synchronisation in Plane.update().
Method unsync Remove the position synchronisation to the sync master Plane.
Method mouseover_callback Callback function when the mouse cursor moves over this plane. The default implementation sets Plan.mouseover to True when Plane.highlight is set.
Method mouseout_callback Callback function when the mouse cursor has left this plane. The default implementation sets Plan.mouseover to False.
Method __repr__ Readable string representation.
def __init__(self, resolution_tuple, fullscreen=False):
Calling pygame.display.set_mode().
If fullscreen is True, the display will use the full screen.
def key_sensitive(self, plane):
Register the Plane given as sensitive to Pygame keyboard events.
Display will call plane.keydown(KEYDOWN_event) when a key is
pressed and the Plane has a parent.
plane.activate() will be called when the plane is registered.
plane.deactivate() will be called on the old plane.
def process(self, event_list):
Process a pygame event list.
This is the main method of planes and should be called once per
frame.
It will also check mouseover conditions, even if event_list is empty.
def render(self, force=False):
Call base class render(), then blit to the Pygame display if something has changed.
If force is True, blit to Pygame display regardless.
API Documentation for planes, generated by pydoctor at 2013-03-05 14:16:20.