本文整理汇总了Python中BaseWidget.BaseWidget.update方法的典型用法代码示例。如果您正苦于以下问题:Python BaseWidget.update方法的具体用法?Python BaseWidget.update怎么用?Python BaseWidget.update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseWidget.BaseWidget
的用法示例。
在下文中一共展示了BaseWidget.update方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update
# 需要导入模块: from BaseWidget import BaseWidget [as 别名]
# 或者: from BaseWidget.BaseWidget import update [as 别名]
def update(self, **kwargs):
"""C.update (...) -> None
Updates the Container and refreshes its image and rect content.
Updates the Container and causes its parent to update itself on
demand.
"""
children = kwargs.get("children", {})
resize = kwargs.get("resize", False)
# We have to check for possible size changes here!
if resize:
self.dirty = True
elif self.locked:
return
else:
# Get the intersections with other overlapping children and add
# them to the update list.
items = children.items()
ch = self.children
for w, rect in items:
for widget in ch:
if w == widget:
continue
intersect = widget.rect.clip(rect)
if intersect.size != (0, 0):
children[widget] = intersect
BaseWidget.update(self, children=children, resize=resize)
示例2: update
# 需要导入模块: from BaseWidget import BaseWidget [as 别名]
# 或者: from BaseWidget.BaseWidget import update [as 别名]
def update (self, **kwargs):
"""B.update (...) -> None
Updates the Bin and refreshes its image and rect content.
Updates the Bin and causes its parent to update itself on
demand.
"""
children = kwargs.get ("children", {})
resize = kwargs.get ("resize", False)
if self.locked:
return
# We have to check for possible size changes here!
if resize:
self.dirty = True
else:
BaseWidget.update (self, children=children, resize=resize)