Kamaelia docs : Kamaelia.UI.Pygame.Ticker.Ticker

Kamaelia.UI.Pygame.Ticker.Ticker

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


class Ticker(Axon.Component.component)

Ticker(...) -> new Ticker component.

A pygame based component that displays incoming text as a ticker.

Keyword arguments (all optional):

  • text_height -- Font size in points (default=39)
  • line_spacing -- (default=text_height/7)
  • background_colour -- (r,g,b) background colour of the ticker (default=(128,48,128))
  • text_colour -- (r,g,b) colour of text (default=(232,232,48))
  • outline_colour -- (r,g,b) colour of the outline border (default=background_colour)
  • outline_width -- pixels width of the border (default=1)
  • position -- (x,y) pixels location of the top left corner
  • render_left -- pixels distance of left of text from left edge (default=1)
  • render_top -- pixels distance of top of text from top edge (default=1)
  • render_right -- pixels width of ticker (default=399)
  • render_bottom -- pixels height of ticker (default=299)

NOTE: render_left and render_top currently behave incorrectly if not set to 1

Inboxes

  • control : NOT USED (yet)
  • _displaycontrol : Shutdown messages & feedback from Pygame Display service
  • unpausebox : Any message unpauses the ticker
  • pausebox : Any message pauses the ticker
  • inbox : Specify (new) filename
  • alphacontrol : Transparency of the ticker (0=fully transparent, 255=fully opaque)

Outboxes

  • outbox : NOT USED
  • signal : NOT USED (yet)
  • _displaysignal : Shutdown signalling & sending requests to Pygame Display service

Methods defined here

Warning!

You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

__init__(self, **argd)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

clearDisplay(self)

Clears the ticker of any existing text.

main(self)

Main loop.

renderBorder(self, display)

Draws a rectangle to form the 'border' of the ticker

requestDisplay(self, **argd)

Generator. Gets a display surface from the Pygame Display service.

Makes the request, then yields 1 until a display surface is returned.

waitBox(self, boxname)

Generator. yields 1 until data ready on the named inbox.

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, 05 Jun 2009 at 03:01:38 UTC/GMT


Kamaelia is an open source project originated from and guided by BBC Research. For more information browse the site or get in contact.

This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)

(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved.

This web site is powered by the same code created for the bicker manor project. For more details, contact Michael Sparks at BBC Research directly (cf contact)