本文整理汇总了Python中BaseCompanions.ContainerDTC类的典型用法代码示例。如果您正苦于以下问题:Python ContainerDTC类的具体用法?Python ContainerDTC怎么用?Python ContainerDTC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ContainerDTC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: notification
def notification(self, compn, action):
ContainerDTC.notification(self, compn, action)
if action == 'delete':
# If the splitter itself is deleted it should unsplit so that
# deletion notifications from it's children won't cause
# access to deleted controls
if compn.control == self.control:
self.win1 = self.win2 = None
self.splitWindow(None, None)
return
# Win 1
# If Window1 is None, splitter can only be unsplit
if compn.control == self.win1:#self.GetWindow1(None):
self.control.Unsplit(self.win1)
if self.win2: self.win2.Show(True)
self.win1 = self.win2 = None
setterName = self.modeMethMap[self.control.GetSplitMode()]
self.propRevertToDefault('Window1', setterName)
self.designer.inspector.propertyUpdate('Window1')
self.designer.inspector.propertyUpdate('Window2')
return
if compn.control == self.win2:#self.GetWindow2(None):
self.SetWindow2(None)
setterName = self.modeMethMap[self.control.GetSplitMode()]
self.persistProp('Window2', setterName, None)
self.designer.inspector.propertyUpdate('Window2')
return
示例2: writeConstructor
def writeConstructor(self, output, collectionMethod, stripFrmId=""):
ContainerDTC.writeConstructor(self, output, collectionMethod, stripFrmId="")
if self.textConstr:
# Add call to init utils after frame constructor
if self.textConstr.comp_name == "" and collectionMethod == sourceconst.init_ctrls:
if self.designer.dataView.objects:
output.append("%sself.%s()" % (sourceconst.bodyIndent, sourceconst.init_utils))
示例3: updatePosAndSize
def updatePosAndSize(self):
ContainerDTC.updatePosAndSize(self)
# Argh, this is needed so that ClientSize is up to date
if self.textPropList:
for prop in self.textPropList:
if prop.prop_name == 'ClientSize':
size = self.control.GetClientSize()
prop.params = ['wx.Size(%d, %d)' % (size.x, size.y)]
示例4: __init__
def __init__(self, name, designer, parent, ctrlClass):
ContainerDTC.__init__(self, name, designer, parent, ctrlClass)
self.editors.update({'Tools': CollectionPropEdit})
self.subCompanions['Tools'] = ToolBarToolsCDTC
self.windowStyles = ['wx.TB_FLAT', 'wx.TB_DOCKABLE', 'wx.TB_HORIZONTAL',
'wx.TB_VERTICAL', 'wx.TB_3DBUTTONS', 'wx.TB_TEXT',
'wx.TB_NOICONS', 'wx.TB_NODIVIDER', 'wx.TB_NOALIGN',
] + self.windowStyles
示例5: __init__
def __init__(self, name, designer, frameCtrl):
ContainerDTC.__init__(self, name, designer, None, None)
self.control = frameCtrl
self.editors['Flags'] = FlagsConstrPropEdit
# XXX should rather be enumerated
self.windowStyles = ['wx.SIMPLE_BORDER', 'wx.DOUBLE_BORDER',
'wx.SUNKEN_BORDER', 'wx.RAISED_BORDER',
'wx.STATIC_BORDER', 'wx.NO_BORDER']
示例6: renameCtrlRefs
def renameCtrlRefs(self, oldName, newName):
ContainerDTC.renameCtrlRefs(self, oldName, newName)
# Check if subwindow references have changed
# XXX should maybe be done with notification, action = 'rename'
oldSrc = Utils.srcRefFromCtrlName(oldName)
for prop in self.textPropList:
if prop.prop_setter in ('SplitVertically', 'SplitHorizontally'):
if oldSrc in prop.params:
prop.params[prop.params.index(oldSrc)] = \
Utils.srcRefFromCtrlName(newName)
示例7: persistProp
def persistProp(self, name, setterName, value):
if setterName == 'SetSashVisible':
edge, visbl = value.split(',')
for prop in self.textPropList:
if prop.prop_setter == setterName and prop.params[0] == edge:
prop.params = [edge.strip(), visbl.strip()]
return
self.textPropList.append(methodparse.PropertyParse( None, self.name,
setterName, [edge.strip(), visbl.strip()], 'SetSashVisible'))
else:
ContainerDTC.persistProp(self, name, setterName, value)
示例8: persistedPropVal
def persistedPropVal(self, name, setterName):
# Unlike usual properties, SashPosition is persisted as a Split* method
# Therefore it needs to check the Split* method for the source value
if setterName == 'SetSashPosition':
for prop in self.textPropList:
if prop.prop_setter in ('SplitVertically', 'SplitHorizontally'):
return prop.params[2]
return ContainerDTC.persistedPropVal(self, name, setterName)
示例9: dontPersistProps
def dontPersistProps(self):
# Note this is a workaround for a problem on wxGTK where the size
# passed to the frame constructor is actually means ClientSize on wxGTK.
# By having this property always set, this overrides the frame size
# and uses the same size on Win and Lin
props = ContainerDTC.dontPersistProps(self)
props.remove('ClientSize')
return props
示例10: hideDesignTime
def hideDesignTime(self):
return ContainerDTC.hideDesignTime(self) + [
"ToolBar",
"MenuBar",
"StatusBar",
"Icon",
"Anchors",
"Constraints",
"Label",
]
示例11: hideDesignTime
def hideDesignTime(self):
return ContainerDTC.hideDesignTime(self) + ['SplitMode']
示例12: properties
def properties(self):
props = ContainerDTC.properties(self)
prop = ('NameRoute', self.GetSashVisible, self.SetSashVisible)
for name in self.edgeNameMap.keys():
props[name] = prop
return props
示例13: dontPersistProps
def dontPersistProps(self):
return ContainerDTC.dontPersistProps(self) + ['Selection']
示例14: events
def events(self):
return ContainerDTC.events(self) + ['SashEvent']
示例15: designTimeControl
def designTimeControl(self, position, size, args = None):
ctrl = ContainerDTC.designTimeControl(self, position, size, args)
ctrl.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged, id=ctrl.GetId())
return ctrl