#NEWLINE# def __init__( self , master , font_family , font_size , config ) : #NEWLINE# #INDENT# tk . Frame . __init__ ( config , master ) #NEWLINE# yscrollbar = tk . Scrollbar ( self ) #NEWLINE# yscrollbar . pack ( side = tk . RIGHT , fill = tk . Y ) #NEWLINE# f = tkFont . Font ( family = font_family , size = font_size ) #NEWLINE# self . text = tk . Text ( self , height = 25 , width = 30 , wrap = tk . NONE , font = f , yscrollcommand = yscrollbar . set , undo = True , background = config . background_color ) #NEWLINE# self . text . config ( cursor = 'arrow' ) #NEWLINE# self . disable_text ( ) #NEWLINE# self . text . pack ( fill = tk . BOTH , expand = 1 ) #NEWLINE# self . text . tag_config ( 'selected' , background = 'light blue' ) #NEWLINE# self . text . tag_config ( 'pinned' , foreground = 'dark gray' ) #NEWLINE# bold_font = tkFont . Font ( self . text , self . text . cget ( 'font' ) ) #NEWLINE# bold_font . configure ( weight = 'bold' ) #NEWLINE# self . text . tag_config ( 'title' , font = bold_font ) #NEWLINE# italic_font = tkFont . Font ( self . text , self . text . cget ( 'font' ) ) #NEWLINE# italic_font . configure ( slant = 'italic' ) #NEWLINE# self . text . tag_config ( 'tags' , font = italic_font , foreground = 'dark gray' ) #NEWLINE# self . text . tag_config ( 'found' , font = italic_font , foreground = 'dark gray' , background = 'lightyellow' ) #NEWLINE# self . text . tag_config ( 'modifydate' , foreground = 'dark gray' ) #NEWLINE# yscrollbar . config ( command = self . text . yview ) #NEWLINE# self . _bind_events ( ) #NEWLINE# self . selected_idx = ( - 1 ) #NEWLINE# self . note_headers = [ ] #NEWLINE# self . layout = config . layout #NEWLINE# self . print_columns = config . print_columns #NEWLINE# if ( bold_font . measure ( ' ' ) > f . measure ( ' ' ) ) : #NEWLINE# #INDENT# self . cwidth = bold_font . measure ( ' ' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . cwidth = f . measure ( ' ' ) #NEWLINE# #UNINDENT# self . fonts = [ f , italic_font , bold_font ]