.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.throbber .. highlight:: python .. _wx.lib.throbber.Throbber: ========================================================================================================================================== |phoenix_title| **wx.lib.throbber.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| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class Throbber:
| |super_classes| Known Superclasses ================================== :class:`wx.Panel` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.throbber.Throbber.__init__` Default class constructor. :meth:`~wx.lib.throbber.Throbber.Decrement` Display previous image in sequence. :meth:`~wx.lib.throbber.Throbber.DoGetBestSize` Get the best size of the widget. :meth:`~wx.lib.throbber.Throbber.Draw` Draw the widget. :meth:`~wx.lib.throbber.Throbber.Increment` Display next image in sequence. :meth:`~wx.lib.throbber.Throbber.Next` Display next image in sequence according to direction. :meth:`~wx.lib.throbber.Throbber.OnDestroyWindow` Handles the ``wx.EVT_WINDOW_DESTROY`` event for :class:`Throbber`. :meth:`~wx.lib.throbber.Throbber.OnPaint` Handles the ``wx.EVT_PAINT`` event for :class:`Throbber`. :meth:`~wx.lib.throbber.Throbber.OnTimer` Handles the ``wx.EVT_TIMER`` event for :class:`Throbber`. :meth:`~wx.lib.throbber.Throbber.Previous` Display previous image in sequence according to direction. :meth:`~wx.lib.throbber.Throbber.Rest` Stop the animation and return to frame 0. :meth:`~wx.lib.throbber.Throbber.Reverse` Change the direction of the animation. :meth:`~wx.lib.throbber.Throbber.Running` Returns ``True`` if the animation is running. :meth:`~wx.lib.throbber.Throbber.SetCurrent` Set current image. :meth:`~wx.lib.throbber.Throbber.SetFont` Set the font for the label. :meth:`~wx.lib.throbber.Throbber.SetFrameDelay` Delay between each frame. :meth:`~wx.lib.throbber.Throbber.SetLabel` Change the text of the label. :meth:`~wx.lib.throbber.Throbber.SetRest` Set rest image. :meth:`~wx.lib.throbber.Throbber.SetSequence` Order to display images in. :meth:`~wx.lib.throbber.Throbber.Start` Start the animation. :meth:`~wx.lib.throbber.Throbber.Stop` Stop the animation. :meth:`~wx.lib.throbber.Throbber.ToggleLabel` Toggle the label. :meth:`~wx.lib.throbber.Throbber.ToggleOverlay` Toggle the overlay image. :meth:`~wx.lib.throbber.Throbber.Update` Handles the ``EVT_UPDATE_THROBBER`` event for :class:`ResizeWidget`. :meth:`~wx.lib.throbber.Throbber.Wrap` Wrap the throbber around. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: Throbber(wx.Panel) 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 = wx.DefaultPosition, size = wx.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 ) Default class constructor. :param `parent`: parent window, must not be ``None`` :param integer `id`: window identifier. A value of -1 indicates a default value :param `bitmap`: a :class:`wx.Bitmap` to be used :param `pos`: the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform :param `size`: the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform :param `frameDelay`: time delay between frames :param `frames`: number of frames (only necessary for composite image) :param `frameWidth`: width of each frame (only necessary for composite image) :param string `label`: optional text to be displayed :param `overlay`: optional :class:`wx.Bitmap` to overlay on animation :param boolean `reverse`: reverse direction at end of animation :param integer `style`: the underlying :class:`wx.Control` style :param string `name`: the widget name. :param `rest`: the rest frame :param `current`: the current frame :param `direction`: 1 advances = -1 reverses :param `sequence`: sequence of frames, defaults to range(self.frames) .. method:: Decrement(self) Display previous image in sequence. .. method:: DoGetBestSize(self) Get the best size of the widget. :returns: the width and height .. method:: Draw(self, dc) Draw the widget. :param `dc`: the :class:`wx.DC` to draw on .. method:: Increment(self) Display next image in sequence. .. method:: Next(self) Display next image in sequence according to direction. .. method:: OnDestroyWindow(self, event) Handles the ``wx.EVT_WINDOW_DESTROY`` event for :class:`Throbber`. :param `event`: a :class:`wx.WindowDestroyEvent` event to be processed. .. method:: OnPaint(self, event) Handles the ``wx.EVT_PAINT`` event for :class:`Throbber`. :param `event`: a :class:`PaintEvent` event to be processed. .. method:: OnTimer(self, event) Handles the ``wx.EVT_TIMER`` event for :class:`Throbber`. :param `event`: a :class:`TimerEvent` event to be processed. .. 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. :param int `current`: the index to the current image .. method:: SetFont(self, font) Set the font for the label. :param `font`: the :class:`wx.Font` to use .. method:: SetFrameDelay(self, frameDelay = 0.05) Delay between each frame. :param float `frameDelay`: the delay between frames. .. method:: SetLabel(self, label) Change the text of the label. :param string `label`: the label text. .. method:: SetRest(self, rest) Set rest image. :param int `rest`: the index for the rest frame. .. method:: SetSequence(self, sequence = None) Order to display images in. :param `sequence`: a sequence containing the order to display images in. .. method:: Start(self) Start the animation. .. method:: Stop(self) Stop the animation. .. method:: ToggleLabel(self, state = None) Toggle the label. :param boolean `state`: set the label state or if None toggle state. .. method:: ToggleOverlay(self, state = None) Toggle the overlay image. :param boolean `state`: set the overlay state or if None toggle state. .. method:: Update(self, event) Handles the ``EVT_UPDATE_THROBBER`` event for :class:`ResizeWidget`. :param `event`: a :class:`UpdateThrobberEvent` event to be processed. .. method:: Wrap(self) Wrap the throbber around.