parameters: (self)
docstring: Layout the panel
docstring_summary: Layout the panel
docstring_tokens: Layout the panel
function: def __DoLayout(self):
          """Layout the panel"""
          hsizer = wx.BoxSizer(wx.HORIZONTAL)
          vsizer = wx.BoxSizer(wx.VERTICAL)
  
          # Top Section
          topvsizer = wx.BoxSizer(wx.VERTICAL)
  
          # Platform dependant labels
          if wx.Platform == '__WXMSW__':
              findlbl = wx.StaticText(self, ID_FIND_LBL, _("Find what") + u":")
          else:
              findlbl = wx.StaticText(self, ID_FIND_LBL, _("Find") + u":")
  
          # Search Field
          fhsizer = wx.BoxSizer(wx.HORIZONTAL)
          fhsizer.Add(self._ftxt, 1, wx.EXPAND)
          topvsizer.AddMany([(findlbl, 0, wx.ALIGN_LEFT), ((3, 3), 0),
                            (fhsizer, 0, wx.EXPAND)])
  
          # Replace field
          rhsizer = wx.BoxSizer(wx.HORIZONTAL)
          rhsizer.Add(self._rtxt, 1, wx.EXPAND)
          rlbl = wx.StaticText(self, ID_REPLACE_LBL, _("Replace with") + u":")
          self._sizers[ID_REPLACE_LBL] = wx.BoxSizer(wx.VERTICAL)
          self._sizers[ID_REPLACE_LBL].AddMany([((5, 5), 0),
                                               (rlbl, 0, wx.ALIGN_CENTER_VERTICAL),
                                               ((3, 3), 0), (rhsizer, 0, wx.EXPAND)])
          topvsizer.AddMany([(self._sizers[ID_REPLACE_LBL], 0, wx.EXPAND),
                             ((5, 5), 0)])
  
          # Look in field
          self._sizers['look'] = wx.BoxSizer(wx.VERTICAL)
          li_sz = wx.BoxSizer(wx.HORIZONTAL)
          dirbtn = wx.Button(self, ID_CHOOSE_DIR, u"...", style=wx.BU_EXACTFIT)
          dirbtn.SetToolTipString(_("Choose Folder"))
          li_sz.AddMany([(self._lookin, 1, wx.ALIGN_CENTER_VERTICAL), ((5, 5), 0),
                         (dirbtn, 0, wx.ALIGN_CENTER_VERTICAL)])
          li_lbl = wx.StaticText(self, label=_("Look in") + u":")
          self._sizers['look'].AddMany([(li_lbl, 0, wx.ALIGN_LEFT),
                                        ((3, 3), 0),
                                        (li_sz, 0, wx.EXPAND),
                                        ((5, 5), 0)])
          topvsizer.Add(self._sizers['look'], 0, wx.EXPAND)
  
          # Search Direction Box
          self._sizers['dir'] = wx.BoxSizer(wx.VERTICAL)
          dbox = wx.StaticBox(self, id=ID_DIR_BOX, label=_("Direction"))
          dboxsz = wx.StaticBoxSizer(dbox, wx.HORIZONTAL)
          dboxsz.AddMany([(wx.RadioButton(self, wx.ID_UP, _("Up")), 0),
                          ((20, 5), 0),
                          (wx.RadioButton(self, wx.ID_DOWN, _("Down")), 0),
                          ((5, 5), 1)])
          self._sizers['dir'].AddMany([((5, 5), 0), (dboxsz, 0, wx.EXPAND)])
  
          # Search Options Box
          self._sizers['opt'] = wx.BoxSizer(wx.VERTICAL)
          statbox = wx.StaticBox(self, label=_("Find Options"))
          sboxsz = wx.StaticBoxSizer(statbox, wx.VERTICAL)
          for cid, clbl in [(ID_MATCH_CASE, _("Match case")),
                            (ID_WHOLE_WORD, _("Whole word")),
                            (ID_REGEX, _("Regular expression")),
                            (ID_RECURSE, _("Search Recursively"))]:
              sboxsz.AddMany([((3, 3), 0), (wx.CheckBox(self, cid, clbl), 0)])
  
          # File Filters
          self._sizers['filter'] = wx.BoxSizer(wx.VERTICAL)
          self._filters = wx.TextCtrl(self)
          tt_txt = _("Wildcard shell patterns for matching files (*.txt *.html).")
          self._filters.SetToolTipString(tt_txt)
  
          # Disable spell checking on mac for this control
          if wx.Platform == '__WXMAC__':
              self._filters.MacCheckSpelling(False)
  
          f_sz = wx.BoxSizer(wx.HORIZONTAL)
          f_sz.Add(self._filters, 1, wx.EXPAND)
          self._sizers['filter'].AddMany([(self._filterlbl, 0, wx.ALIGN_LEFT),
                                          ((3, 3), 0), (f_sz, 0, wx.EXPAND),
                                          ((5, 5), 0)])
          sboxsz.AddMany([((3, 3), 0), (self._sizers['filter'], 0, wx.EXPAND)])
  
          self._sizers['opt'].AddMany([((5, 5), 0), (sboxsz, 0, wx.EXPAND)])
  
          # Buttons
          bsizer = wx.BoxSizer(wx.HORIZONTAL)
          self._sizers['fspacer'] = bsizer.Add((100, 1), 1)
          self._sizers['frspacer'] = bsizer.Add((50, 1), 1)
          for bid, blbl in [(wx.ID_FIND, _("Find")),
                            (wx.ID_REPLACE, _("Replace")),
                            (ID_COUNT, _("Count")),
                            (ID_FIND_ALL, _("Find All")),
                            (ID_REPLACE_ALL, _("Replace All"))]:
              self._sizers[bid] = wx.BoxSizer(wx.HORIZONTAL)
              self._sizers[bid].Add((3, 3), 0)
              self._sizers[bid].Add(wx.Button(self, bid, blbl), 0, wx.ALIGN_RIGHT)
              bsizer.Add(self._sizers[bid], 0)
          self.FindWindowById(wx.ID_FIND).SetDefault()
  
          # Final Layout
          vsizer.AddMany([((5, 5), 0), (topvsizer, 0, wx.EXPAND),
                          (self._sizers['dir'], 0, wx.EXPAND),
                          (self._sizers['opt'], 0, wx.EXPAND), ((10, 10), 0),
                          (bsizer, 0), ((10, 10), 0)])
          hsizer.AddMany([((10, 10), 0), (vsizer, 0, wx.EXPAND), ((10, 10), 0)])
          self.SetSizer(hsizer)
          self.SetAutoLayout(True)
