parameters: (self, dc, rect, state, colour)
docstring: Draws a button using the MS Office 2007 theme.
  
          :param `dc`: an instance of :class:`DC`;
          :param Rect `rect`: the button's client rectangle;
          :param integer `state`: the button state;
          :param `colour`: a valid :class:`Colour` instance.
docstring_summary: Draws a button using the MS Office 2007 theme.
docstring_tokens: Draws a button using the MS Office 2007 theme .
function: def DrawButtonColour(self, dc, rect, state, colour):
          """
          Draws a button using the MS Office 2007 theme.
  
          :param `dc`: an instance of :class:`DC`;
          :param Rect `rect`: the button's client rectangle;
          :param integer `state`: the button state;
          :param `colour`: a valid :class:`Colour` instance.
          """
  
          artMgr = ArtManager.Get()
          
          # Keep old pen and brush
          dcsaver = DCSaver(dc)
          
          # Define the rounded rectangle base on the given rect
          # we need an array of 9 points for it        
          baseColour = colour
  
          # Define the middle points
          leftPt = wx.Point(rect.x, rect.y + (rect.height / 2))
          rightPt = wx.Point(rect.x + rect.width-1, rect.y + (rect.height / 2))
  
          # Define the top region
          top = wx.RectPP((rect.GetLeft(), rect.GetTop()), rightPt)
          bottom = wx.RectPP(leftPt, (rect.GetRight(), rect.GetBottom()))
  
          upperBoxTopPercent, upperBoxBottomPercent, lowerBoxTopPercent, lowerBoxBottomPercent, \
                              concaveUpperBox, concaveLowerBox = self.GetColoursAccordingToState(state)
  
          topStartColour = artMgr.LightColour(baseColour, upperBoxTopPercent)
          topEndColour = artMgr.LightColour(baseColour, upperBoxBottomPercent)
          bottomStartColour = artMgr.LightColour(baseColour, lowerBoxTopPercent)
          bottomEndColour = artMgr.LightColour(baseColour, lowerBoxBottomPercent)
  
          artMgr.PaintStraightGradientBox(dc, top, topStartColour, topEndColour)
          artMgr.PaintStraightGradientBox(dc, bottom, bottomStartColour, bottomEndColour)
  
          rr = wx.Rect(rect.x, rect.y, rect.width, rect.height)
          dc.SetBrush(wx.TRANSPARENT_BRUSH)
  
          frameColour = artMgr.LightColour(baseColour, 60)
          dc.SetPen(wx.Pen(frameColour))
          dc.DrawRectangleRect(rr)
  
          wc = artMgr.LightColour(baseColour, 80)
          dc.SetPen(wx.Pen(wc))
          rr.Deflate(1, 1)
          dc.DrawRectangleRect(rr)
function_tokens: def DrawButtonColour ( self , dc , rect , state , colour ) : artMgr = ArtManager . Get ( ) # Keep old pen and brush dcsaver = DCSaver ( dc ) # Define the rounded rectangle base on the given rect # we need an array of 9 points for it         baseColour = colour # Define the middle points leftPt = wx . Point ( rect . x , rect . y + ( rect . height / 2 ) ) rightPt = wx . Point ( rect . x + rect . width - 1 , rect . y + ( rect . height / 2 ) ) # Define the top region top = wx . RectPP ( ( rect . GetLeft ( ) , rect . GetTop ( ) ) , rightPt ) bottom = wx . RectPP ( leftPt , ( rect . GetRight ( ) , rect . GetBottom ( ) ) ) upperBoxTopPercent , upperBoxBottomPercent , lowerBoxTopPercent , lowerBoxBottomPercent , concaveUpperBox , concaveLowerBox = self . GetColoursAccordingToState ( state ) topStartColour = artMgr . LightColour ( baseColour , upperBoxTopPercent ) topEndColour = artMgr . LightColour ( baseColour , upperBoxBottomPercent ) bottomStartColour = artMgr . LightColour ( baseColour , lowerBoxTopPercent ) bottomEndColour = artMgr . LightColour ( baseColour , lowerBoxBottomPercent ) artMgr . PaintStraightGradientBox ( dc , top , topStartColour , topEndColour ) artMgr . PaintStraightGradientBox ( dc , bottom , bottomStartColour , bottomEndColour ) rr = wx . Rect ( rect . x , rect . y , rect . width , rect . height ) dc . SetBrush ( wx . TRANSPARENT_BRUSH ) frameColour = artMgr . LightColour ( baseColour , 60 ) dc . SetPen ( wx . Pen ( frameColour ) ) dc . DrawRectangleRect ( rr ) wc = artMgr . LightColour ( baseColour , 80 ) dc . SetPen ( wx . Pen ( wc ) ) rr . Deflate ( 1 , 1 ) dc . DrawRectangleRect ( rr )