#NEWLINE# def DrawBorder( self , dc , window , rect , pane ) : #NEWLINE# #INDENT# '\n        Draws the pane border.\n\n        :param `dc`: a :class:`DC` device context;\n        :param `window`: an instance of :class:`Window`;\n        :param Rect `rect`: the border rectangle;\n        :param `pane`: the pane for which the border is drawn.\n        ' #NEWLINE# drect = wx . Rect ( * rect ) #NEWLINE# dc . SetPen ( self . _border_pen ) #NEWLINE# dc . SetBrush ( wx . TRANSPARENT_BRUSH ) #NEWLINE# border_width = self . GetMetric ( AUI_DOCKART_PANE_BORDER_SIZE ) #NEWLINE# if pane . IsToolbar ( ) : #NEWLINE# #INDENT# for ii in xrange ( 0 , border_width ) : #NEWLINE# #INDENT# dc . SetPen ( wx . WHITE_PEN ) #NEWLINE# dc . DrawLine ( drect . x , drect . y , ( drect . x + drect . width ) , drect . y ) #NEWLINE# dc . DrawLine ( drect . x , drect . y , drect . x , ( drect . y + drect . height ) ) #NEWLINE# dc . SetPen ( self . _border_pen ) #NEWLINE# dc . DrawLine ( drect . x , ( ( drect . y + drect . height ) - 1 ) , ( drect . x + drect . width ) , ( ( drect . y + dc . height ) - 1 ) ) #NEWLINE# dc . DrawLine ( ( ( drect . x + drect . width ) - 1 ) , drect . y , ( ( drect . x + drect . width ) - 1 ) , ( drect . y + drect . height ) ) #NEWLINE# drect . Deflate ( 1 , 1 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for ii in xrange ( 0 , border_width ) : #NEWLINE# #INDENT# dc . DrawRectangle ( drect . x , drect . y , drect . width , drect . height ) #NEWLINE# drect . Deflate ( 1 , 1 )