parameters: (self, dc, rect)
docstring: Single rectangle for :class:`CaptionBar`.
  
          :param `dc`: an instance of :class:`DC`;
          :param `rect`: the :class:`CaptionBar` client rectangle.
docstring_summary: Single rectangle for :class:`CaptionBar`.
docstring_tokens: Single rectangle for : class : CaptionBar .
function: def DrawSingleRectangle(self, dc, rect):
          """
          Single rectangle for :class:`CaptionBar`.
  
          :param `dc`: an instance of :class:`DC`;
          :param `rect`: the :class:`CaptionBar` client rectangle.        
          """
          
          if rect.height < 2 or rect.width < 1:
              return
  
          # single frame, set up internal fill colour
  
          if self._style.GetCaptionStyle() == CAPTIONBAR_RECTANGLE:
              colour = self.GetParent().GetBackgroundColour()
              br = wx.Brush(colour, wx.SOLID)
          else:
              colour = self._style.GetFirstColour()
              br = wx.Brush(colour, wx.SOLID)
  
          # setup the pen frame
  
          pen = wx.Pen(self._style.GetSecondColour())
          dc.SetPen(pen)
          dc.SetBrush(br)
          dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height - 1)
  
          bgpen = wx.Pen(self.GetParent().GetBackgroundColour())
          dc.SetPen(bgpen)
          dc.DrawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width,
                      rect.y + rect.height - 1)
function_tokens: def DrawSingleRectangle ( self , dc , rect ) : if rect . height < 2 or rect . width < 1 : return # single frame, set up internal fill colour if self . _style . GetCaptionStyle ( ) == CAPTIONBAR_RECTANGLE : colour = self . GetParent ( ) . GetBackgroundColour ( ) br = wx . Brush ( colour , wx . SOLID ) else : colour = self . _style . GetFirstColour ( ) br = wx . Brush ( colour , wx . SOLID ) # setup the pen frame pen = wx . Pen ( self . _style . GetSecondColour ( ) ) dc . SetPen ( pen ) dc . SetBrush ( br ) dc . DrawRectangle ( rect . x , rect . y , rect . width , rect . height - 1 ) bgpen = wx . Pen ( self . GetParent ( ) . GetBackgroundColour ( ) ) dc . SetPen ( bgpen ) dc . DrawLine ( rect . x , rect . y + rect . height - 1 , rect . x + rect . width , rect . y + rect . height - 1 )