def __init__(self, *args): self.breakpoints = [] EditorWindow.__init__(self, *args) self.text.bind('<<set-breakpoint-here>>', self.set_breakpoint_here) self.text.bind('<<clear-breakpoint-here>>', self.clear_breakpoint_here) self.text.bind('<<open-python-shell>>', self.flist.open_shell) self.breakpointPath = os.path.join(idleConf.GetUserCfgDir(), 'breakpoints.lst') def filename_changed_hook(old_hook=self.io.filename_change_hook, self=self): self.restore_file_breaks() old_hook() self.io.set_filename_change_hook(filename_changed_hook) if self.io.filename: self.restore_file_breaks() self.color_breakpoint_text()
def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line) self.text.unbind("<<toggle-code-context>>") self.update_menu_state('options', '*Code Context', 'disabled')
def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line)
def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line) self.text.unbind("<<toggle-code-context>>")
def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<<goto-file-line>>", self.goto_file_line) self.text.unbind("<<toggle-code-context>>") self.menudict['options'].entryconfig('*Code Context', state='disabled')
def __init__(self, flist=None, interp=None, editwin=None): EditorWindow.__init__(self, flist) self.interp = interp self.editwin = editwin # TODO: figure out better way to eliminate menu bar m = Menu(self.root) self.top.config(menu=m) root = self.top self.doc_frame = doc_frame = Frame(root) # make first line f_top = Frame(doc_frame) label = Label(f_top, text='Help on:') self.entry = entry = Entry(f_top) entry.bind('<Return>', self.get_doc) self.update_calltip = IntVar(root) check = Checkbutton(f_top, text='Update from Calltip', variable=self.update_calltip) check.var = self.update_calltip if get_cfg('calltip'): check.select() f_top.pack(side='top', fill=X, padx=5) label.pack(side='left') entry.pack(side='left', fill=X, expand=True, padx=5, ipadx=5) check.pack(side='right') # make command buttons f_cmd = Frame(doc_frame) f_cmd.pack(side='top', fill=X, padx=3) self.button_showdoc = Button(f_cmd, text='Show Doc String', default='active', command=self.get_doc) self.button_showhelp = Button(f_cmd, text='Show help()', command=self.get_help) button_search = Button(f_cmd, text='Search Text', command=self.search) button_close = Button(f_cmd, text='Close', command=self.close) button_close.pack(side='right') self.button_showdoc.pack(side='left') self.button_showhelp.pack(side='left') button_search.pack(side='left') doc_frame.pack(side=TOP, before=self.text_frame, fill=X) # change focused widget to entry box self.entry.focus_set() self.top.focused_widget = self.entry # remove unneeded stuff self.per.removefilter(self.undo) self._rmcolorizer() #self.status_bar.pack_forget() # add a delegator to prevent editing of text widget self.doc_del = DocDelegator() self.doc_del.entry = self.entry self.per.insertfilter(self.doc_del) self.text._insert = self.doc_del.delegate.insert self.text._delete = self.doc_del.delegate.delete self.text.configure(wrap='none') keySetName = idleConf.CurrentKeys() find_bindings = idleConf.GetKeyBinding(keySetName, '<<find>>') for key_event in find_bindings: #self.entry.event_add('<<find>>', key_event) self.entry.bind(key_event, lambda e: self.text.event_generate('<<find>>'))