当前位置: 首页>>代码示例>>Python>>正文


Python BaseWidget.update方法代码示例

本文整理汇总了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)
开发者ID:BGCX067,项目名称:eyestabs-svn-to-git,代码行数:31,代码来源:Container.py

示例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)
开发者ID:BGCX067,项目名称:eyestabs-svn-to-git,代码行数:20,代码来源:Bin.py


注:本文中的BaseWidget.BaseWidget.update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。