This class does all the job, by handling background images, text properties
and panel adding. Depending on the style you choose, ToasterBoxWindow
will
behave differently in order to handle widgets inside it.
__init__ |
Default class constructor. |
AddPanel |
Adds a panel to the ToasterBox . |
AlphaCycle |
Handles the wx.EVT_TIMER event for ToasterBoxWindow . |
DrawText |
Draws the text label for a ToasterBox with TB_SIMPLE style set. |
GetPopupText |
Returns the ToasterBox text. |
MakeWindowTransparent |
Makes the ToasterBoxWindow window transparent. |
NotifyTimer |
Hides gradually the ToasterBoxWindow . |
OnClose |
Handles the wx.EVT_CLOSE event for ToasterBoxWindow . |
OnMouseDown |
Handles the wx.EVT_LEFT_DOWN event for ToasterBoxWindow . |
OnPaint |
Handles the wx.EVT_PAINT event for ToasterBoxWindow . |
OnScrollTimer |
Handles the wx.EVT_TIMER event for ToasterBoxWindow scrolling up/down. |
Play |
Creates the ToasterBoxWindow , that does all the job. |
ScrollDown |
Scrolls the ToasterBox down, which means gradually hiding it. |
ScrollUp |
Scrolls the ToasterBox up, which means gradually showing it. |
SetPopupBackgroundColour |
Sets the ToasterBox background colour. |
SetPopupBitmap |
Sets the ToasterBox background image. |
SetPopupPauseTime |
Sets the time after which the ToasterBox is destroyed (linger). |
SetPopupPosition |
Sets the ToasterBox position on screen. |
SetPopupPositionByInt |
Sets the ToasterBox position on screen, at one of the screen corners. |
SetPopupScrollSpeed |
Sets the ToasterBox scroll speed. |
SetPopupSize |
Sets the ToasterBox size. |
SetPopupText |
Sets the ToasterBox text label. |
SetPopupTextColour |
Sets the ToasterBox foreground colour. |
SetPopupTextFont |
Sets the ToasterBox text font. |
SetupPositions |
Sets up the position, size and scrolling step for ToasterBoxWindow . |
SetUseFocus |
If focus is True , Instructs ToasterBoxWindow to steal the focus from the |
TearDown |
Scrolls the ToasterBox down, which means gradually hiding it. |
TearUp |
Scrolls the ToasterBox up, which means gradually showing it. |
ToasterBoxWindow
(wx.Frame)¶This class does all the job, by handling background images, text properties
and panel adding. Depending on the style you choose, ToasterBoxWindow
will
behave differently in order to handle widgets inside it.
__init__
(self, parent, parent2, tbstyle, windowstyle, closingstyle, scrollType=TB_SCR_TYPE_DU)¶Default class constructor. Used internally. Do not call directly this class in your application!
Parameters: |
|
---|
AddPanel
(self, panel)¶Adds a panel to the ToasterBox
.
Parameters: | panel – an instance of wx.Window . |
---|
Note
Use this method only for a ToasterBox
created with the TB_COMPLEX
style.
AlphaCycle
(self, event)¶Handles the wx.EVT_TIMER
event for ToasterBoxWindow
.
Parameters: | event – a TimerEvent event to be processed. |
---|
DrawText
(self, dc=None)¶Draws the text label for a ToasterBox
with TB_SIMPLE
style set.
Parameters: | dc – an instance of wx.DC . If defaulted to None , a ClientDC
will be created on the fly. |
---|
GetPopupText
(self)¶Returns the ToasterBox
text.
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
MakeWindowTransparent
(self, amount)¶Makes the ToasterBoxWindow
window transparent.
Parameters: | amount – the alpha channel value. |
---|
NotifyTimer
(self, event)¶Hides gradually the ToasterBoxWindow
.
OnClose
(self, event)¶Handles the wx.EVT_CLOSE
event for ToasterBoxWindow
.
Parameters: | event – a CloseEvent event to be processed. |
---|
OnMouseDown
(self, event)¶Handles the wx.EVT_LEFT_DOWN
event for ToasterBoxWindow
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnPaint
(self, event)¶Handles the wx.EVT_PAINT
event for ToasterBoxWindow
.
Parameters: | event – a PaintEvent event to be processed. |
---|
Note
This event is handled and processed only if the style TB_SIMPLE
is
given to ToasterBox
.
OnScrollTimer
(self, event)¶Handles the wx.EVT_TIMER
event for ToasterBoxWindow
scrolling up/down.
Parameters: | event – a TimerEvent event to be processed. |
---|
Play
(self)¶Creates the ToasterBoxWindow
, that does all the job.
ScrollDown
(self)¶Scrolls the ToasterBox
down, which means gradually hiding it.
ScrollUp
(self)¶Scrolls the ToasterBox
up, which means gradually showing it.
SetPopupBackgroundColour
(self, colour)¶Sets the ToasterBox
background colour.
Parameters: | colour – a valid wx.Colour object. If defaulted to None , then
the background colour will be white. |
---|
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
SetPopupBitmap
(self, bitmap=None)¶Sets the ToasterBox
background image.
Parameters: | bitmap – a valid wx.Bitmap object. If defaulted to None , then
no background bitmap is used. |
---|
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
SetPopupPauseTime
(self, pausetime)¶Sets the time after which the ToasterBox
is destroyed (linger).
Parameters: | pausetime – the delay after which the control is destroyed, in seconds. |
---|
SetPopupPosition
(self, pos)¶Sets the ToasterBox
position on screen.
Parameters: | pos – the widget position, an instance of wx.Point . |
---|
SetPopupPositionByInt
(self, pos)¶Sets the ToasterBox
position on screen, at one of the screen corners.
Parameters: | pos – an integer specifying the screen corner, namely:
|
---|
SetPopupScrollSpeed
(self, speed)¶Sets the ToasterBox
scroll speed.
Parameters: | speed – it is the pause time (in milliseconds) for every step in the
ScrollUp method. |
---|
SetPopupSize
(self, size)¶Sets the ToasterBox
size.
Parameters: | size – the new control size, an instance of wx.Size . |
---|
SetPopupText
(self, text)¶Sets the ToasterBox
text label.
Parameters: | text – the widget label. |
---|
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
SetPopupTextColour
(self, colour)¶Sets the ToasterBox
foreground colour.
Parameters: | colour – a valid wx.Colour object. If defaulted to None , then
the background colour will be black. |
---|
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
SetPopupTextFont
(self, font)¶Sets the ToasterBox
text font.
Parameters: | colour – a valid wx.Colour object. If defaulted to None , then
a simple generic font will be generated. |
---|
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
SetupPositions
(self)¶Sets up the position, size and scrolling step for ToasterBoxWindow
.
SetUseFocus
(self, focus, originalfocus)¶If focus is True
, Instructs ToasterBoxWindow
to steal the focus from the
parent application, otherwise it returns the focus to the original owner.
Parameters: |
|
---|
TearDown
(self)¶Scrolls the ToasterBox
down, which means gradually hiding it.
TearUp
(self)¶Scrolls the ToasterBox
up, which means gradually showing it.