def RegisterWithStc(self, stc): """Register this compound marker with the given StyledTextCtrl""" ids = self.GetIds() stc.MarkerDefineBitmap(ids[0], self.Bitmap) stc.MarkerDefine(ids[1], wx.stc.STC_MARK_BACKGROUND, # foreground=self.Foreground, #TODO background=self.Foreground)
def RegisterWithStc(self, stc): """Setup the STC to use this marker""" ids = self.GetIds() if self.Bitmap.IsNull(): symbols = self.GetSymbols() if len(ids) == len(symbols): markers = zip(ids, symbols) for marker, symbol in markers: stc.MarkerDefine(marker, symbol, self.Foreground, self.Background) elif len(ids) == 1 and not self.Bitmap.IsNull(): stc.MarkerDefineBitmap(ids[0], self.Bitmap) else: assert False, "Invalid Marker!"