bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def OnDrawBranchesAttachment(self, dc, attachment, erase = False): count = self.GetAttachmentLineCount(attachment) if count == 0: return
def OnDrawBranchesAttachment(self, dc, attachment, erase = False): count = self.GetAttachmentLineCount(attachment) if count == 0: return
31,700
def OnDrawBranchesAttachment(self, dc, attachment, erase = False): count = self.GetAttachmentLineCount(attachment) if count == 0: return
def OnDrawBranchesAttachment(self, dc, attachment, erase = False): count = self.GetAttachmentLineCount(attachment) if count == 0: return
31,701
def OnDrawBranchesAttachment(self, dc, attachment, erase = False): count = self.GetAttachmentLineCount(attachment) if count == 0: return
def OnDrawBranchesAttachment(self, dc, attachment, erase = False): count = self.GetAttachmentLineCount(attachment) if count == 0: return
31,702
def __init__(self, parent, ID): wx.TreeCtrl.__init__(self, parent, ID) self.nodeStack = [self.AddRoot("Root")]
def __init__(self, parent, ID): wx.TreeCtrl.__init__(self, parent, ID) self.nodeStack = [self.AddRoot("Root")]
31,703
def __init__(self, parent, title, sizerFunc): wx.Frame.__init__(self, parent, -1, title)
def __init__(self, parent, title, sizerFunc): wx.Frame.__init__(self, parent, -1, title)
31,704
def OnPaint(self, event): if BUFFERED: dc = wx.BufferedPaintDC(self) else: dc = wx.PaintDC(self) width, height = self.GetClientSize() if not width or not height: return
def OnPaint(self, event): if BUFFERED: dc = wx.BufferedPaintDC(self) else: dc = wx.PaintDC(self) width, height = self.GetClientSize() if not width or not height: return
31,705
def GetSelection(self): self.GetSelections(self)[:1]
def GetSelection(self): self.GetSelections(self)[:1]
31,706
def getToolSpacerData(): return \
def getToolSpacerData(): return \
31,707
def CreateTestWin(self, item): testWin = g.testWin # Create a window with this resource xxx = self.GetPyData(item).treeObject()
def CreateTestWin(self, item): testWin = g.testWin # Create a window with this resource xxx = self.GetPyData(item).treeObject()
31,708
def OnRightDown(self, event): """ Handles the wx.EVT_RIGHT_DOWN events for L{PageContainer}. """
def OnRightDown(self, event): """ Handles the wx.EVT_RIGHT_DOWN events for L{PageContainer}. """
31,709
def DoSetSelection(self, page): """ Does the actual selection of a page. """
def DoSetSelection(self, page): """ Does the actual selection of a page. """
31,710
def DoSetSelection(self, page): """ Does the actual selection of a page. """
def DoSetSelection(self, page): """ Does the actual selection of a page. """
31,711
def CanFitToScreen(self, page): """ Returns wheter a tab can fit in the left space in the screen or not. """
def CanFitToScreen(self, page): """ Returns wheter a tab can fit in the left space in the screen or not. """
31,712
def __init__(self, data=None, parent = None, kids = [], x = 0, y = 0): self.x = 0 self.y = 0 self.projx = 0 self.projy = 0 self.parent = parent self.kids = kids self.data = data self.expanded = false self.selected = false self.built = false self.scale = 0
def __init__(self, data=None, parent = None, kids = None, x = 0, y = 0): self.x = 0 self.y = 0 self.projx = 0 self.projy = 0 self.parent = parent self.kids = kids self.data = data self.expanded = false self.selected = false self.built = false self.scale = 0
31,713
def add(bake, makedirs, make, dep, format, args={}): a = '' if 'all' in args: a += ' %s' % args['all'] if format in args: a += ' %s' % args[format] if format != 'autoconf' and 'not_autoconf' in args: a += ' %s' % args['not_autoconf'] if format in makedirs: makedir = makedirs[format] else: makedir = makedirs['all'] tfil...
def add(bake, makedirs, make, dep, format, args={}): a = '' if 'all' in args: a += ' %s' % args['all'] if format in args: a += ' %s' % args[format] if format != 'autoconf' and 'not_autoconf' in args: a += ' %s' % args['not_autoconf'] if format in makedirs: makedir = makedirs[format] else: makedir = makedirs['all'] tfil...
31,714
def DrawArcToEllipse(x1, y1, width1, height1, x2, y2, x3, y3): a1 = width1 / 2.0 b1 = height1 / 2.0 # Check that x2 != x3 if abs(x2 - x3) < 0.05: x4 = x2 if y3 > y2: y4 = y1 - math.sqrt((b1 * b1 - (((x2 - x1) * (x2 - x1)) * (b1 * b1) / (a1 * a1)))) else: y4 = y1 + math.sqrt((b1 * b1 - (((x2 - x1) * (x2 - x1)) * (b1 * ...
def DrawArcToEllipse(x1, y1, width1, height1, x2, y2, x3, y3): a1 = width1 / 2.0 b1 = height1 / 2.0 # Check that x2 != x3 if abs(x2 - x3) < 0.05: x4 = x2 if y3 > y2: y4 = y1 - math.sqrt((b1 * b1 - (((x2 - x1) * (x2 - x1)) * (b1 * b1) / (a1 * a1)))) else: y4 = y1 + math.sqrt((b1 * b1 - (((x2 - x1) * (x2 - x1)) * (b1 * ...
31,715
def EVT_TREE_BEGIN_DRAG(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
def EVT_TREE_BEGIN_DRAG(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
31,716
def EVT_TREE_BEGIN_RDRAG(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
def EVT_TREE_BEGIN_RDRAG(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
31,717
def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
31,718
def EVT_TREE_END_LABEL_EDIT(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
def EVT_TREE_END_LABEL_EDIT(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
31,719
def EVT_TREE_GET_INFO(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_GET_INFO, func)
def EVT_TREE_GET_INFO(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func)
31,720
def EVT_TREE_SET_INFO(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_SET_INFO, func)
def EVT_TREE_SET_INFO(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func)
31,721
def EVT_TREE_ITEM_EXPANDED(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
def EVT_TREE_ITEM_EXPANDED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
31,722
def EVT_TREE_ITEM_EXPANDING(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
def EVT_TREE_ITEM_EXPANDING(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
31,723
def EVT_TREE_ITEM_COLLAPSED(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
def EVT_TREE_ITEM_COLLAPSED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
31,724
def EVT_TREE_ITEM_COLLAPSING(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
def EVT_TREE_ITEM_COLLAPSING(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
31,725
def EVT_TREE_SEL_CHANGED(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_SEL_CHANGED, func)
def EVT_TREE_SEL_CHANGED(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func)
31,726
def EVT_TREE_SEL_CHANGING(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_SEL_CHANGING, func)
def EVT_TREE_SEL_CHANGING(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func)
31,727
def EVT_TREE_KEY_DOWN(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_KEY_DOWN, func)
def EVT_TREE_KEY_DOWN(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func)
31,728
def EVT_TREE_DELETE_ITEM(win, id, func): win.Connect(id, -1. wxEVT_COMMAND_TREE_DELETE_ITEM, func)
def EVT_TREE_DELETE_ITEM(win, id, func): win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
31,729
def OnLCSMDoPopup(self, event): self.PopupMenu(event.menu, event.pos) self.afterPopupMenu(event.menu)
def OnLCSMDoPopup(self, event): self.PopupMenu(event.menu, event.pos) self.afterPopupMenu(event.menu)
31,730
def OnLCSMDoPopup(self, event): self.PopupMenu(event.menu, event.pos) self.afterPopupMenu(event.menu)
def OnLCSMDoPopup(self, event): self.PopupMenu(event.menu, event.pos) self.afterPopupMenu(event.menu)
31,731
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style) TextEdit.__init__(self)
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style) TextEdit.__init__(self)
31,732
def Float(self, bool): "Floats or docks the toolbar programmatically." if bool: self.parentframe = wxPyTypeCast(self.GetParent(), 'wxFrame') clientsize = self.parentframe.GetClientSizeTuple() self.floatframe = wxMiniFrame(self.parentframe, -1, self.title, wxDefaultPosition, wxDefaultSize, wxTHICK_FRAME) self.Reparent(s...
def Float(self, bool): "Floats or docks the toolbar programmatically." if bool: self.parentframe = wxPyTypeCast(self.GetParent(), 'wxFrame') clientsize = self.parentframe.GetClientSizeTuple() self.floatframe = wxMiniFrame(self.parentframe, -1, self.title, wxDefaultPosition, wxDefaultSize, wxTHICK_FRAME) self.Reparent(s...
31,733
def runTest(frame, nb, log): if wx.Platform == "__WXMAC__": dlg = wx.MessageDialog( frame, 'The ContextHelp sample does not currently work well on this platform.', 'Sorry', wx.OK | wx.ICON_INFORMATION ) dlg.ShowModal() dlg.Destroy() else: win = TestPanel(nb, log) return win
def runTest(frame, nb, log): win = TestPanel(nb, log) return win
31,734
def SetEnableGrid(self, value): """Set True to enable grid.""" if value not in [True,False]: raise TypeError, "Value should be True or False" self._gridEnabled= value self.Redraw()
def SetEnableGrid(self, value): """Set True to enable grid.""" if value not in [True,False,'Horizontal','Vertical']: raise TypeError, "Value should be True, False, Horizontal or Vertical" self._gridEnabled= value self.Redraw()
31,735
def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks): penWidth= self.printerScale # increases thickness for printing only dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth)) # set length of tick marks--long ones make grid if self._gridEnabled: x,y,width,height= self._point2ClientCoord(p1,p2) yTickLen...
def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks): penWidth= self.printerScale # increases thickness for printing only dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth)) # set length of tick marks--long ones make grid if self._gridEnabled: x,y,width,height= self._point2ClientCoord(p1,p2) if self....
31,736
def __init__(self, parent, dir, mask): filelist = [] dirlist = [".."] self.dir = dir self.file = "" mask = mask.upper() pattern = self.MakeRegex(mask)
def __init__(self, parent, dir, mask): filelist = [] dirlist = [".."] self.dir = dir self.file = "" mask = mask.upper() pattern = self.MakeRegex(mask)
31,737
def FindNodeObject(self, item): testWin = g.testWin # If top-level, return testWin (or panel its panel) if item == testWin.item: return testWin.panel itemParent = self.GetItemParent(item) xxx = self.GetPyData(item).treeObject() parentWin = self.FindNodeObject(itemParent) # Top-level sizer? return window's sizer if xxx....
def FindNodeObject(self, item): testWin = g.testWin # If top-level, return testWin (or panel its panel) if item == testWin.item: return testWin.panel itemParent = self.GetItemParent(item) xxx = self.GetPyData(item).treeObject() parentWin = self.FindNodeObject(itemParent) # Top-level sizer? return window's sizer if xxx....
31,738
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1) self.pdf = None
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1) self.pdf = None
31,739
def SetMinHeight(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlContainerCell_SetMinHeight,(self,) + _args, _kwargs) return val
def SetMinHeight(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlContainerCell_SetMinHeight,(self,) + _args, _kwargs) return val
31,740
def EmptyHandler(evt): pass
def EmptyHandler(evt): pass
31,741
def getExtraPath(shortVer=True, addOpts=False): """Get the dirname that wxPython will be installed under.""" if shortVer: # short version, just Major.Minor ep = "wx-%d.%d" % (VER_MAJOR, VER_MINOR) # plus release if minor is odd if VER_MINOR % 2 == 1: ep += ".%d" % VER_RELEASE else: # long version, full version ep = ...
def getExtraPath(shortVer=True, addOpts=False): """Get the dirname that wxPython will be installed under.""" if shortVer: # short version, just Major.Minor ep = "wx-%d.%d" % (VER_MAJOR, VER_MINOR) # plus release if minor is odd if VER_MINOR % 2 == 1: ep += ".%d" % VER_RELEASE else: # long version, full version ep = ...
31,742
def getExtraPath(shortVer=True, addOpts=False): """Get the dirname that wxPython will be installed under.""" if shortVer: # short version, just Major.Minor ep = "wx-%d.%d" % (VER_MAJOR, VER_MINOR) # plus release if minor is odd if VER_MINOR % 2 == 1: ep += ".%d" % VER_RELEASE else: # long version, full version ep = ...
def getExtraPath(shortVer=True, addOpts=False): """Get the dirname that wxPython will be installed under.""" if shortVer: # short version, just Major.Minor ep = "wx-%d.%d" % (VER_MAJOR, VER_MINOR) # plus release if minor is odd if VER_MINOR % 2 == 1: ep += ".%d" % VER_RELEASE else: # long version, full version ep = ...
31,743
def run(self, destdir, modname, xmlfile, wxPythonDir="wxPython"):
def run(self, destdir, modname, xmlfile, wxPythonDir="wxPython"):
31,744
def run(self, destdir, modname, xmlfile, wxPythonDir="wxPython"):
def run(self, destdir, modname, xmlfile, wxPythonDir="wxPython"):
31,745
def add(bake, makedirs, make, dep, format, args={}): global linesCur a = '' if 'all' in args: a += ' %s' % args['all'] if format in args: a += ' %s' % args[format] if format != 'autoconf' and 'not_autoconf' in args: a += ' %s' % args['not_autoconf'] if format in makedirs: makedir = makedirs[format] else: makedir = make...
def add(bake, makedirs, make, dep, format, args={}): global linesCur a = '' if 'all' in args: a += ' %s' % args['all'] if format in args: a += ' %s' % args[format] if format != 'autoconf' and 'not_autoconf' in args: a += ' %s' % args['not_autoconf'] if format in makedirs: makedir = makedirs[format] else: makedir = make...
31,746
def GetPositionFromLine(line): return self.XYToPosition(0,line)
def GetPositionFromLine(self, line): return self.XYToPosition(0,line)
31,747
def GotoLine(self, line): pos = self.editor.GetPositionFromLine(line) self.editor.SetInsertionPoint(pos) self.editor.ShowPosition(pos)
def GotoLine(self, line): pos = self.editor.GetPositionFromLine(line) self.editor.SetInsertionPoint(pos) self.editor.ShowPosition(pos)
31,748
def __init__(self, parent, id, title): wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(650, 250))
def __init__(self, parent, id, title): wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(650, 250))
31,749
def Update(self, ft): #icon = ft.GetIcon() info = ft.GetIconInfo() if info is None: bmp = MyBitmapsFunc(0) ##print bmp.Ok(), bmp.GetWidth(), bmp.GetHeight() self.GetIconBmp().SetBitmap(bmp) self.GetIconFileTxt().SetValue("") self.GetIconIndexTxt().SetValue("") else: icon, file, idx = info #bmp = wxBitmapFromIcon(icon) ...
def Update(self, ft): #icon = ft.GetIcon() info = ft.GetIconInfo() if info is None: bmp = MyBitmapsFunc(0) ##print bmp.Ok(), bmp.GetWidth(), bmp.GetHeight() self.GetIconBmp().SetBitmap(bmp) self.GetIconFileTxt().SetValue("") self.GetIconIndexTxt().SetValue("") else: icon, file, idx = info #bmp = wxBitmapFromIcon(icon) ...
31,750
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
31,751
def getVersion(): """Returns wxWidgets version as a tuple: (major,minor,release).""" global wxVersion if wxVersion == None: f = open(VERSION_FILE, 'rt') lines = f.readlines() f.close() major = minor = release = None for l in lines: if not l.startswith('#define'): continue splitted = l.strip().split() if splitted[0] != ...
def getVersion(): """Returns wxWidgets version as a tuple: (major,minor,release).""" global wxVersion if wxVersion == None: f = open(VERSION_FILE, 'rt') lines = f.readlines() f.close() major = minor = release = None for l in lines: if not l.startswith('#define'): continue splitted = l.strip().split() if splitted[0] != ...
31,752
def OnClose(self, evt): frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") frame.Show(true) self.ShowTip(frame) self.Destroy()
def OnClose(self, evt): frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") frame.Show(true) self.ShowTip(frame) self.Destroy()
31,753
def OnInit(self): """ Create and show the splash screen. It will then create and show the main frame when it is time to do so. """ wxInitAllImageHandlers() splash = MySplashScreen() splash.Show() wxYield() return true
def OnInit(self): """ Create and show the splash screen. It will then create and show the main frame when it is time to do so. """ wxInitAllImageHandlers() splash = MySplashScreen() splash.Show() return true
31,754
def debug(msg): if DEBUG: print msg
def debug(msg): if DEBUG: print msg
31,755
def debug(msg): if DEBUG: print msg
def debug(msg): if DEBUG: print msg
31,756
def PickActor(self,x,y): if self._CurrentRenderer: renderer = self._CurrentRenderer picker = self._Picker
def PickActor(self,x,y): if self._CurrentRenderer: renderer = self._CurrentRenderer picker = self._Picker
31,757
def OnFind(self, evt): map = { wx.wxEVT_COMMAND_FIND : "FIND", wx.wxEVT_COMMAND_FIND_NEXT : "FIND_NEXT", wx.wxEVT_COMMAND_FIND_REPLACE : "REPLACE", wx.wxEVT_COMMAND_FIND_REPLACE_ALL : "REPLACE_ALL", }
def OnFind(self, evt): map = { wx.wxEVT_COMMAND_FIND : "FIND", wx.wxEVT_COMMAND_FIND_NEXT : "FIND_NEXT", wx.wxEVT_COMMAND_FIND_REPLACE : "REPLACE", wx.wxEVT_COMMAND_FIND_REPLACE_ALL : "REPLACE_ALL", }
31,758
def __init__(self, parent, id, title): wxFrame.__init__(self, parent, -1, title, size = (725, 550))
def __init__(self, parent, id, title): wxFrame.__init__(self, parent, -1, title, size = (725, 550))
31,759
def runTest(frame, nb, log): win = wxSplitterWindow(nb, -1, size=(640, 480)) shellWin = shell.Shell(win, -1, introText=intro) fillingWin = filling.Filling(win, -1, size=(640, 480), rootObject=shellWin.interp.locals ) win.SplitHorizontally(shellWin, fillingWin) return win
def runTest(frame, nb, log): win = wxSplitterWindow(nb, -1, size=(640, 480)) shellWin = shell.Shell(win, -1, introText=intro) fillingWin = filling.Filling(win, -1, size=(640, 480), rootObject=shellWin.interp.locals, rootIsNamespace=1 ) win.SplitHorizontally(shellWin, fillingWin) return win
31,760
#ifdef __WXMSW__
#ifdef __WXMSW__
31,761
#ifdef __WXMSW__
#ifdef __WXMSW__
31,762
#ifdef __WXMSW__
#ifdef __WXMSW__
31,763
#ifdef __WXMSW__
#ifdef __WXMSW__
31,764
#undef LNG
#undef LNG
31,765
def __init__(self): print 'wxpTagHandler' wxHtmlWinTagHandler.__init__(self) self.ctx = None
def __init__(self): wxHtmlWinTagHandler.__init__(self) self.ctx = None
31,766
def GetSupportedTags(self): print 'wxpTagHandler.GetSupportedTags' return WXPTAG+','+PARAMTAG
def GetSupportedTags(self): return WXPTAG+','+PARAMTAG
31,767
def HandleTag(self, tag): print 'wxpTagHandler.HandleTag' name = tag.GetName() if name == WXPTAG: return self.HandleWxpTag(tag) elif name == PARAMTAG: return self.HandleParamTag(tag) else: raise ValueError, 'unknown tag: ' + name
def HandleTag(self, tag): name = tag.GetName() if name == WXPTAG: return self.HandleWxpTag(tag) elif name == PARAMTAG: return self.HandleParamTag(tag) else: raise ValueError, 'unknown tag: ' + name
31,768
def __init__(self,*_args,**_kwargs): self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) self.thisown = 1 self._setCallbackInfo(self, wxFontEnumerator)
def __init__(self,*_args,**_kwargs): self.this = apply(misc2c.new_wxFontEnumerator,_args,_kwargs) self.thisown = 1 self._setCallbackInfo(self, wxFontEnumerator)
31,769
def DefParms(self): self.num_auto = True # auto scale of the cal number day size self.num_size = 12 # default size of calendar if no auto size self.max_num_size = 12 # maximum size for calendar number
def DefParms(self): self.num_auto = True # auto scale of the cal number day size self.num_size = 12 # default size of calendar if no auto size self.max_num_size = 12 # maximum size for calendar number
31,770
def SetWeekColor(self, font_color, week_color): # set font and background color for week title self.week_font_color = font_color self.week_color = week_color
def SetWeekColor(self, font_color, week_color): # set font and background color for week title self.week_font_color = font_color self.week_color = week_color
31,771
def InitValues(self): # default dimensions of various elements of the calendar self.rg = {} self.cal_sel = {} self.set_cy_st = 0 # start position self.set_cx_st = 0
def InitValues(self): # default dimensions of various elements of the calendar self.rg = {} self.cal_sel = {} self.set_cy_st = 0 # start position self.set_cx_st = 0
31,772
def SetMarg(self, xmarg, ymarg): self.set_x_st = xmarg self.set_y_st = ymarg self.set_y_end = ymarg
def SetMarg(self, xmarg, ymarg): self.set_x_mrg = xmarg self.set_y_mrg = ymarg self.set_y_end = ymarg
31,773
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
def DrawCal(self, DC, sel_lst=[]): self.InitScale()
31,774
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
31,775
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
31,776
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
31,777
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
defDrawCal(self,DC,sel_lst=[]):self.DC=DCself.InitScale()
31,778
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
def DrawCal(self, DC, sel_lst=[]): self.DC = DC self.InitScale()
31,779
def AddSelect(self, list, cfont=None, cbackgrd = None): if cfont is None: cfont = self.sel_color # font digit color
def AddSelect(self, list, cfont=None, cbackgrd = None): if cfont is None: cfont = self.colors[COLOR_SELECTION_FONT] # font digit color
31,780
def AddSelect(self, list, cfont=None, cbackgrd = None): if cfont is None: cfont = self.sel_color # font digit color
def AddSelect(self, list, cfont=None, cbackgrd = None): if cfont is None: cfont = self.sel_color # font digit color
31,781
def DrawBorder(self): brush = wx.Brush(wx.NamedColour(self.back_color), wx.SOLID) self.DC.SetBrush(brush) self.DC.SetPen(wx.Pen(wx.NamedColour(self.border_color), 1))
def DrawBorder(self): brush = wx.Brush(wx.NamedColour(self.back_color), wx.SOLID) self.DC.SetBrush(brush) self.DC.SetPen(wx.Pen(wx.NamedColour(self.border_color), 1))
31,782
def DrawBorder(self): brush = wx.Brush(wx.NamedColour(self.back_color), wx.SOLID) self.DC.SetBrush(brush) self.DC.SetPen(wx.Pen(wx.NamedColour(self.border_color), 1))
def DrawBorder(self): brush = wx.Brush(wx.NamedColour(self.back_color), wx.SOLID) self.DC.SetBrush(brush) self.DC.SetPen(wx.Pen(wx.NamedColour(self.border_color), 1))
31,783
def DrawNumVal(self): self.DrawNum()
defDrawNumVal(self):self.DrawNum()
31,784
def SetCal(self, year, month): self.InitValues() # reset initial values
def SetCal(self, year, month): self.InitValues() # reset initial values
31,785
def SetCal(self, year, month): self.InitValues() # reset initial values
def SetCal(self, year, month): self.InitValues() # reset initial values
31,786
def SetCal(self, year, month): self.InitValues() # reset initial values
def SetCal(self, year, month): self.InitValues() # reset initial values
31,787
def SetWeekEnd(self, font_color='BLACK', backgrd = 'LIGHT GREY'): date = 6 - int(self.dow) # start day of first saturday
def SetWeekEnd(self, font_color=None, backgrd = None): if font_color != None: self.SetColor(COLOR_WEEKEND_FONT, MakeColor(font_color)) if backgrd != None: self.SetColor(COLOR_WEEKEND_BACKGROUND, MakeColor(backgrd)) date = 6 - int(self.dow) # start day of first saturday
31,788
def SetWeekEnd(self, font_color='BLACK', backgrd = 'LIGHT GREY'): date = 6 - int(self.dow) # start day of first saturday
def SetWeekEnd(self, font_color='BLACK', backgrd = 'LIGHT GREY'): date = 6 - int(self.dow) # start day of first saturday
31,789
def SetWeekEnd(self, font_color='BLACK', backgrd = 'LIGHT GREY'): date = 6 - int(self.dow) # start day of first saturday
def SetWeekEnd(self, font_color='BLACK', backgrd = 'LIGHT GREY'): date = 6 - int(self.dow) # start day of first saturday
31,790
def GetRect(self): cnt = 0 for y in self.gridy[1:-1]: for x in self.gridx[:-1]: assert type(y) == int assert type(x) == int rect = wx.Rect(x, y, self.dl_w, self.dl_h) # create rect region self.rg[cnt] = rect cnt = cnt + 1
def GetRect(self): cnt = 0 for y in self.gridy[1:-1]: for x in self.gridx[:-1]: assert type(y) == int assert type(x) == int w = self.cellW h = self.cellH if x == self.gridx[-2]: w = w + self.restW rect = wx.Rect(x, y, w+1, h+1) # create rect region self.rg[cnt] = rect cnt = cnt + 1
31,791
def GetCal(self): return self.cal
def GetCal(self): return self.cal
31,792
def DrawMonth(self): month = Month[self.month]
def DrawMonth(self, DC): month = Month[self.month]
31,793
def DrawMonth(self): month = Month[self.month]
def DrawMonth(self): month = Month[self.month]
31,794
def DrawMonth(self): month = Month[self.month]
def DrawMonth(self): month = Month[self.month]
31,795
def DrawMonth(self): month = Month[self.month]
def DrawMonth(self): month = Month[self.month]
31,796
def DrawMonth(self): month = Month[self.month]
def DrawMonth(self): month = Month[self.month]
31,797
def DrawWeek(self): # draw the week days width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] rect_w = self.gridx[7]-self.gridx[0]
def DrawWeek(self): # draw the week days width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] rect_w = self.gridx[7]-self.gridx[0]
31,798
def DrawWeek(self): # draw the week days width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] rect_w = self.gridx[7]-self.gridx[0]
def DrawWeek(self): # draw the week days width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] rect_w = self.gridx[7]-self.gridx[0]
31,799