toasterbox — Phatch v0.2 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Phatch v0.2 documentation »
- other »
- pyWx »

# toasterbox

ToasterBox is a cross-platform widget to make the creation of MSN style “toaster” popups easier.

## Description

ToasterBox is a cross-platform widget to make the creation of MSN style “toaster” popups easier. The syntax is really easy especially if you are familiar with the syntax of wxPython.

It has 2 main styles:

- TB_SIMPLE: using this style, you will be able to specify a background image for

    ToasterBox, text properties as text colour, font and label.

- TB_COMPLEX: this style will allow you to put almost any control inside a

    ToasterBox. You can add a panel in which you can put all the controls you like.

Both styles support the setting of ToasterBox position (on screen coordinates), size, the time after which the ToasterBox is destroyed (linger), and the scroll speed of ToasterBox.

## Supported Platforms

ToasterBox has been tested on the following platforms:

- Windows (verified on Windows XP, 2000)
- Linux
- Mac

## License And Version

ToasterBox is freeware and distributed under the wxPython license.

Latest revision: Andrea Gavana @ 29 May 2009, 09.00 GMT Version 0.2

class `other.pyWx.toasterbox.` `ToasterBox`(parent, tbstyle=1, windowstyle=33587202, closingstyle=1, scrollType=2)

  Bases: `wx._misc.Timer`

  `AddPanel`(panel)
    Adds a panel to the ToasterBox. Use it only for ToasterBoxes created with TB_COMPLEX style.
  `CleanList`()
    Clean the window list.
  `GetToasterBoxWindow`()
    Returns the ToasterBox frame.
  `MoveAbove`(tb)
    If a ToasterBox already exists, move the new one above.
  `Notify`()
    It’s time to hide a ToasterBox!
  `Play`()
    Creates the ToasterBoxWindow, that does all the job.
  `SetPopupBackgroundColor`(colour=None)
    Sets the ToasterBox background colour. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupBitmap`(bitmap=None)
    Sets the ToasterBox background image. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupPauseTime`(pausetime)
    Sets the time after which the ToasterBox is destroyed (linger).
  `SetPopupPosition`(pos)
    Sets the ToasterBox position on screen.
  `SetPopupPositionByInt`(pos)
    Sets the ToasterBox position on screen, at one of the screen corners.
  `SetPopupScrollSpeed`(speed)
    Sets the ToasterBox scroll speed. The speed parameter is the pause time (in ms) for every step in the ScrollUp() method.
  `SetPopupSize`(size)
    Sets the ToasterBox size.
  `SetPopupText`(text)
    Sets the ToasterBox text. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupTextColor`(colour=None)
    Sets the ToasterBox foreground colour. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupTextFont`(font=None)
    Sets the ToasterBox text font. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetTitle`(title)
    Sets the ToasterBox title if it was created with TB_CAPTION window style.

class `other.pyWx.toasterbox.` `ToasterBoxWindow`(parent, parent2, tbstyle, windowstyle, closingstyle, scrollType=2)

  Bases: `wx._windows.Frame`

  `AddPanel`(panel)
    Adds a panel to the ToasterBox. Use it only for ToasterBoxes created with TB_COMPLEX style.
  `DrawText`()
  `GetPopupText`()
    Returns the ToasterBox text. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `NotifyTimer`(event)
    Hides gradually the ToasterBoxWindow.
  `OnClose`(event)
  `OnMouseDown`(event)
  `Play`()
    Creates the ToasterBoxWindow, that does all the job.
  `ScrollDown`()
    Scrolls the ToasterBox down, which means gradually hiding the ToasterBox.
  `ScrollUp`()
    Scrolls the ToasterBox up, which means gradually showing the ToasterBox.
  `SetPopupBackgroundColor`(colour)
    Sets the ToasterBox background colour. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupBitmap`(bitmap)
    Sets the ToasterBox background image. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupPauseTime`(pausetime)
    Sets the time after which the ToasterBox is destroyed (linger).
  `SetPopupPosition`(pos)
    Sets the ToasterBox position on screen.
  `SetPopupPositionByInt`(pos)
    Sets the ToasterBox position on screen, at one of the screen corners.
  `SetPopupScrollSpeed`(speed)
    Sets the ToasterBox scroll speed. The speed parameter is the pause time (in ms) for every step in the ScrollUp() method.
  `SetPopupSize`(size)
    Sets the ToasterBox size.
  `SetPopupText`(text)
    Sets the ToasterBox text. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupTextColor`(colour)
    Sets the ToasterBox foreground colour. Use it only for ToasterBoxes created with TB_SIMPLE style.
  `SetPopupTextFont`(font)
    Sets the ToasterBox text font. Use it only for ToasterBoxes created with TB_SIMPLE style.

### Navigation

- index
- modules |
- next |
- previous |
- Phatch v0.2 documentation »
- other »
- pyWx »