Example #1
0
    def geometry(self):
        """ Get the geometry of the window.

        """
        # Wx has no standard way of taking into account the size of
        # the window frame. I'm not spending time on a workaround.
        point = self.widget.GetPosition()
        size = self.widget.GetClientSize()
        return Rect(point.x, point.y, size.GetWidth(), size.GetHeight())
Example #2
0
    def frame_geometry(self):
        """ Get the geometry of the window frame.

        Returns
        -------
        result : Rect
            The current geometry of the window frame.

        """
        if self.proxy_is_active:
            return self.proxy.frame_geometry()
        return Rect(-1, -1, -1, -1)
Example #3
0
    def geometry(self):
        """ Get the geometry of the window client area.

        Returns
        -------
        result : Rect
            The current geometry of the window client area.

        """
        if self.proxy_is_active:
            return self.proxy.geometry()
        return Rect(-1, -1, -1, -1)
Example #4
0
    def frame_geometry(self):
        """ Get the geometry of the window.

        """
        rect = self.widget.frameGeometry()
        return Rect(rect.x(), rect.y(), rect.width(), rect.height())
Example #5
0
    def geometry(self):
        """ Get the geometry of the window.

        """
        return Rect(self.widget.x, self.widget.y, self.widget.width,
                    self.widget.height)
Example #6
0
    def frame_geometry(self):
        """ Get the geometry of the window.

        """
        r = self.widget.GetRect()
        return Rect(r.GetX(), r.GetY(), r.GetWidth(), r.GetHeight())