parameters: (self)
docstring: Does the actual sizing of the tab control.
docstring_summary: Does the actual sizing of the tab control.
docstring_tokens: Does the actual sizing of the tab control .
function: def DoSizing(self):
          """ Does the actual sizing of the tab control. """
  
          if not self._tabs:
              return
  
          hideOnSingle = ((self._tabs.GetAGWFlags() & AUI_NB_HIDE_ON_SINGLE_TAB) and \
                          self._tabs.GetPageCount() <= 1)
  
          if not hideOnSingle and not self._parent._hide_tabs:
              tab_height = self._tab_ctrl_height
  
              self._tab_rect = wx.Rect(self._rect.x, self._rect.y, self._rect.width, self._tab_ctrl_height)
  
              if self._tabs.GetAGWFlags() & AUI_NB_BOTTOM:
                  self._tab_rect = wx.Rect(self._rect.x, self._rect.y + self._rect.height - tab_height,
                                           self._rect.width, tab_height)
                  self._tabs.SetDimensions(self._rect.x, self._rect.y + self._rect.height - tab_height,
                                           self._rect.width, tab_height)
                  self._tabs.SetTabRect(wx.Rect(0, 0, self._rect.width, tab_height))
  
              else:
  
                  self._tab_rect = wx.Rect(self._rect.x, self._rect.y, self._rect.width, tab_height)
                  self._tabs.SetDimensions(self._rect.x, self._rect.y, self._rect.width, tab_height)
                  self._tabs.SetTabRect(wx.Rect(0, 0, self._rect.width, tab_height))
  
              # TODO: elif (GetAGWFlags() & AUI_NB_LEFT)
              # TODO: elif (GetAGWFlags() & AUI_NB_RIGHT)
  
              self._tabs.Refresh()
              self._tabs.Update()
  
          else:
  
              tab_height = 0
              self._tabs.SetDimensions(self._rect.x, self._rect.y, self._rect.width, tab_height)
              self._tabs.SetTabRect(wx.Rect(0, 0, self._rect.width, tab_height))
  
          pages = self._tabs.GetPages()
  
          for page in pages:
  
              height = self._rect.height - tab_height
  
              if height < 0:
                  # avoid passing negative height to wx.Window.SetSize(), this
                  # results in assert failures/GTK+ warnings
                  height = 0
  
              if self._tabs.GetAGWFlags() & AUI_NB_BOTTOM:
                  page.window.SetDimensions(self._rect.x, self._rect.y, self._rect.width, height)
  
              else:
                  page.window.SetDimensions(self._rect.x, self._rect.y + tab_height,
                                            self._rect.width, height)
  
              # TODO: elif (GetAGWFlags() & AUI_NB_LEFT)
              # TODO: elif (GetAGWFlags() & AUI_NB_RIGHT)
  
              if repr(page.window.__class__).find("AuiMDIChildFrame") >= 0:
                  page.window.ApplyMDIChildFrameRect()
function_tokens: def DoSizing ( self ) : if not self . _tabs : return hideOnSingle = ( ( self . _tabs . GetAGWFlags ( ) & AUI_NB_HIDE_ON_SINGLE_TAB ) and self . _tabs . GetPageCount ( ) <= 1 ) if not hideOnSingle and not self . _parent . _hide_tabs : tab_height = self . _tab_ctrl_height self . _tab_rect = wx . Rect ( self . _rect . x , self . _rect . y , self . _rect . width , self . _tab_ctrl_height ) if self . _tabs . GetAGWFlags ( ) & AUI_NB_BOTTOM : self . _tab_rect = wx . Rect ( self . _rect . x , self . _rect . y + self . _rect . height - tab_height , self . _rect . width , tab_height ) self . _tabs . SetDimensions ( self . _rect . x , self . _rect . y + self . _rect . height - tab_height , self . _rect . width , tab_height ) self . _tabs . SetTabRect ( wx . Rect ( 0 , 0 , self . _rect . width , tab_height ) ) else : self . _tab_rect = wx . Rect ( self . _rect . x , self . _rect . y , self . _rect . width , tab_height ) self . _tabs . SetDimensions ( self . _rect . x , self . _rect . y , self . _rect . width , tab_height ) self . _tabs . SetTabRect ( wx . Rect ( 0 , 0 , self . _rect . width , tab_height ) ) # TODO: elif (GetAGWFlags() & AUI_NB_LEFT) # TODO: elif (GetAGWFlags() & AUI_NB_RIGHT) self . _tabs . Refresh ( ) self . _tabs . Update ( ) else : tab_height = 0 self . _tabs . SetDimensions ( self . _rect . x , self . _rect . y , self . _rect . width , tab_height ) self . _tabs . SetTabRect ( wx . Rect ( 0 , 0 , self . _rect . width , tab_height ) ) pages = self . _tabs . GetPages ( ) for page in pages : height = self . _rect . height - tab_height if height < 0 : # avoid passing negative height to wx.Window.SetSize(), this # results in assert failures/GTK+ warnings height = 0 if self . _tabs . GetAGWFlags ( ) & AUI_NB_BOTTOM : page . window . SetDimensions ( self . _rect . x , self . _rect . y , self . _rect . width , height ) else : page . window . SetDimensions ( self . _rect . x , self . _rect . y + tab_height , self . _rect . width , height ) # TODO: elif (GetAGWFlags() & AUI_NB_LEFT) # TODO: elif (GetAGWFlags() & AUI_NB_RIGHT) if repr ( page . window . __class__ ) . find ( "AuiMDIChildFrame" ) >= 0 : page . window . ApplyMDIChildFrameRect ( )