.. include:: headings.inc .. currentmodule:: lib.ticker .. highlight:: python .. _lib.ticker.Ticker: ========================================================================================================================================== |phoenix_title| **Ticker** ========================================================================================================================================== | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **Ticker** .. raw:: html

Inheritance diagram of Ticker

| |super_classes| Known Superclasses ================================== :class:`PyControl` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.ticker.Ticker.__init__` :meth:`~lib.ticker.Ticker.AcceptsFocus` Non-interactive, so don't accept focus :meth:`~lib.ticker.Ticker.DoGetBestSize` Width we don't care about, height is either -1, or the character :meth:`~lib.ticker.Ticker.DrawText` Draws the ticker text at the current offset using the provided DC :meth:`~lib.ticker.Ticker.GetDirection` :meth:`~lib.ticker.Ticker.GetFPS` Update speed of the ticker :meth:`~lib.ticker.Ticker.GetPPF` Pixels per frame :meth:`~lib.ticker.Ticker.GetText` :meth:`~lib.ticker.Ticker.IsTicking` Is the ticker ticking? ie, is the text moving? :meth:`~lib.ticker.Ticker.OnErase` Noop because of double buffering :meth:`~lib.ticker.Ticker.OnPaint` :meth:`~lib.ticker.Ticker.OnTick` :meth:`~lib.ticker.Ticker.SetDirection` Sets the direction of the ticker: right to left(rtl) or left to right (ltr) :meth:`~lib.ticker.Ticker.SetFont` :meth:`~lib.ticker.Ticker.SetFPS` Adjust the update speed of the ticker :meth:`~lib.ticker.Ticker.SetPPF` Set the number of pixels per frame the ticker moves - ie, how "jumpy" it is :meth:`~lib.ticker.Ticker.SetText` Set the ticker text. :meth:`~lib.ticker.Ticker.ShouldInheritColours` Don't get colours from our parent... :meth:`~lib.ticker.Ticker.Start` Starts the text moving :meth:`~lib.ticker.Ticker.Stop` Stop moving the text :meth:`~lib.ticker.Ticker.UpdateExtent` Updates the cached text extent if needed ================================================================================ ================================================================================ | |api| Class API =============== .. class:: Ticker(PyControl) .. method:: __init__(self, parent, id=-1, text='', fgcolor = BLACK, bgcolor = WHITE, start=True, ppf=2, fps=20, direction="rtl", pos=DefaultPosition, size=DefaultSize, style=NO_BORDER, name="Ticker" ) .. method:: AcceptsFocus(self) Non-interactive, so don't accept focus .. method:: DoGetBestSize(self) Width we don't care about, height is either -1, or the character height of our text with a little extra padding .. method:: DrawText(self, dc) Draws the ticker text at the current offset using the provided DC .. method:: GetDirection(self) .. method:: GetFPS(self) Update speed of the ticker .. method:: GetPPF(self) Pixels per frame .. method:: GetText(self) .. method:: IsTicking(self) Is the ticker ticking? ie, is the text moving? .. method:: OnErase(self, evt) Noop because of double buffering .. method:: OnPaint(self, evt) .. method:: OnTick(self, evt) .. method:: SetDirection(self, dir) Sets the direction of the ticker: right to left(rtl) or left to right (ltr) .. method:: SetFont(self, font) .. method:: SetFPS(self, fps) Adjust the update speed of the ticker .. method:: SetPPF(self, ppf) Set the number of pixels per frame the ticker moves - ie, how "jumpy" it is .. method:: SetText(self, text) Set the ticker text. .. method:: ShouldInheritColours(self) Don't get colours from our parent... .. method:: Start(self) Starts the text moving .. method:: Stop(self) Stop moving the text .. method:: UpdateExtent(self, dc) Updates the cached text extent if needed