def DefineMarkers(self): """Defines the folder and bookmark icons for this control @postcondition: all margin markers are defined """ # Get the colours for the various markers style = self.GetItemByName('foldmargin_style') back = style.GetFore() rgb = eclib.HexToRGB(back[1:]) back = wx.Colour(red=rgb[0], green=rgb[1], blue=rgb[2]) fore = style.GetBack() rgb = eclib.HexToRGB(fore[1:]) fore = wx.Colour(red=rgb[0], green=rgb[1], blue=rgb[2]) # Buffer background highlight caret_line = self.GetItemByName('caret_line').GetBack() rgb = eclib.HexToRGB(caret_line[1:]) clback = wx.Colour(*rgb) # Code Folding markers folder = ed_marker.FoldMarker() folder.Foreground = fore folder.Background = back folder.RegisterWithStc(self) # Bookmarks ed_marker.Bookmark().RegisterWithStc(self) # Breakpoints ed_marker.Breakpoint().RegisterWithStc(self) ed_marker.BreakpointDisabled().RegisterWithStc(self) step = ed_marker.BreakpointStep() step.Background = clback step.RegisterWithStc(self)
def ShowStepMarker(self, line=-1, show=True): """Show the step (arrow) marker to the given line.""" if line < 0: line = self.GetCurrentLine() mark = ed_marker.BreakpointStep() if show: mark.Set(self, line, delete=False) else: mark.DeleteAll(self)
def DeleteAllBreakpoints(self): """Delete all the breakpoints in the buffer""" ed_marker.Breakpoint().DeleteAll(self) ed_marker.BreakpointDisabled().DeleteAll(self) ed_marker.BreakpointStep().DeleteAll(self)