__init__ |
Default class constructor. |
AcceptsFocus |
Non-interactive, so don’t accept focus |
DoGetBestSize |
Width we don’t care about, height is either -1, or the character |
DrawText |
Draws the ticker text at the current offset using the provided DC. |
GetDirection |
Get the set direction. |
GetFPS |
Get the frames per second speed of the ticker. |
GetPPF |
Get pixels per frame setting. |
GetText |
Get the current ticker text. |
IsTicking |
Is the ticker ticking? ie, is the text moving? |
OnErase |
Noop because of double buffering |
OnPaint |
Handles the wx.EVT_PAINT event for Ticker . |
OnTick |
Handles the wx.EVT_TIMER event for Ticker . |
SetDirection |
Sets the direction of the ticker: right to left (rtl) or |
SetFont |
Set the font for the control. |
SetFPS |
Adjust the update speed of the ticker. |
SetPPF |
Set the number of pixels per frame the ticker moves - ie, |
SetText |
Set the ticker text. |
ShouldInheritColours |
Don’t get colours from our parent. |
Start |
Starts the text moving |
Stop |
Stop moving the text |
UpdateExtent |
Updates the cached text extent if needed. |
Ticker
(wx.Control)¶__init__
(self, parent, id=-1, text="", fgcolor = wx.BLACK, bgcolor = wx.WHITE, start=True, ppf=2, fps=20, direction="rtl", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.NO_BORDER, name="Ticker")¶Default class constructor.
Parameters: |
|
---|
AcceptsFocus
(self)¶Non-interactive, so don’t accept focus
DoGetBestSize
(self)¶Width we don’t care about, height is either -1, or the character height of our text with a little extra padding
DrawText
(self, dc)¶Draws the ticker text at the current offset using the provided DC.
Parameters: | dc (wx.DC) – the dc to use. |
---|
GetDirection
(self)¶Get the set direction.
GetFPS
(self)¶Get the frames per second speed of the ticker.
GetPPF
(self)¶Get pixels per frame setting.
GetText
(self)¶Get the current ticker text.
IsTicking
(self)¶Is the ticker ticking? ie, is the text moving?
OnErase
(self, evt)¶Noop because of double buffering
Handles the wx.EVT_ERASE_BACKGROUND
event for Ticker
.
Parameters: | evt – a EraseEvent event to be processed. |
---|
OnPaint
(self, evt)¶Handles the wx.EVT_PAINT
event for Ticker
.
Parameters: | evt – a PaintEvent event to be processed. |
---|
OnTick
(self, evt)¶Handles the wx.EVT_TIMER
event for Ticker
.
Parameters: | evt – a TimerEvent event to be processed. |
---|
SetDirection
(self, dir)¶Sets the direction of the ticker: right to left (rtl) or left to right (ltr).
Parameters: | dir – the direction ‘rtl’ or ‘ltr’ |
---|
SetFPS
(self, fps)¶Adjust the update speed of the ticker.
Parameters: | fps (int) – frames per second. |
---|
SetPPF
(self, ppf)¶Set the number of pixels per frame the ticker moves - ie, how “jumpy” it is.
Parameters: | ppf (int) – the pixels per frame setting. |
---|
SetText
(self, text)¶Set the ticker text.
Parameters: | text (string) – the ticker text |
---|
ShouldInheritColours
(self)¶Don’t get colours from our parent.
Start
(self)¶Starts the text moving
Stop
(self)¶Stop moving the text