.. include:: headings.inc .. currentmodule:: lib.throbber .. highlight:: python .. _lib.throbber.Throbber: ========================================================================================================================================== |phoenix_title| **Throbber** ========================================================================================================================================== The first argument is either the name of a file that will be split into frames (a composite image) or a list of strings of image names that will be treated as individual frames. If a single (composite) image is given, then additional information must be provided: the number of frames in the image and the width of each frame. The first frame is treated as the "at rest" frame (it is not shown during animation, but only when Throbber.Rest() is called. A second, single image may be optionally specified to overlay on top of the animation. A label may also be specified to show on top of the animation. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **Throbber** .. raw:: html

Inheritance diagram of Throbber

| |super_classes| Known Superclasses ================================== :class:`PyPanel` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.throbber.Throbber.__init__` :meth:`~lib.throbber.Throbber.Decrement` Display previous image in sequence :meth:`~lib.throbber.Throbber.DoGetBestSize` :meth:`~lib.throbber.Throbber.Draw` :meth:`~lib.throbber.Throbber.Increment` Display next image in sequence :meth:`~lib.throbber.Throbber.Next` Display next image in sequence according to direction :meth:`~lib.throbber.Throbber.OnDestroyWindow` :meth:`~lib.throbber.Throbber.OnPaint` :meth:`~lib.throbber.Throbber.OnTimer` :meth:`~lib.throbber.Throbber.Previous` Display previous image in sequence according to direction :meth:`~lib.throbber.Throbber.Rest` Stop the animation and return to frame 0 :meth:`~lib.throbber.Throbber.Reverse` Change the direction of the animation :meth:`~lib.throbber.Throbber.Running` Returns ``True`` if the animation is running :meth:`~lib.throbber.Throbber.SetCurrent` Set current image :meth:`~lib.throbber.Throbber.SetFont` Set the font for the label :meth:`~lib.throbber.Throbber.SetFrameDelay` Delay between each frame :meth:`~lib.throbber.Throbber.SetLabel` Change the text of the label :meth:`~lib.throbber.Throbber.SetRest` Set rest image :meth:`~lib.throbber.Throbber.SetSequence` Order to display images :meth:`~lib.throbber.Throbber.Start` Start the animation :meth:`~lib.throbber.Throbber.Stop` Stop the animation :meth:`~lib.throbber.Throbber.ToggleLabel` Toggle the label :meth:`~lib.throbber.Throbber.ToggleOverlay` Toggle the overlay image :meth:`~lib.throbber.Throbber.Update` :meth:`~lib.throbber.Throbber.Wrap` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: Throbber(PyPanel) The first argument is either the name of a file that will be split into frames (a composite image) or a list of strings of image names that will be treated as individual frames. If a single (composite) image is given, then additional information must be provided: the number of frames in the image and the width of each frame. The first frame is treated as the "at rest" frame (it is not shown during animation, but only when Throbber.Rest() is called. A second, single image may be optionally specified to overlay on top of the animation. A label may also be specified to show on top of the animation. .. method:: __init__(self, parent, id, bitmap, pos = DefaultPosition, size = DefaultSize, frameDelay = 0.1, frames = 0, frameWidth = 0, label = None, overlay = None, reverse = 0, style = 0, name = "throbber", rest = 0, current = 0, direction = 1, sequence = None ) .. method:: Decrement(self) Display previous image in sequence .. method:: DoGetBestSize(self) .. method:: Draw(self, dc) .. method:: Increment(self) Display next image in sequence .. method:: Next(self) Display next image in sequence according to direction .. method:: OnDestroyWindow(self, event) .. method:: OnPaint(self, event) .. method:: OnTimer(self, event) .. method:: Previous(self) Display previous image in sequence according to direction .. method:: Rest(self) Stop the animation and return to frame 0 .. method:: Reverse(self) Change the direction of the animation .. method:: Running(self) Returns ``True`` if the animation is running .. method:: SetCurrent(self, current) Set current image .. method:: SetFont(self, font) Set the font for the label .. method:: SetFrameDelay(self, frameDelay = 0.05) Delay between each frame .. method:: SetLabel(self, label) Change the text of the label .. method:: SetRest(self, rest) Set rest image .. method:: SetSequence(self, sequence = None) Order to display images .. method:: Start(self) Start the animation .. method:: Stop(self) Stop the animation .. method:: ToggleLabel(self, state = None) Toggle the label .. method:: ToggleOverlay(self, state = None) Toggle the overlay image .. method:: Update(self, event) .. method:: Wrap(self)