home *** CD-ROM | disk | FTP | other *** search
/ com!online 2005 April / com_0405_1.iso / opensource / BTpp-0.5.4-bin.exe / $INSTDIR / BT++.exe / MaxSizer.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2003-04-19  |  1.3 KB  |  28 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.2)
  3.  
  4. from wxPython.wx import wxPySizer, wxSize
  5.  
  6. class MaxSizer(wxPySizer):
  7.     
  8.     def __init__(self, parent):
  9.         wxPySizer.__init__(self)
  10.         self.Parent = parent
  11.  
  12.     
  13.     def CalcMin(self):
  14.         return wxSize(0, 0)
  15.  
  16.     
  17.     def RecalcSizes(self):
  18.         psize = self.Parent.GetSize()
  19.         for item in self.GetChildren():
  20.             ipt = item.GetWindow().GetPosition()
  21.             if item.GetWindow().GetClassName() == 'wxToolBar':
  22.                 item.SetDimension(ipt, wxSize(psize.GetWidth(), item.GetWindow().GetSize().height))
  23.             else:
  24.                 item.SetDimension(ipt, wxSize(psize.GetWidth() - ipt.x, psize.GetHeight() - ipt.y))
  25.         
  26.  
  27.  
  28.