parameters: (self, dc, wnd, caption, bitmap, active, close_button_state, control=None)
return_statement: return (tab_width, tab_height), x_extent
docstring: Returns the tab size for the given caption, bitmap and button state.
  
          :param `dc`: a :class:`DC` device context;
          :param `wnd`: a :class:`Window` instance object;
          :param string `caption`: the tab text caption;
          :param Bitmap `bitmap`: the bitmap displayed on the tab;
          :param bool `active`: whether the tab is selected or not;
          :param integer `close_button_state`: the state of the close button on the tab;
          :param Window `control`: a :class:`Window` instance inside a tab (or ``None``).
docstring_summary: Returns the tab size for the given caption, bitmap and button state.
docstring_tokens: Returns the tab size for the given caption bitmap and button state .
function: def GetTabSize(self, dc, wnd, caption, bitmap, active, close_button_state, control=None):
          """
          Returns the tab size for the given caption, bitmap and button state.
  
          :param `dc`: a :class:`DC` device context;
          :param `wnd`: a :class:`Window` instance object;
          :param string `caption`: the tab text caption;
          :param Bitmap `bitmap`: the bitmap displayed on the tab;
          :param bool `active`: whether the tab is selected or not;
          :param integer `close_button_state`: the state of the close button on the tab;
          :param Window `control`: a :class:`Window` instance inside a tab (or ``None``).
          """
  
          dc.SetFont(self._measuring_font)
          measured_textx, measured_texty, dummy = dc.GetMultiLineTextExtent(caption)
  
          # add padding around the text
          tab_width = measured_textx
          tab_height = measured_texty
  
          # if the close button is showing, add space for it
          if close_button_state != AUI_BUTTON_STATE_HIDDEN:
              tab_width += self._active_close_bmp.GetWidth() + 3
  
          # if there's a bitmap, add space for it
          if bitmap.IsOk():
              tab_width += bitmap.GetWidth()
              tab_width += 3 # right side bitmap padding
              tab_height = max(tab_height, bitmap.GetHeight())
          
          # add padding
          tab_width += 16
          tab_height += 10
  
          agwFlags = self.GetAGWFlags()
          if agwFlags & AUI_NB_TAB_FIXED_WIDTH:
              tab_width = self._fixed_tab_width
  
          if control is not None:
              tab_width += control.GetSize().GetWidth() + 4
              
          x_extent = tab_width
  
          return (tab_width, tab_height), x_extent
function_tokens: def GetTabSize ( self , dc , wnd , caption , bitmap , active , close_button_state , control = None ) : dc . SetFont ( self . _measuring_font ) measured_textx , measured_texty , dummy = dc . GetMultiLineTextExtent ( caption ) # add padding around the text tab_width = measured_textx tab_height = measured_texty # if the close button is showing, add space for it if close_button_state != AUI_BUTTON_STATE_HIDDEN : tab_width += self . _active_close_bmp . GetWidth ( ) + 3 # if there's a bitmap, add space for it if bitmap . IsOk ( ) : tab_width += bitmap . GetWidth ( ) tab_width += 3 # right side bitmap padding tab_height = max ( tab_height , bitmap . GetHeight ( ) ) # add padding tab_width += 16 tab_height += 10 agwFlags = self . GetAGWFlags ( ) if agwFlags & AUI_NB_TAB_FIXED_WIDTH : tab_width = self . _fixed_tab_width if control is not None : tab_width += control . GetSize ( ) . GetWidth ( ) + 4 x_extent = tab_width return ( tab_width , tab_height ) , x_extent