rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
wx.PostEvent(self.tabsSplitter, wx.SizeEvent(self.tabsSplitter.GetSize())) | wx.PostEvent(self.tabsSplitter, wx.SizeEvent(self.tabsSplitter.GetSize())) | def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent) | 1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c/Editor.py |
print _('Not running in server mode') | print 'Not running in server mode' | def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = False self._init_ctrls(parent) | 1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c/Editor.py |
if node.protocol == 'recent.files': | if node and node.protocol == 'recent.files': | def OnOpen(self, event, curdir='.'): fn = self.openFileDlg(curdir=curdir) if fn: self.openOrGotoModule(fn) self.explorerStore.recentFiles.add(fn) | 1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1a2a77a0ec629149cb4c0da2a67e163ec9f6e12c/Editor.py |
self.wID = NewId() | self.wID = wxNewId() | def __init__(self, propEditor, value): self.propEditor = propEditor self.editorCtrl = None self.wID = NewId() self.value = value | 244dec2af59e613ef58de47f2df2891911ad586c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/244dec2af59e613ef58de47f2df2891911ad586c/InspectorEditorControls.py |
Catches design time parameter overrides. """ | Catches design time parameter overrides. """ | def setupArgs(self, ctrlName, params, dontEval): """ Create a dictionary of parameters for the constructor of the control from a dictionary of string/source parameters. Catches design time parameter overrides. """ | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
print 'DESTROY InspectableObjectCollectionView', self.__class__.__name__ | def destroy(self): print 'DESTROY InspectableObjectCollectionView', self.__class__.__name__ del self.controllerView del self.inspector for objval in self.objects.values(): objval[0].destroy() for coll in self.collEditors.values(): coll.destroy() del self.collEditors del self.objects del self.senderMapper EditorViews.Ed... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): | def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): | def buildParentRelationship(self): """ Build a nested dictionary of key = name, value = dict pairs describing parental relationship. Assuming parents are created before children """ parRel = {} parRef = {} for ctrl in self.objectOrder: ce = self.objects[ctrl] if ce[2] is None: parRel[ctrl] = {} parRef[ctrl] = parRel[c... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
for ctrl in creators: self.initObjCreator(ctrl) self.initObjProps(objColl.propertiesByName, ctrl.comp_name, ctrl, dependents, depLinks) self.initObjColls(objColl.collectionsByName, ctrl.comp_name, ctrl, collDeps) self.initObjEvts(objColl.eventsByName, ctrl.comp_name, ctrl) self.applyDepsForCtrl(ctrl.comp_name, depLink... | for constr in creators: self.initObjCreator(constr) self.initObjProps(objColl.propertiesByName, constr.comp_name, constr, dependents, depLinks) self.initObjColls(objColl.collectionsByName, constr.comp_name, constr, collDeps) self.initObjEvts(objColl.eventsByName, constr.comp_name, constr) self.applyDepsForCtrl(constr.... | def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): collDeps = {} for ctrl in creators: self.initObjCreator(ctrl) self.initObjProps(objColl.propertiesByName, ctrl.comp_name, ctrl, dependents, depLinks) self.initObjColls(objColl.collectionsByName, ctrl.comp_name, ctrl, collDeps) self.initObjEvts... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def initObjProps(self, props, name, creator, dependents, depLinks): """ Initialise property list by evaluating 1st parameter and calling prop's setter with it. Also associate companion name with prop parse objs """ if props.has_key(name): comp, ctrl = self.objects[name][0:2] # initialise live component's... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | ||
target = Utils.ctrlNameFromSrcRef(prop.params[0]) if target not in definedCtrls: | refs = self.getRefsFromProp(prop) allCtrlsDefined = len(refs) > 0 for ref in refs: if ref not in definedCtrls: allCtrlsDefined = false if not allCtrlsDefined: | def checkAndAddDepLink(self, ctrlName, prop, dependentProps, deps, depLinks, definedCtrls): if prop.prop_name in dependentProps: # Don't postpone if target ctrl already defined target = Utils.ctrlNameFromSrcRef(prop.params[0]) if target not in definedCtrls: self.addDepLink(prop, ctrlName, deps, depLinks) return true re... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self | for prop, otherRefs in depLinks[ctrlName]: for oRf in otherRefs: if not oRf in self.objectOrder: break | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] | ctrl = self.objects[prop.comp_name][1] if len(prop.params) == 1: if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop.prop_setter)(ctrl, value) | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
continue RTTI.getFunction(ctrl, prop.prop_setter)(ctrl, value) | refs = [] for param in prop.params: if len(param) >= 4 and param[:4] == 'self': refs.append(self.objects[Utils.ctrlNameFromSrcRef(param)][1]) else: refs.append(eval(param)) apply(RTTI.getFunction(ctrl, prop.prop_setter), [ctrl,]+refs) | def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def applyDepsForCtrl(self, ctrlName, depLinks): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: ctrl = self.objects[prop.comp_name][1] if ctrlName == '': value = self else: ord, objs = self.model.allObjects() if objs.has_key(ctrlName): value = objs[ctrlName][1] else: continue RTTI.getFunction(ctrl, prop... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | ||
if not dependents.has_key(name): dependents[name] = [] dependents[name].append(prop) link = Utils.ctrlNameFromSrcRef(prop.params[0]) if not depLinks.has_key(link): depLinks[link] = [] depLinks[link].append(prop) | refs = self.getRefsFromProp(prop) for link in refs: if not depLinks.has_key(link): depLinks[link] = [] otherRefs = refs[:] otherRefs.remove(link) depLinks[link].append( (prop, otherRefs) ) | def addDepLink(self, prop, name, dependents, depLinks): if not dependents.has_key(name): dependents[name] = [] dependents[name].append(prop) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
companion.renameCtrlRefs(oldName, newName) | def renameCtrl(self, oldName, newName): """ Rename a control and update all its properties and events.""" | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
def renameCtrl(self, oldName, newName): """ Rename a control and update all its properties and events.""" | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | ||
compn.writeDependencies(newBody, ctrlName, depLinks) | compn.writeDependencies(newBody, ctrlName, depLinks, definedCtrls) imp = compn.writeImports() if imp and imp not in imports: imports.append(imp) | def saveCtrls(self, definedCtrls): """ Replace current source of method in collectionMethod with values from constructors, properties and events. """ | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
compn.writeDependencies(output, ctrlName, depLinks) | compn.writeDependencies(output, ctrlName, depLinks, definedCtrls) | output.insert(0, ' def %s(%s):'% (self.collectionMethod, self.collectionParams)) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
except: | except NameError: | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
print methList | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
print 'Empty clipboard' | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | ||
pns = objCol.getCtrlNames() | pasteNameClasses = objCol.getCtrlNames() | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
for name, clss in pns: | oldNames = [] for name, clss in pasteNameClasses: | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
objCol.renameCtrl(name, newName) | oldNames.append(name) else: newNames.append(name) oldNames.append(name) for oldName, newName in map(None, oldNames, newNames): if newName != oldName: objCol.renameCtrl(oldName, newName) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
if collCtrlName == name: print 'renaming Coll Obj Coll' | collObjColl.renameCtrl(oldName, newName) if collCtrlName == oldName: | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
collObjColl.renameCtrl(name, newName) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
pastedCtrls.append(name) print 'Update models object collections' | pastedCtrls.append(oldName) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
print meth, collCtrlName | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
copySource = objCol.creators[0].params['parent'] objCol.reparent(copySource, Utils.srcRefFromCtrlName(destCtrlName)) | if objCol.creators[0].params.has_key('parent'): copySource = objCol.creators[0].params['parent'] objCol.reparent(copySource, Utils.srcRefFromCtrlName(destCtrlName)) | if line[:8] == ' def ': meth = line[8:string.find(line, '(', 9)] currMeth = [meth] methList.append(currMeth) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def refreshContainment(self, selectName = None): | def refreshContainment(self, selectName = None): """ Rebuild parent tree and optionally select given control """ | def refreshContainment(self, selectName = None): parRelations, parReference = self.buildParentRelationship() self.inspector.containment.refreshCtrl(self.model.main, parRelations, self) if selectName is not None: self.inspector.containment.selectName(selectName) return parRelations, parReference | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
results['self.'+objName] = self.objects[objName][1] | if objName: results['self.'+objName] = self.objects[objName][1] else: results['self'] = self.objects[objName][1] return results def getObjectsOfClassWithParent(self, theClass, theParentName): results = {} for objName in self.objects.keys(): if self.objects[objName][2] == theParentName and \ issubclass(self.objects[obj... | def getObjectsOfClass(self, theClass): results = {} for objName in self.objects.keys(): if issubclass(self.objects[objName][1].__class__, theClass): results['self.'+objName] = self.objects[objName][1] return results | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.SetIcon(wxIcon(path.join(Preferences.toPyPath(\ 'Images/Icons/Designer.ico')), wxBITMAP_TYPE_ICO)) | self.SetIcon(IS.load('Images/Icons/Designer.ico')) | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
if Preferences.drawDesignerGrid: EVT_PAINT(self, self.OnPaint) self.drawGridMethods = {'lines' : self.drawGrid_intersectingLines, 'dots' : self.drawGrid_dots, 'bitmap': self.drawGrid_bitmap, 'grid' : self.drawGrid_grid} | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
('Paste', wxID_EDITPASTE)): tpe, key = PrefsKeys.keyDefs[name] | ('Paste', wxID_EDITPASTE), ('MoveLeft', wxID_EDITMOVELEFT), ('MoveRight', wxID_EDITMOVERIGHT), ('MoveUp', wxID_EDITMOVEUP), ('MoveDown', wxID_EDITMOVEDOWN), ('WidthInc', wxID_EDITWIDTHINC), ('WidthDec', wxID_EDITWIDTHDEC), ('HeightInc', wxID_EDITHEIGHTINC), ('HeightDec', wxID_EDITHEIGHTDEC), ): tpe, key, code = PrefsKe... | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionVie... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | self.selection = \ SelectionTags.SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | def refreshCtrl(self): if self.destroying: return | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | """ Create a selection group """ self.selection = SelectionTags.SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | def initSelection(self): self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def CtrlAnchored(self, ctrl): result = (ctrl == self) | def CtrlAnchored(self, ctrl): result = (ctrl == self) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
def getAllObjects(self): | def getAllObjects(self): """ Overridden to also add objects from the DataView """ | def getAllObjects(self):#, theClass): results = InspectableObjectCollectionView.getAllObjects(self) for objName in self.dataView.objects.keys(): if objName: results['self.'+objName] = self.dataView.objects[objName][1] else: results['self'] = self.dataView.objects[objName][1] return results | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.notifyAction(ctrlInfo[0], 'delete') | def deleteCtrl(self, name, parentRef = None): ctrlInfo = self.objects[name] if ctrlInfo[1] == self: wxMessageBox("Can't delete frame") return parRel = None # build relationship, this will only happen for the first call if not parentRef: # select parent so long, pretty soon won't be able to ask who # the parent is paren... | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
if wxIntersectRect((clickPos.x, clickPos.y + tbOffset, 1, 1), | if childCtrl.IsShown() and wxIntersectRect((clickPos.x, clickPos.y + tbOffset, 1, 1), | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else: parent = ctrl.GetParent() # Workaround toolbar offset bug tbOffset = 0 if parent == self: tb = self.GetToolBar() if tb: tbOffset = tb.GetSize().y * -1 | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
break; | break | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): selCtrl, selCompn, selPos = ctrl, companion, clickPos if companion.container: parent = ctrl else: parent = ctrl.GetParent() # Workaround toolbar offset bug tbOffset = 0 if parent == self: tb = self.GetToolBar() if tb: tbOffset = tb.GetSize().y * -1 | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | self.selection = SelectionTags.SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | def assureSingleSelection(self): if not self.selection: self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def OnMouseOver(self, event): if event.Dragging(): pos = event.GetPosition() ctrl = self.senderMapper.getObject(event) if self.selection: self.selection.moving(ctrl, pos) elif self.multiSelection: for sel in self.multiSelection: sel.moving(ctrl, pos, self.mainMultiDrag) event.Skip() def OnControlSelect(self, event):... | def collapseNamesToContainers(self, ctrlNames): """ Collapse set of names to exclude the names of all their children """ def hasParentInList(item, list): return intem in list exp = ctrlNames[:] colLst = filter(\ lambda name, names=ctrlNames, objs=self.objects: \ objs[name][2] not in names, ctrlNames) return colLst ... | def OnMouseOver(self, event): if event.Dragging(): pos = event.GetPosition() ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
pos = event.GetPosition() if companion.container: parent = ctrl | if selCompn.container: parent = selCtrl pos = selPos | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
parent = ctrl.GetParent() screenPos = ctrl.ClientToScreen(pos) | parent = selCtrl.GetParent() screenPos = selCtrl.ClientToScreen(selPos) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
pos = wxPoint(granularise(pos.x), granularise(pos.y)) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
evtPos = event.GetPosition() ctrlName = companion.name selCtrl, selCompn, selPos = \ self.checkChildCtrlClick(ctrlName, ctrl, companion, evtPos) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
if event.ShiftDown(): | if multiSelect: | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
if ctrl.GetParent().this != self.selection.selection.GetParent().this: | if selCtrl.GetParent().this != self.selection.selection.GetParent().this: | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
if ctrl.GetParent().this != self.multiSelection[0].selection.GetParent().this: | if selCtrl.GetParent().this != self.multiSelection[0].selection.GetParent().this: | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
if ctrl == self.selection.selection: | if selCtrl == self.selection.selection: | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
newSelection = MultiSelectionGroup(self, self.senderMapper, self.inspector, self) | newSelection = SelectionTags.MultiSelectionGroup(self, self.senderMapper, self.inspector, self) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.selection = SingleSelectionGroup(self, | self.selection = SelectionTags.SingleSelectionGroup(self, | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
newSelection = MultiSelectionGroup(self, self.senderMapper, self.inspector, self) | newSelection = SelectionTags.MultiSelectionGroup(self, self.senderMapper, self.inspector, self) | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | ||
def OnControlRelease(self, event): if self.selection: self.selection.moveRelease() elif self.multiSelection: for sel in self.multiSelection: sel.moveRelease() self.mainMultiDrag = None | return 0 def OnFramePos(self, event): """ Called when frame is repositioned """ if self.selection and self.selection.selection == self: self.inspector.constructorUpdate('Position') | def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def OnControlResize(self, event): | def _drawLines(self, dc, col, loglFunc, sze, sg): pen1 = wxPen(col) dc.SetPen(pen1) dc.SetLogicalFunction(loglFunc) for y in range(sze.y / sg): dc.DrawLine(0, y * sg, sze.x, y * sg) for x in range(sze.x / sg): dc.DrawLine(x * sg, 0, x * sg, sze.y) def drawGrid_intersectingLines(self, dc, sze, sg): bgCol = dc.GetBack... | def OnControlRelease(self, event): if self.selection: self.selection.moveRelease() elif self.multiSelection: for sel in self.multiSelection: sel.moveRelease() self.mainMultiDrag = None event.Skip() | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) sze = self.GetSize() granSze = granularise(sze.x), granularise(sze.y)+3 self.SetSize(granSze) if not self.GetAutoLayout(): c = 0 ctrl = None for ctrlLst in self.objects.values(): if len(ctrlLst) > 2 and ctrlLst[2] == '' and \ (ctr... | drawGrid(dc, sze, sg) | def OnControlResize(self, event): try: if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
event.Skip() self.Layout() def OnControlDClick(self, event): pass def OnFramePos(self, event): self.assureSingleSelection() self.selection.selectCtrl(self, self.companion) self.inspector.constructorUpdate('Position') event.Skip() | dc.EndDrawing() | def OnControlResize(self, event): try: if event.GetId() == self.GetId(): self.selection.selectCtrl(self, self.companion) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
def OnEditor(self, event): self.model.editor.Show(true) self.model.editor.Raise() | def OnControlDelete(self, event): ctrls = [] if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) #map(self.deleteCtrl, ctrls) for ctrlName in ctrls: self.deleteCtrl(ctrlName) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py | |
clip = wxTheClipboard clip.Open() try: clip.SetData(wxTextDataObject(string.join(output, os.linesep))) finally: clip.Close() | Utils.writeTextToClipboard(string.join(output, os.linesep)) | def OnCutSelected(self, event): if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
clip = wxTheClipboard clip.Open() try: clip.SetData(wxTextDataObject(string.join(output, os.linesep))) finally: clip.Close() | Utils.writeTextToClipboard(string.join(output, os.linesep)) | def OnCopySelected(self, event): if self.selection: ctrls = [self.selection.name] elif self.multiSelection: ctrls = map(lambda sel: sel.name, self.multiSelection) | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | if not self.selection.selCompn.container: self.selectParent(self.selection.selection) | def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
string.split(data.GetText(), os.linesep)) | string.split(Utils.readTextFromClipboard(), os.linesep)) | def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
self.selection.selectCtrl(self.objects[pasted[0]][1], self.objects[pasted[0]][0]) | pasted = self.collapseNamesToContainers(pasted) if len(pasted) == 1: self.selection.selectCtrl(self.objects[pasted[0]][1], self.objects[pasted[0]][0]) else: self.selection.destroy() self.selection = None self.multiSelection = [] for ctrlName in pasted: selCompn, selCtrl, prnt = self.objects[ctrlName] newSelection = Sel... | def OnPasteSelected(self, event): if self.selection: clip = wxTheClipboard clip.Open() try: data = wxTextDataObject() clip.GetData(data) finally: clip.Close() | 2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py |
elif hasattr(wxNamespace, wx.word): obj = getattr(wxNamespace, wx.word) | elif hasattr(wxNamespace, word): obj = getattr(wxNamespace, word) | def handleBrwsRuntimeGlobals(self, word, currLineNo): # The current runtime values of the shell is inspected # as well as the wxPython namespaces if self.model.editor.shell: shellLocals = self.model.editor.shell.getShellLocals() else: shellLocals = {} | 3c2a83c9509803c5d0888fb86e4d2dcad2dbcbe7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3c2a83c9509803c5d0888fb86e4d2dcad2dbcbe7/PySourceView.py |
EVT_STC_MARGINCLICK(self, wxID_PYTHONSOURCEDIFFVIEW, self.OnMarginClick) | wx.stc.EVT_STC_MARGINCLICK(self, wxID_PYTHONSOURCEDIFFVIEW, self.OnMarginClick) | def __init__(self, parent, model): wxID_PYTHONSOURCEDIFFVIEW = wx.NewId() | c3dc72f16891c57aed9998aa91d852fe6d54df64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c3dc72f16891c57aed9998aa91d852fe6d54df64/DiffView.py |
if line[:9]=='<a href="': idx = string.find(line, '">') | if line[:8]=='<a href=': idx = string.find(line, '>') | def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | 5955bb8c40e9cbb86c67e5ad044a6610f0a24153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5955bb8c40e9cbb86c67e5ad044a6610f0a24153/HelpScrpt.py |
href = line[9:idx] name = line[idx+2:] | href = line[9:idx-1] name = line[idx+1:] | def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | 5955bb8c40e9cbb86c67e5ad044a6610f0a24153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5955bb8c40e9cbb86c67e5ad044a6610f0a24153/HelpScrpt.py |
output.write(header % strftime('%Y/%d/%m', gmtime(time()), '$', '$')) | output.write(header % (strftime('%Y/%d/%m', gmtime(time())), '$', '$')) | def ripPythonDocs(splLst, dir, name_term): dict = {} for line in splLst: if line[:9]=='<a href="': idx = string.find(line, '">') if idx != -1: href = line[9:idx] name = line[idx+2:] idx = string.find(name, name_term) if idx != -1: name = string.strip(name[:idx]) dict[name] = dir+href return dict | 5955bb8c40e9cbb86c67e5ad044a6610f0a24153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5955bb8c40e9cbb86c67e5ad044a6610f0a24153/HelpScrpt.py |
lns = text.split(self.eol) | lns = text.split('\n') | def insertCodeBlock(self, text): cp = self.GetCurrentPos() ln = self.LineFromPosition(cp) indent = cp - self.PositionFromLine(ln) lns = text.split(self.eol) # XXX adapt for tab mode text = (self.eol+indent*' ').join(lns) | d22941ff9ff95e4d62f95643721add7d65e67965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/d22941ff9ff95e4d62f95643721add7d65e67965/SourceViews.py |
def isDir(self, path): return path[-1] == '/' | def isDir(self, path = ''): if path: return path[-1] == '/' else: return false | def isDir(self, path): return path[-1] == '/' | 01c4d2b444f5330822a784d111b59b971a3ec646 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/01c4d2b444f5330822a784d111b59b971a3ec646/ZipExplorer.py |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass, model.specialAttrs) if model.modelIdentifier == 'Dialog': style = wxRESIZE_BORDER | wxCAPTION | wxSYSTEM_MENU else: style = wxDEFAULT_FRAM... | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
InspectableObjectView.saveCtrls(self, definedCtrls, module) | InspectableObjectView.saveCtrls(self, definedCtrls, module, collDeps) | def saveCtrls(self, definedCtrls, module=None): """ Generate source code for Designer """ | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
for collEditor in self.collEditors.values() + self.dataView.collEditors.values(): | collEditors = self.collEditors.values() + \ self.dataView.collEditors.values() if self.sizersView: collEditors.extend(self.sizersView.collEditors.values()) for collEditor in collEditors: | def renameFrame(self, oldName, newName): """ Hook that also updates the Model and window ids of the Frame when it's name changes """ self.SetName(newName) | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
self.saveCtrls(self.dataView.objectOrder[:], module) | otherRefs = self.dataView.objectOrder[:] if self.sizersView: otherRefs.extend(self.sizersView.objectOrder[:]) self.saveCtrls(otherRefs, module) | def refreshModel(self): """ Update model with streamed out controls """ # Make source r/w self.model.views['Source'].disableSource(false) | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
""" Overridden to also add objects from the DataView """ | """ Overridden to also add objects from the other views """ | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self.... | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
dataResults = {} | otherResults = {} | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self.... | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
dataResults['self.'+objName] = self.dataView.objects[objName][1] results.update(dataResults) | otherResults['self.'+objName] = self.dataView.objects[objName][1] if self.sizersView: for objName in self.sizersView.objects.keys(): if isinstance(self.sizersView.objects[objName][1], theClass): otherResults['self.'+objName] = self.sizersView.objects[objName][1] results.update(otherResults) | def getObjectsOfClass(self, theClass): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getObjectsOfClass(self, theClass) dataResults = {} for objName in self.dataView.objects.keys(): if isinstance(self.dataView.objects[objName][1], theClass): dataResults['self.'+objName] = self.... | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
""" Overridden to also add objects from the DataView """ | """ Overridden to also add objects from other views """ | def getAllObjects(self): """ Overridden to also add objects from the DataView """ results = InspectableObjectView.getAllObjects(self) for objName in self.dataView.objects.keys(): results[Utils.srcRefFromCtrlName(objName)] = \ self.dataView.objects[objName][1] return results | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
offset[0] = offset[0] + realParent.GetPosition().x offset[1] = offset[1] + realParent.GetPosition().y | offset[0] += realParent.GetPosition().x offset[1] += realParent.GetPosition().y | def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
def checkChildCtrlClick(self, ctrlName, ctrl, companion, clickPos): """ Check whether the click on the control actually falls within a region occupied by one of it's children. The click is then transfered to the child. """ selCtrl, selCompn, selPos = ctrl, companion, clickPos | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py | ||
evt = wxSizeEvent(ctrl.GetSize()) evt.SetId(ctrl.GetId()) wxPostEvent(ctrl, evt) | sizer = ctrl.GetSizer() if sizer: sizer.Layout() wxPostEvent(ctrl, wxSizeEvent(ctrl.GetSize(), ctrl.GetId())) wxCallAfter(ctrl.Refresh) | def relayoutCtrl(self, ctrl): self.forceResize = true # cleared by the event evt = wxSizeEvent(ctrl.GetSize()) evt.SetId(ctrl.GetId()) wxPostEvent(ctrl, evt) | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py |
imports = line[7+impIndent:].split(', ') | imports = line[7+impIndent:].strip().split(', ') | def updateAutoCreateImports(self, oldName, newName): """ Rename module in import list. | 473661e8e5a3170d81010af9cbd004e2dbbd617e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/473661e8e5a3170d81010af9cbd004e2dbbd617e/PythonEditorModels.py |
elif prop.params[0][:11] == 'self._init_': | elif len(prop.params) and prop.params[0][:11] == 'self._init_': | def initObjProps(self, props, name, creator, dependents, depLinks): """ Initialise property list by evaluating 1st parameter and calling prop's setter with it. Also associate companion name with prop parse objs """ | 796cf33ef52fe6094250b75a5c207d1184ce4304 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/796cf33ef52fe6094250b75a5c207d1184ce4304/InspectableViews.py |
self.specialAttrs = [] | self.specialAttrs = {} | def __init__(self, data, name, main, editor, saved, app = None): ClassModel.__init__(self, data, name, main, editor, saved, app) self.designerTool = None self.specialAttrs = [] | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
paramLst.append('%s = %s'%(param, params[param])) | paramLst.append(Preferences.cgKeywordArgFormat %{'keyword': param, 'value': params[param]}) | def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
self.data = (defSig + defImport + defCreateClass + defWindowIds + \ defClass) % (self.modelIdentifier, self.main, self.main, Utils.windowIdentifier(self.main, ''), init_ctrls, 1, self.main, self.defaultName, self.defaultName, paramStr) | self.data = (sourceconst.defSig + sourceconst.defImport + \ sourceconst.defCreateClass + sourceconst.defWindowIds + \ sourceconst.defClass) % ( self.modelIdentifier, self.main, self.main, Utils.windowIdentifier(self.main, ''), sourceconst.init_ctrls, 1, self.main, self.defaultName, self.defaultName, paramStr) | def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
def new(self, params): """ Create a new frame module """ paramLst = [] for param in params.keys(): paramLst.append('%s = %s'%(param, params[param])) paramStr = 'self, ' + string.join(paramLst, ', ') | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py | ||
if Utils.startswith(string.strip(mod.source[idx]), 'self._init_ctrls('): | line = string.strip(mod.source[idx]) if Utils.startswith(line, 'self._init_ctrls('): | e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
for attr, blocks in cls.attributes.items(): for block in blocks: if startline <= block.start <= endline and attr not in attrs: line = mod.source[block.start-1] val = line[string.find(line, '=')+1:] attrs.append( (attr, val) ) | def readAttrsFromSrc(attrs, attributes, source, startline, endline): for attr, blocks in attributes.items(): for block in blocks: if startline <= block.start <= endline and attr not in attrs: line = source[block.start-1] val = string.strip(line[string.find(line, '=')+1:]) attrs.append( (attr, val) ) if extAttrInitNam... | e.g. def __init__(self, parent, myFrameCaption): self.frameCaption = 'Design time frame caption' self.frameCaption = myFrameCaption self._init_ctrls(parent) | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
if self.objectCollections.has_key(init_ctrls): | if self.objectCollections.has_key(sourceconst.init_ctrls): | def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ module = self.getModule() # Parse all _init_* methods self.objectCollections = {} if module.classes.has_key(self.main): main = module.classes[self.main] | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
self.mainConstr = self.objectCollections[init_ctrls].creators[0] | self.mainConstr = \ self.objectCollections[sourceconst.init_ctrls].creators[0] | def readComponents(self): """ Setup object collection dict by parsing all designer controlled methods """ module = self.getModule() # Parse all _init_* methods self.objectCollections = {} if module.classes.has_key(self.main): main = module.classes[self.main] | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
reWinIds = re.compile(srchWindowIds % colMeth) | reWinIds = re.compile(sourceconst.srchWindowIds % colMeth) | def removeWindowIds(self, colMeth): """ Remove a method's corresponding window ids from the source code """ # find windowids in source winIdIdx = -1 reWinIds = re.compile(srchWindowIds % colMeth) module = self.getModule() for idx in range(len(module.source)): match = reWinIds.match(module.source[idx]) if match: del mod... | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
reWinIds = re.compile(srchWindowIds % colMeth) | reWinIds = re.compile(sourceconst.srchWindowIds % colMeth) | def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
[string.strip(defWindowIds % (string.join(lst, ', '), colMeth, len(lst))), ''] | [string.strip(sourceconst.defWindowIds % ( string.join(lst, ', '), colMeth, len(lst))), ''] | def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
string.strip(defWindowIds % (string.join(lst, ', '), colMeth, len(lst))) | string.strip(sourceconst.defWindowIds % (string.join(lst, ', '), colMeth, len(lst))) | def writeWindowIds(self, colMeth, companions): """ Write a method's corresponding window ids to the source code """ # To integrate efficiently with Designer.SaveCtrls this method # modifies module.source but doesn't refresh anything | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
def update(self): ClassModel.update(self) | 2e9d3fcbdee9554725586a2bb9d0c08869148a5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2e9d3fcbdee9554725586a2bb9d0c08869148a5c/wxPythonEditorModels.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.