parameters: (self, dc, wnd, in_rect, button, orientation)
return_statement: return out_rect
docstring: Draws a button on the tab or on the tab area, depending on the button identifier. 
  
          :param `dc`: a :class:`DC` device context;
          :param `wnd`: a :class:`Window` instance object;
          :param Rect `in_rect`: rectangle the tab should be confined to;
          :param `button`: an instance of the button class;
          :param integer `orientation`: the tab orientation.
docstring_summary: Draws a button on the tab or on the tab area, depending on the button identifier.
docstring_tokens: Draws a button on the tab or on the tab area depending on the button identifier .
function: def DrawButton(self, dc, wnd, in_rect, button, orientation):
          """
          Draws a button on the tab or on the tab area, depending on the button identifier. 
  
          :param `dc`: a :class:`DC` device context;
          :param `wnd`: a :class:`Window` instance object;
          :param Rect `in_rect`: rectangle the tab should be confined to;
          :param `button`: an instance of the button class;
          :param integer `orientation`: the tab orientation.
          """
  
          bitmap_id, button_state = button.id, button.cur_state
          
          if bitmap_id == AUI_BUTTON_CLOSE:
              if button_state & AUI_BUTTON_STATE_DISABLED:
                  bmp = self._disabled_close_bmp
              else:
                  bmp = self._active_close_bmp
  
          elif bitmap_id == AUI_BUTTON_LEFT:
              if button_state & AUI_BUTTON_STATE_DISABLED:
                  bmp = self._disabled_left_bmp
              else:
                  bmp = self._active_left_bmp
  
          elif bitmap_id == AUI_BUTTON_RIGHT:
              if button_state & AUI_BUTTON_STATE_DISABLED:
                  bmp = self._disabled_right_bmp
              else:
                  bmp = self._active_right_bmp
  
          elif bitmap_id == AUI_BUTTON_WINDOWLIST:
              if button_state & AUI_BUTTON_STATE_DISABLED:
                  bmp = self._disabled_windowlist_bmp
              else:
                  bmp = self._active_windowlist_bmp
  
          else:
              if button_state & AUI_BUTTON_STATE_DISABLED:
                  bmp = button.dis_bitmap
              else:
                  bmp = button.bitmap
              
          if not bmp.IsOk():
              return
  
          rect = wx.Rect(*in_rect)
  
          if orientation == wx.LEFT:
          
              rect.SetX(in_rect.x)
              rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2))
              rect.SetWidth(bmp.GetWidth())
              rect.SetHeight(bmp.GetHeight())
          
          else:
          
              rect = wx.Rect(in_rect.x + in_rect.width - bmp.GetWidth(),
                             ((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2),
                             bmp.GetWidth(), bmp.GetHeight())
  
          self.DrawButtons(dc, rect, bmp, wx.WHITE, button_state)
  
          out_rect = wx.Rect(*rect)
          return out_rect
function_tokens: def DrawButton ( self , dc , wnd , in_rect , button , orientation ) : bitmap_id , button_state = button . id , button . cur_state if bitmap_id == AUI_BUTTON_CLOSE : if button_state & AUI_BUTTON_STATE_DISABLED : bmp = self . _disabled_close_bmp else : bmp = self . _active_close_bmp elif bitmap_id == AUI_BUTTON_LEFT : if button_state & AUI_BUTTON_STATE_DISABLED : bmp = self . _disabled_left_bmp else : bmp = self . _active_left_bmp elif bitmap_id == AUI_BUTTON_RIGHT : if button_state & AUI_BUTTON_STATE_DISABLED : bmp = self . _disabled_right_bmp else : bmp = self . _active_right_bmp elif bitmap_id == AUI_BUTTON_WINDOWLIST : if button_state & AUI_BUTTON_STATE_DISABLED : bmp = self . _disabled_windowlist_bmp else : bmp = self . _active_windowlist_bmp else : if button_state & AUI_BUTTON_STATE_DISABLED : bmp = button . dis_bitmap else : bmp = button . bitmap if not bmp . IsOk ( ) : return rect = wx . Rect ( * in_rect ) if orientation == wx . LEFT : rect . SetX ( in_rect . x ) rect . SetY ( ( ( in_rect . y + in_rect . height ) / 2 ) - ( bmp . GetHeight ( ) / 2 ) ) rect . SetWidth ( bmp . GetWidth ( ) ) rect . SetHeight ( bmp . GetHeight ( ) ) else : rect = wx . Rect ( in_rect . x + in_rect . width - bmp . GetWidth ( ) , ( ( in_rect . y + in_rect . height ) / 2 ) - ( bmp . GetHeight ( ) / 2 ) , bmp . GetWidth ( ) , bmp . GetHeight ( ) ) self . DrawButtons ( dc , rect , bmp , wx . WHITE , button_state ) out_rect = wx . Rect ( * rect ) return out_rect