]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/lib/ticker_xrc.py
   1 #---------------------------------------------------------------------- 
   2 # Name:        wx.lib.ticker_xrc 
   3 # Purpose:     A XRC handler for wx.lib.ticker 
   9 # Copyright:   (c) 2005 by Chris Mellon 
  10 # Licence:     wxWindows license 
  11 #---------------------------------------------------------------------- 
  15 from wx
.lib
.ticker 
import Ticker
 
  17 class wxTickerXmlHandler(xrc
.XmlResourceHandler
): 
  19         xrc
.XmlResourceHandler
.__init
__(self
) 
  20         self
.AddWindowStyles() 
  22     def CanHandle(self
, node
): 
  23         return self
.IsOfClass(node
, "wxTicker") 
  25     def DoCreateResource(self
): 
  27             self
.GetParentAsWindow(), 
  29             pos 
= self
.GetPosition(), 
  30             size 
= self
.GetSize(), 
  33         if self
.HasParam("text"): 
  34             t
.SetText(self
.GetText("text")) 
  35         if self
.HasParam("start"): 
  36             if self
.GetBool("start"): 
  40         if self
.HasParam("ppf"): 
  41             t
.SetPPF(self
.GetLong("ppf")) 
  42         if self
.HasParam("fps"): 
  43             t
.SetFPS(self
.GetLong("fps")) 
  44         if self
.HasParam("direction"): 
  45             t
.SetDirection(self
.GetText("direction")) 
  47         self
.SetupWindow(t
)     # handles font, bg/fg color