996 self.root.attributes(
"-topmost",
True)
997 self.frame = tk.Frame(self.root)
998 self.frame.pack(fill=
'both', expand=
True)
1002 Text.__init__(self, self.frame, borderwidth=3, relief=
"sunken")
1003 self.config(tabs=(400,))
1004 self.config(background =
'black', foreground =
'white', font= (
"consolas", 12), wrap =
'word', undo =
'True')
1006 self.config(height = 24, width = 100)
1007 self.config(insertbackground =
'pale green')
1008 self.pack(side=
'left', fill=
'both', expand=
True)
1010 self.tag_config(
'normal', foreground =
'white')
1011 self.tag_config(
'warning', foreground =
'yellow' )
1012 self.tag_config(
'error', foreground =
'red')
1013 self.tag_config(
'highlight_green', foreground =
'green')
1014 self.tag_config(
'highlight_blue', foreground =
'cyan')
1015 self.tag_config(
'error_highlight_inactive', background =
'dim gray')
1016 self.tag_config(
'error_highlight_active', background =
'light grey')
1018 self.bind_class(
"Text",
"<Control-a>", self.select_all)
1019 self.bind_all(
"<Control-Shift-E>", self.scroll_errors)
1020 self.bind_class(
"<Control-Shift-R>", self.rebuild)
1024 scrb = tk.Scrollbar(self.frame, orient=
'vertical', command=self.yview)
1025 self.config(yscrollcommand=scrb.set)
1026 scrb.pack(side=
'right', fill=
'y')
1049 self.popup = tk.Menu(self, tearoff=0)
1051 self.popup.add_command(label=
'Copy', command=self._copy)
1052 self.popup.add_command(label=
'Paste', command=self._paste)
1053 self.popup.add_separator()
1054 self.popup.add_command(label=
'Cut', command=self._cut)
1055 self.popup.add_separator()
1056 self.popup.add_command(label=
'Select All', command=self._select_all)
1057 self.popup.add_command(label=
'Clear All', command=self._clear_all)
1058 self.popup.add_separator()
1059 self.popup.add_command(label=
'Save As', command=self._file_save_as)
1060 self.popup.add_separator()
1062 self.popup.add_command(label=
'Repeat Build', command=self._rebuild)
1063 self.popup.add_separator()
1064 self.popup.add_command(label=
'Scroll Errors (CTL-shift-e)', command=self._scroll_errors)
1065 self.popup.add_separator()
1066 self.popup.add_command(label=
'Open File at Cursor', command=self._open_selected_file)
1068 if current_OS ==
'Darwin':
1069 self.bind(
'<Button-2>', self._show_popup)
1071 self.bind(
'<Button-3>', self._show_popup)