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.
__init__ |
Default class constructor. |
Decrement |
Display previous image in sequence. |
DoGetBestSize |
Get the best size of the widget. |
Draw |
Draw the widget. |
Increment |
Display next image in sequence. |
Next |
Display next image in sequence according to direction. |
OnDestroyWindow |
Handles the wx.EVT_WINDOW_DESTROY event for Throbber . |
OnPaint |
Handles the wx.EVT_PAINT event for Throbber . |
OnTimer |
Handles the wx.EVT_TIMER event for Throbber . |
Previous |
Display previous image in sequence according to direction. |
Rest |
Stop the animation and return to frame 0. |
Reverse |
Change the direction of the animation. |
Running |
Returns True if the animation is running. |
SetCurrent |
Set current image. |
SetFont |
Set the font for the label. |
SetFrameDelay |
Delay between each frame. |
SetLabel |
Change the text of the label. |
SetRest |
Set rest image. |
SetSequence |
Order to display images in. |
Start |
Start the animation. |
Stop |
Stop the animation. |
ToggleLabel |
Toggle the label. |
ToggleOverlay |
Toggle the overlay image. |
Update |
Handles the EVT_UPDATE_THROBBER event for ResizeWidget . |
Wrap |
Wrap the throbber around. |
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.
__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.
Parameters: |
|
---|
Decrement
(self)¶Display previous image in sequence.
DoGetBestSize
(self)¶Get the best size of the widget.
Returns: | the width and height |
---|
Increment
(self)¶Display next image in sequence.
Next
(self)¶Display next image in sequence according to direction.
OnDestroyWindow
(self, event)¶Handles the wx.EVT_WINDOW_DESTROY
event for Throbber
.
Parameters: | event – a wx.WindowDestroyEvent event to be processed. |
---|
OnPaint
(self, event)¶Handles the wx.EVT_PAINT
event for Throbber
.
Parameters: | event – a PaintEvent event to be processed. |
---|
OnTimer
(self, event)¶Handles the wx.EVT_TIMER
event for Throbber
.
Parameters: | event – a TimerEvent event to be processed. |
---|
Previous
(self)¶Display previous image in sequence according to direction.
Rest
(self)¶Stop the animation and return to frame 0.
Reverse
(self)¶Change the direction of the animation.
Running
(self)¶Returns True
if the animation is running.
SetCurrent
(self, current)¶Set current image.
Parameters: | current (int) – the index to the current image |
---|
SetFrameDelay
(self, frameDelay = 0.05)¶Delay between each frame.
Parameters: | frameDelay (float) – the delay between frames. |
---|
SetLabel
(self, label)¶Change the text of the label.
Parameters: | label (string) – the label text. |
---|
SetRest
(self, rest)¶Set rest image.
Parameters: | rest (int) – the index for the rest frame. |
---|
SetSequence
(self, sequence = None)¶Order to display images in.
Parameters: | sequence – a sequence containing the order to display images in. |
---|
Start
(self)¶Start the animation.
Stop
(self)¶Stop the animation.
ToggleLabel
(self, state = None)¶Toggle the label.
Parameters: | state (boolean) – set the label state or if None toggle state. |
---|
ToggleOverlay
(self, state = None)¶Toggle the overlay image.
Parameters: | state (boolean) – set the overlay state or if None toggle state. |
---|
Update
(self, event)¶Handles the EVT_UPDATE_THROBBER
event for ResizeWidget
.
Parameters: | event – a UpdateThrobberEvent event to be processed. |
---|
Wrap
(self)¶Wrap the throbber around.