def __init__(self, parent, inspector, model, compPal): [self.wxID_DATAVIEW] = [wx.NewId() for _init_ctrls in range(1)] wx.ListView.__init__(self, parent, self.wxID_DATAVIEW, size=(0,0), style=Preferences.dataViewListStyle | wx.SUNKEN_BORDER) InspectableObjectView.__init__(self, inspector, model, compPal, ((_('Default editor'), self.OnDefaultEditor, '-', ''), (_('Post'), self.OnPost, self.postBmp, ''), (_('Cancel'), self.OnCancel, self.cancelBmp, ''), ('-', None, '-', ''), (_('Cut'), self.OnCutSelected, '-', ''), (_('Copy'), self.OnCopySelected, '-', 'Copy'), (_('Paste'), self.OnPasteSelected, '-', 'Paste'), (_('Delete'), self.OnControlDelete, '-', 'Delete'), ('-', None, '-', ''), (_('Creation/Tab order...'), self.OnCreationOrder, '-', ''), ('-', None, '-', ''), (_('Context help'), self.OnContextHelp, '-', 'ContextHelp'), ), 0) self.il = wx.ImageList(24, 24) self.SetImageList(self.il, wx.IMAGE_LIST_SMALL) self.Bind(wx.EVT_LEFT_DOWN, self.OnSelectOrAdd) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnObjectSelect, id=self.wxID_DATAVIEW) self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnObjectDeselect, id=self.wxID_DATAVIEW) self.selection = [] self.vetoSelect = False self.active = True
def saveCtrls(self, definedCtrls, module=None, collDeps=None): InspectableObjectView.saveCtrls(self, definedCtrls, module, collDeps) compns = [] for objInf in self.objects.values(): compns.append(objInf[0]) self.model.removeWindowIds(self.collectionMethod) self.model.writeWindowIds(self.collectionMethod, compns)
def deleteCtrl(self, name, parentRef=None): self.selectNone() # notify other components of deletion if self.objects.has_key(name): self.controllerView.notifyAction(self.objects[name][0], 'delete') InspectableObjectView.deleteCtrl(self, name, parentRef) self.refreshCtrl()
def deleteCtrl(self, name, parentRef = None): self.selectNone() # notify other components of deletion if self.objects.has_key(name): self.controllerView.notifyAction(self.objects[name][0], 'delete') InspectableObjectView.deleteCtrl(self, name, parentRef) self.refreshCtrl()
def __init__(self, parent, inspector, model, compPal): [self.wxID_DATAVIEW] = [wx.NewId() for _init_ctrls in range(1)] wx.ListView.__init__(self, parent, self.wxID_DATAVIEW, size=(0, 0), style=Preferences.dataViewListStyle | wx.SUNKEN_BORDER) InspectableObjectView.__init__(self, inspector, model, compPal, ( (_('Default editor'), self.OnDefaultEditor, '-', ''), (_('Post'), self.OnPost, self.postBmp, ''), (_('Cancel'), self.OnCancel, self.cancelBmp, ''), ('-', None, '-', ''), (_('Cut'), self.OnCutSelected, '-', ''), (_('Copy'), self.OnCopySelected, '-', 'Copy'), (_('Paste'), self.OnPasteSelected, '-', 'Paste'), (_('Delete'), self.OnControlDelete, '-', 'Delete'), ('-', None, '-', ''), (_('Creation/Tab order...'), self.OnCreationOrder, '-', ''), ('-', None, '-', ''), (_('Context help'), self.OnContextHelp, '-', 'ContextHelp'), ), 0) self.il = wx.ImageList(24, 24) self.SetImageList(self.il, wx.IMAGE_LIST_SMALL) self.Bind(wx.EVT_LEFT_DOWN, self.OnSelectOrAdd) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnObjectSelect, id=self.wxID_DATAVIEW) self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnObjectDeselect, id=self.wxID_DATAVIEW) self.selection = [] self.vetoSelect = False self.active = True
def initObjectsAndCompanions(self, creators, objColl, dependents, depLinks): InspectableObjectView.initObjectsAndCompanions(self, creators, objColl, dependents, depLinks) self.initIdOnlyObjEvts(objColl.events, creators)
def close(self): self.cleanup() InspectableObjectView.close(self)
def destroy(self): InspectableObjectView.destroy(self) self.il = None
def renameCtrl(self, oldName, newName): self.controllerView.renameCtrlAndParentRefs(oldName, newName) InspectableObjectView.renameCtrl(self, oldName, newName) self.refreshCtrl() self.selectCtrls((newName, ))
def renameCtrl(self, oldName, newName): self.controllerView.renameCtrlAndParentRefs(oldName, newName) InspectableObjectView.renameCtrl(self, oldName, newName) self.refreshCtrl() self.selectCtrls( (newName,) )