Kamaelia docs : Kamaelia.UI.Pygame.Text.TextDisplayer

Kamaelia.UI.Pygame.Text.TextDisplayer

For examples and more explanations, see the module level docs.


class TextDisplayer(Axon.Component.component)

TextDisplayer(...) -> new TextDisplayer Pygame component.

Keyword arguments:

  • size -- (w, h) size of the TextDisplayer surface, in pixels.

    Default (500, 300).

  • text_height -- font size. Default 18.

  • bgcolour -- tuple containing RGB values for the background color.

    Default is a pale yellow.

  • fgcolour -- tuple containing RGB values for the text color.

    Default is black.

  • position -- tuple containing x,y coordinates of the surface's

    upper left corner in relation to the Pygame window. Default (0,0)

Inboxes

  • control : shutdown handling
  • _quitevents : user-generated quit events
  • _surface : for PygameDisplay to send surfaces to
  • inbox : for incoming lines of text

Outboxes

  • outbox : not used
  • signal : propagates out shutdown signals
  • _pygame : for sending requests to PygameDisplay

Methods defined here

initPygame(self, **argd)

requests a display surface from the PygameDisplay service, fills the color in, and copies it

main(self)

Main loop

needShutdown(self)

Checks for control messages

update(self, text)

Updates text to the bottom of the screen while scrolling old text upwards. Delegates most of the work to updateLine

updateLine(self, line)

Updates one line of text to bottom of screen, scrolling old text upwards.

Feedback

Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 19 Oct 2008 at 14:29:09 UTC/GMT

This is a page from the Kamaelia website. You can find the original here: