parameters: (self, dc, wnd, rect)
docstring: Draws the tab area background.
  
          :param `dc`: a :class:`DC` device context;
          :param `wnd`: a :class:`Window` instance object;
          :param Rect `rect`: the tab control rectangle.
docstring_summary: Draws the tab area background.
docstring_tokens: Draws the tab area background .
function: def DrawBackground(self, dc, wnd, rect):
          """
          Draws the tab area background.
  
          :param `dc`: a :class:`DC` device context;
          :param `wnd`: a :class:`Window` instance object;
          :param Rect `rect`: the tab control rectangle.
          """
  
          self._buttonRect = wx.Rect()
  
          # draw background
          agwFlags = self.GetAGWFlags()
          if agwFlags & AUI_NB_BOTTOM:
              r = wx.Rect(rect.x, rect.y, rect.width+2, rect.height)
  
          # TODO: else if (agwFlags & AUI_NB_LEFT) 
          # TODO: else if (agwFlags & AUI_NB_RIGHT) 
          else: #for AUI_NB_TOP
              r = wx.Rect(rect.x, rect.y, rect.width+2, rect.height-3)
  
          dc.GradientFillLinear(r, self._background_top_colour, self._background_bottom_colour, wx.SOUTH)
  
          # draw base lines
  
          dc.SetPen(self._border_pen)
          y = rect.GetHeight()
          w = rect.GetWidth()
  
          if agwFlags & AUI_NB_BOTTOM:
              dc.SetBrush(wx.Brush(self._background_bottom_colour))
              dc.DrawRectangle(-1, 0, w+2, 4)
  
          # TODO: else if (agwFlags & AUI_NB_LEFT) 
          # TODO: else if (agwFlags & AUI_NB_RIGHT)
          
          else: # for AUI_NB_TOP
              dc.SetBrush(self._base_colour_brush)
              dc.DrawRectangle(-1, y-4, w+2, 4)
function_tokens: def DrawBackground ( self , dc , wnd , rect ) : self . _buttonRect = wx . Rect ( ) # draw background agwFlags = self . GetAGWFlags ( ) if agwFlags & AUI_NB_BOTTOM : r = wx . Rect ( rect . x , rect . y , rect . width + 2 , rect . height ) # TODO: else if (agwFlags & AUI_NB_LEFT)  # TODO: else if (agwFlags & AUI_NB_RIGHT)  else : #for AUI_NB_TOP r = wx . Rect ( rect . x , rect . y , rect . width + 2 , rect . height - 3 ) dc . GradientFillLinear ( r , self . _background_top_colour , self . _background_bottom_colour , wx . SOUTH ) # draw base lines dc . SetPen ( self . _border_pen ) y = rect . GetHeight ( ) w = rect . GetWidth ( ) if agwFlags & AUI_NB_BOTTOM : dc . SetBrush ( wx . Brush ( self . _background_bottom_colour ) ) dc . DrawRectangle ( - 1 , 0 , w + 2 , 4 ) # TODO: else if (agwFlags & AUI_NB_LEFT)  # TODO: else if (agwFlags & AUI_NB_RIGHT) else : # for AUI_NB_TOP dc . SetBrush ( self . _base_colour_brush ) dc . DrawRectangle ( - 1 , y - 4 , w + 2 , 4 )