#NEWLINE# def show( self ) : #NEWLINE# #INDENT# ' Shows the feature bar.\n        ' #NEWLINE# ( dock_control , parent ) = ( self . dock_control , self . parent ) #NEWLINE# if ( ( dock_control is None ) or ( parent is None ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# control = self . control #NEWLINE# if ( control is None ) : #NEWLINE# #INDENT# self . control = control = wx . Frame ( None , ( - 1 ) , '' , style = wx . BORDER_NONE ) #NEWLINE# wx . EVT_ERASE_BACKGROUND ( control , self . _erase_background ) #NEWLINE# wx . EVT_PAINT ( py , self . _paint ) #NEWLINE# wx . EVT_LEFT_DOWN ( control , self . _left_down ) #NEWLINE# wx . EVT_LEFT_UP ( control , self . _left_up ) #NEWLINE# wx . EVT_RIGHT_DOWN ( control , self . _right_down ) #NEWLINE# wx . EVT_RIGHT_UP ( control , self . _right_up ) #NEWLINE# wx . EVT_MOTION ( control , self . _mouse_move ) #NEWLINE# wx . EVT_ENTER_WINDOW ( control , self . _mouse_enter ) #NEWLINE# control . SetDropTarget ( PythonDropTarget ( self ) ) #NEWLINE# #UNINDENT# size = wx . Size ( 32 , 32 ) #NEWLINE# width = height = 0 #NEWLINE# horizontal = self . horizontal #NEWLINE# for feature in dock_control . active_features : #NEWLINE# #INDENT# bitmap = feature . bitmap #NEWLINE# if ( bitmap is not None ) : #NEWLINE# #INDENT# if horizontal : #NEWLINE# #INDENT# width += ( bitmap . GetWidth ( ) + 3 ) #NEWLINE# height = max ( height , bitmap . GetHeight ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# width = max ( width , bitmap . GetWidth ( ) ) #NEWLINE# height += ( bitmap . GetHeight ( ) + 3 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( width > 0 ) : #NEWLINE# #INDENT# if horizontal : #NEWLINE# #INDENT# size = wx . Size ( ( width + 5 ) , ( height + 8 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# size = wx . Size ( ( width + 8 ) , ( height + 5 ) ) #NEWLINE# #UNINDENT# #UNINDENT# control . SetSize ( size ) #NEWLINE# ( px , py ) = parent . GetScreenPosition ( ) #NEWLINE# ( fx , fy ) = dock_control . feature_popup_position #NEWLINE# control . SetPosition ( wx . Point ( ( px + fx ) , ( py + fy ) ) ) #NEWLINE# control . Show ( )