#NEWLINE# def __init__( self , parent , tool_bar , image_cache , item , controller , show_labels ) : #NEWLINE# #INDENT# ' Creates a new tool bar tool for an action item. ' #NEWLINE# self . item = item #NEWLINE# self . tool_bar = tool_bar #NEWLINE# action = self . item . action #NEWLINE# if ( action . image is not None ) : #NEWLINE# #INDENT# image = action . image . create_image ( ) #NEWLINE# path = action . image . absolute_path #NEWLINE# bmp = image_cache . get_bitmap ( path ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# from pyface.api import ImageResource #NEWLINE# image = ImageResource ( 'foo' ) #NEWLINE# bmp = image . create_bitmap ( ) #NEWLINE# #UNINDENT# self . control_id = 1 #NEWLINE# self . control = None #NEWLINE# if ( controller is not None ) : #NEWLINE# #INDENT# self . controller = controller #NEWLINE# controller . add_to_toolbar ( self ) #NEWLINE# #UNINDENT# return