#NEWLINE# def __init__( self , parent , bitmap , selected = None , handler = None , padding = 10 ) : #NEWLINE# #INDENT# ' Initializes the object.\n        ' #NEWLINE# wx . Window . __init__ ( self , parent , ( - 1 ) , size = wx . Size ( ( bitmap . GetWidth ( ) + padding ) , ( bitmap . GetHeight ( ) + padding ) ) ) #NEWLINE# self . _bitmap = bitmap #NEWLINE# self . _selected = selected #NEWLINE# self . _handler = handler #NEWLINE# self . _mouse_over = False #NEWLINE# self . _button_down = False #NEWLINE# wx . EVT_PAINT ( self , self . _on_paint ) #NEWLINE# wx . EVT_LEFT_DOWN ( self , self . _on_left_down ) #NEWLINE# wx . EVT_LEFT_UP ( self , self . _on_left_up ) #NEWLINE# wx . EVT_ENTER_WINDOW ( self , self . _on_enter ) #NEWLINE# wx . EVT_LEAVE_WINDOW ( self , self . _on_leave )