    def get_rectangle(self):
        """
        Returns the bounding box defined by the usable space left after
        borders and/or scroll bars are accounted for.

        :returns: Tuple containing, x, y, height and width of bounding box
        """
        if self.has_border:
            x = 1
            y = self._frame.canvas.start_line + 1

            h = self._frame.canvas.height - 2
            w = self._frame.canvas.width - 2
        else:
            x = 0
            y = self._frame.canvas.start_line
            h = self._frame.canvas.height
            w = self._frame.canvas.width

            if self.can_scroll:
                w -= 1

        return x, y, h, w
Returns the bounding box defined by the usable space left after
borders and/or scroll bars are accounted for.

:returns: Tuple containing, x, y, height and width of bounding box
asciimatics/widgets/frame.py