home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 October / maximum-cd-2011-10.iso / DiscContents / digsby_setup.exe / lib / gui / uberwidgets / spacerpanel.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-06-22  |  1.9 KB  |  36 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. from gui.skin.skinobjects import SkinColor
  5. import wx
  6. from gui.prototypes.newskinmodule import NewSkinModule
  7. SpacerPanelSkinDefaults = {
  8.     'background': (lambda : SkinColor(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE))),
  9.     'size': (lambda : wx.Point(2, 2)) }
  10.  
  11. class SpacerPanel(wx.Panel, NewSkinModule):
  12.     
  13.     def __init__(self, parent, skinkey = None):
  14.         wx.Panel.__init__(self, parent)
  15.         self.SetSkinKey(skinkey, SpacerPanelSkinDefaults)
  16.         self.Bind(wx.EVT_PAINT, self.OnPaint)
  17.  
  18.     
  19.     def DoUpdateSkin(self, skin):
  20.         self.skinSP = skin
  21.         self.SetMinSize(self.skinSP['size'])
  22.         self.Parent.Layout()
  23.  
  24.     
  25.     def GetSkinProxy(self):
  26.         if hasattr(self, 'skinSP'):
  27.             return self.skinSP
  28.  
  29.     
  30.     def OnPaint(self, event):
  31.         dc = wx.AutoBufferedPaintDC(self)
  32.         rect = wx.RectS(self.Size)
  33.         self.skinSP['background'].Draw(dc, rect)
  34.  
  35.  
  36.