#NEWLINE# def create_toolbar( self , parent ) : #NEWLINE# #INDENT# toolbar = Tkinter . Frame ( parent , bd = 1 , relief = Tkinter . RAISED ) #NEWLINE# self . _radio_selection = Tkinter . IntVar ( ) #NEWLINE# self . _radio_selection . set ( CURSOR ) #NEWLINE# self . _save_icon = Image . open ( 'images/gnome_media_floppy.png' ) #NEWLINE# self . create_toolbar_button ( toolbar , self . _save_icon , self . save_target , 'Save Target' ) #NEWLINE# self . _cursor_icon = Image . open ( 'images/cursor.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _cursor_icon , 'Select Region' , CURSOR ) #NEWLINE# self . _image_icon = Image . open ( 'images/gnome_image_x_generic.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _image_icon , 'Draw Image' , IMAGE ) #NEWLINE# self . _rectangle_icon = Image . open ( 'images/rectangle.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _rectangle_icon , 'Draw Rectangle' , RECTANGLE ) #NEWLINE# self . _oval_icon = Image . open ( 'images/oval.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _oval_icon , 'Draw Oval' , OVAL ) #NEWLINE# self . _triangle_icon = Image . open ( 'images/triangle.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _triangle_icon , 'Draw Triangle' , TRIANGLE ) #NEWLINE# self . _d_silhouette_3_icon = Image . open ( 'images/appleseed_d_silhouette_3.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _d_silhouette_3_icon , 'Draw D Silhouette 3' , D_SILHOUETTE_3 ) #NEWLINE# self . _d_silhouette_4_icon = Image . open ( 'images/appleseed_d_silhouette_4.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _d_silhouette_4_icon , 'Draw D Silhouette 4' , D_SILHOUETTE_4 ) #NEWLINE# self . _d_silhouette_5_icon = Image . open ( 'images/appleseed_d_silhouette_5.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _d_silhouette_5_icon , 'Draw D Silhouette 5' , D_SILHOUETTE_5 ) #NEWLINE# self . _freeform_polygon_icon = Image . open ( 'images/freeform_polygon.png' ) #NEWLINE# self . create_radio_button ( toolbar , self . _freeform_polygon_icon , 'Draw Freeform Polygon' , FREEFORM_POLYGON ) #NEWLINE# self . _bring_forward_icon = Image . open ( 'images/bring_forward.png' ) #NEWLINE# self . create_toolbar_button ( toolbar , self . _bring_forward_icon , self . bring_forward , 'Bring Forward' ) #NEWLINE# self . _send_backward_icon = Image . open ( 'images/send_backward.png' ) #NEWLINE# self . create_toolbar_button ( toolbar , self . _send_backward_icon , self . send_backward , 'Send Backward' ) #NEWLINE# tags_icon = ImageTk . PhotoImage ( Image . open ( 'images/tags.png' ) ) #NEWLINE# self . _tag_popup_state = Tkinter . IntVar ( ) #NEWLINE# self . _tags_button = Tkinter . Checkbutton ( toolbar , image = tags_icon , indicatoron = False , variable = self . _tag_popup_state , command = self . toggle_tag_editor , state = Tkinter . DISABLED ) #NEWLINE# self . _tags_button . image = tags_icon #NEWLINE# self . _tags_button . pack ( side = Tkinter . LEFT , padx = 2 , pady = 2 ) #NEWLINE# self . create_tooltip ( tags_icon . _tags_button , "Edit Selected Region's Tags" ) #NEWLINE# self . _fill_color_combo = ttk . Combobox ( toolbar , values = [ 'black' , 'blue' , 'green' , 'orange' , 'red' , 'white' ] , state = 'readonly' ) #NEWLINE# self . _fill_color_combo . set ( 'black' ) #NEWLINE# self . _fill_color_combo . bind ( '<<ComboboxSelected>>' , self . color_selected ) #NEWLINE# self . _fill_color_combo . configure ( state = Tkinter . DISABLED ) #NEWLINE# self . _fill_color_combo . pack ( side = Tkinter . LEFT , padx = 2 , pady = 2 ) #NEWLINE# self . create_tooltip ( self . _fill_color_combo , "Set Selected Region's Fill Color" ) #NEWLINE# toolbar . pack ( fill = Tkinter . X )