#NEWLINE# def __init__( self , controller ) : #NEWLINE# #INDENT# 'SuperSID Viewer using Tkinter GUI for standalone and client.\n        Creation of the Frame with menu and graph display using matplotlib\n        ' #NEWLINE# matplotlib . use ( 'TkAgg' ) #NEWLINE# self . version = '1.4 20150801 (tk)' #NEWLINE# self . controller = controller #NEWLINE# self . tk_root = tk . Tk ( ) #NEWLINE# self . tk_root . title ( ( 'supersid @ ' + self . controller . config [ 'site_name' ] ) ) #NEWLINE# menubar = tk . Menu ( self . tk_root ) #NEWLINE# filemenu = tk . Menu ( menubar , tearoff = 0 ) #NEWLINE# filemenu . add_command ( label = 'Save Raw buffers' , command = ( lambda : self . save_file ( 'r' ) ) , underline = 5 , accelerator = 'Ctrl+R' ) #NEWLINE# filemenu . add_command ( label = 'Save Filtered buffers' , command = ( lambda : self . save_file ( 'f' ) ) , underline = 5 , accelerator = 'Ctrl+F' ) #NEWLINE# filemenu . add_command ( label = 'Save Extended raw buffers' , command = ( lambda : self . save_file ( 'e' ) ) , underline = 5 , accelerator = 'Ctrl+E' ) #NEWLINE# filemenu . add_command ( label = 'Save filtered as ...' , command = ( lambda : self . save_file ( 's' ) ) , underline = 5 , accelerator = 'Ctrl+S' ) #NEWLINE# filemenu . add_separator ( ) #NEWLINE# filemenu . add_command ( label = 'Exit' , command = ( lambda : self . close ( force_close = False ) ) ) #NEWLINE# self . tk_root . bind_all ( '<Control-r>' , self . save_file ) #NEWLINE# self . tk_root . bind_all ( '<Control-f>' , self . save_file ) #NEWLINE# self . tk_root . bind_all ( '<Control-e>' , self . save_file ) #NEWLINE# self . tk_root . bind_all ( '<Control-s>' , self . save_file ) #NEWLINE# self . tk_root . protocol ( 'WM_DELETE_WINDOW' , ( lambda : self . close ( False ) ) ) #NEWLINE# menubar . add_cascade ( label = 'File' , menu = filemenu ) #NEWLINE# helpmenu = tk . Menu ( menubar , tearoff = 0 ) #NEWLINE# helpmenu . add_command ( label = 'About...' , command = self . on_about ) #NEWLINE# menubar . add_cascade ( label = 'Help' , menu = helpmenu ) #NEWLINE# self . tk_root . config ( menu = menubar ) #NEWLINE# self . psd_figure = Figure ( facecolor = 'beige' ) #NEWLINE# self . canvas = FigureCanvas ( self . psd_figure , master = self . tk_root ) #NEWLINE# self . canvas . show ( ) #NEWLINE# self . canvas . get_tk_widget ( ) . pack ( side = tk . TOP , fill = tk . BOTH , expand = 1 ) #NEWLINE# self . toolbar = NavigationToolbar2TkAgg ( self . canvas , self . tk_root ) #NEWLINE# self . toolbar . update ( ) #NEWLINE# self . canvas . _tkcanvas . pack ( side = tk . TOP , fill = tk . BOTH , expand = 1 ) #NEWLINE# self . axes = self . psd_figure . add_subplot ( 111 ) #NEWLINE# self . axes . hold ( False ) #NEWLINE# self . statusbar_txt = tk . StringVar ( ) #NEWLINE# self . label = tk . Label ( self . tk_root , bd = 1 , relief = tk . SUNKEN , anchor = tk . W , textvariable = self . statusbar_txt , font = ( 'arial' , 12 , 'normal' ) ) #NEWLINE# self . statusbar_txt . set ( 'Initialization...' ) #NEWLINE# self . label . pack ( fill = tk . X )