function_tokens: def __DoLayout ( self ) : hsizer = wx . BoxSizer ( wx . HORIZONTAL ) vsizer = wx . BoxSizer ( wx . VERTICAL ) # Top Section topvsizer = wx . BoxSizer ( wx . VERTICAL ) # Platform dependant labels if wx . Platform == '__WXMSW__' : findlbl = wx . StaticText ( self , ID_FIND_LBL , _ ( "Find what" ) + u":" ) else : findlbl = wx . StaticText ( self , ID_FIND_LBL , _ ( "Find" ) + u":" ) # Search Field fhsizer = wx . BoxSizer ( wx . HORIZONTAL ) fhsizer . Add ( self . _ftxt , 1 , wx . EXPAND ) topvsizer . AddMany ( [ ( findlbl , 0 , wx . ALIGN_LEFT ) , ( ( 3 , 3 ) , 0 ) , ( fhsizer , 0 , wx . EXPAND ) ] ) # Replace field rhsizer = wx . BoxSizer ( wx . HORIZONTAL ) rhsizer . Add ( self . _rtxt , 1 , wx . EXPAND ) rlbl = wx . StaticText ( self , ID_REPLACE_LBL , _ ( "Replace with" ) + u":" ) self . _sizers [ ID_REPLACE_LBL ] = wx . BoxSizer ( wx . VERTICAL ) self . _sizers [ ID_REPLACE_LBL ] . AddMany ( [ ( ( 5 , 5 ) , 0 ) , ( rlbl , 0 , wx . ALIGN_CENTER_VERTICAL ) , ( ( 3 , 3 ) , 0 ) , ( rhsizer , 0 , wx . EXPAND ) ] ) topvsizer . AddMany ( [ ( self . _sizers [ ID_REPLACE_LBL ] , 0 , wx . EXPAND ) , ( ( 5 , 5 ) , 0 ) ] ) # Look in field self . _sizers [ 'look' ] = wx . BoxSizer ( wx . VERTICAL ) li_sz = wx . BoxSizer ( wx . HORIZONTAL ) dirbtn = wx . Button ( self , ID_CHOOSE_DIR , u"..." , style = wx . BU_EXACTFIT ) dirbtn . SetToolTipString ( _ ( "Choose Folder" ) ) li_sz . AddMany ( [ ( self . _lookin , 1 , wx . ALIGN_CENTER_VERTICAL ) , ( ( 5 , 5 ) , 0 ) , ( dirbtn , 0 , wx . ALIGN_CENTER_VERTICAL ) ] ) li_lbl = wx . StaticText ( self , label = _ ( "Look in" ) + u":" ) self . _sizers [ 'look' ] . AddMany ( [ ( li_lbl , 0 , wx . ALIGN_LEFT ) , ( ( 3 , 3 ) , 0 ) , ( li_sz , 0 , wx . EXPAND ) , ( ( 5 , 5 ) , 0 ) ] ) topvsizer . Add ( self . _sizers [ 'look' ] , 0 , wx . EXPAND ) # Search Direction Box self . _sizers [ 'dir' ] = wx . BoxSizer ( wx . VERTICAL ) dbox = wx . StaticBox ( self , id = ID_DIR_BOX , label = _ ( "Direction" ) ) dboxsz = wx . StaticBoxSizer ( dbox , wx . HORIZONTAL ) dboxsz . AddMany ( [ ( wx . RadioButton ( self , wx . ID_UP , _ ( "Up" ) ) , 0 ) , ( ( 20 , 5 ) , 0 ) , ( wx . RadioButton ( self , wx . ID_DOWN , _ ( "Down" ) ) , 0 ) , ( ( 5 , 5 ) , 1 ) ] ) self . _sizers [ 'dir' ] . AddMany ( [ ( ( 5 , 5 ) , 0 ) , ( dboxsz , 0 , wx . EXPAND ) ] ) # Search Options Box self . _sizers [ 'opt' ] = wx . BoxSizer ( wx . VERTICAL ) statbox = wx . StaticBox ( self , label = _ ( "Find Options" ) ) sboxsz = wx . StaticBoxSizer ( statbox , wx . VERTICAL ) for cid , clbl in [ ( ID_MATCH_CASE , _ ( "Match case" ) ) , ( ID_WHOLE_WORD , _ ( "Whole word" ) ) , ( ID_REGEX , _ ( "Regular expression" ) ) , ( ID_RECURSE , _ ( "Search Recursively" ) ) ] : sboxsz . AddMany ( [ ( ( 3 , 3 ) , 0 ) , ( wx . CheckBox ( self , cid , clbl ) , 0 ) ] ) # File Filters self . _sizers [ 'filter' ] = wx . BoxSizer ( wx . VERTICAL ) self . _filters = wx . TextCtrl ( self ) tt_txt = _ ( "Wildcard shell patterns for matching files (*.txt *.html)." ) self . _filters . SetToolTipString ( tt_txt ) # Disable spell checking on mac for this control if wx . Platform == '__WXMAC__' : self . _filters . MacCheckSpelling ( False ) f_sz = wx . BoxSizer ( wx . HORIZONTAL ) f_sz . Add ( self . _filters , 1 , wx . EXPAND ) self . _sizers [ 'filter' ] . AddMany ( [ ( self . _filterlbl , 0 , wx . ALIGN_LEFT ) , ( ( 3 , 3 ) , 0 ) , ( f_sz , 0 , wx . EXPAND ) , ( ( 5 , 5 ) , 0 ) ] ) sboxsz . AddMany ( [ ( ( 3 , 3 ) , 0 ) , ( self . _sizers [ 'filter' ] , 0 , wx . EXPAND ) ] ) self . _sizers [ 'opt' ] . AddMany ( [ ( ( 5 , 5 ) , 0 ) , ( sboxsz , 0 , wx . EXPAND ) ] ) # Buttons bsizer = wx . BoxSizer ( wx . HORIZONTAL ) self . _sizers [ 'fspacer' ] = bsizer . Add ( ( 100 , 1 ) , 1 ) self . _sizers [ 'frspacer' ] = bsizer . Add ( ( 50 , 1 ) , 1 ) for bid , blbl in [ ( wx . ID_FIND , _ ( "Find" ) ) , ( wx . ID_REPLACE , _ ( "Replace" ) ) , ( ID_COUNT , _ ( "Count" ) ) , ( ID_FIND_ALL , _ ( "Find All" ) ) , ( ID_REPLACE_ALL , _ ( "Replace All" ) ) ] : self . _sizers [ bid ] = wx . BoxSizer ( wx . HORIZONTAL ) self . _sizers [ bid ] . Add ( ( 3 , 3 ) , 0 ) self . _sizers [ bid ] . Add ( wx . Button ( self , bid , blbl ) , 0 , wx . ALIGN_RIGHT ) bsizer . Add ( self . _sizers [ bid ] , 0 ) self . FindWindowById ( wx . ID_FIND ) . SetDefault ( ) # Final Layout vsizer . AddMany ( [ ( ( 5 , 5 ) , 0 ) , ( topvsizer , 0 , wx . EXPAND ) , ( self . _sizers [ 'dir' ] , 0 , wx . EXPAND ) , ( self . _sizers [ 'opt' ] , 0 , wx . EXPAND ) , ( ( 10 , 10 ) , 0 ) , ( bsizer , 0 ) , ( ( 10 , 10 ) , 0 ) ] ) hsizer . AddMany ( [ ( ( 10 , 10 ) , 0 ) , ( vsizer , 0 , wx . EXPAND ) , ( ( 10 , 10 ) , 0 ) ] ) self . SetSizer ( hsizer ) self . SetAutoLayout ( True )