Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)