diff options
author | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 +0000 |
commit | d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8 (patch) | |
tree | db4a6e4835e04851df721eb4595d7172d8e05c34 /Lib/stdwin/BoxParent.py | |
parent | 045e688f6fc06c87cc93f84e42fb4767a04ba559 (diff) | |
download | cpython-git-d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8.tar.gz |
These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin.
Diffstat (limited to 'Lib/stdwin/BoxParent.py')
-rwxr-xr-x | Lib/stdwin/BoxParent.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Lib/stdwin/BoxParent.py b/Lib/stdwin/BoxParent.py deleted file mode 100755 index c792731c5b..0000000000 --- a/Lib/stdwin/BoxParent.py +++ /dev/null @@ -1,40 +0,0 @@ -from TransParent import TransParent - -class BoxParent(TransParent): - # - def create(self, parent, (dh, dv)): - self = TransParent.create(self, parent) - self.dh = dh - self.dv = dv - return self - # - def getminsize(self, m, (width, height)): - width = max(0, width - 2*self.dh) - height = max(0, height - 2*self.dv) - width, height = self.child.getminsize(m, (width, height)) - return width + 2*self.dh, height + 2*self.dv - # - def setbounds(self, bounds): - (left, top), (right, bottom) = bounds - self.bounds = bounds - left = min(right, left + self.dh) - top = min(bottom, top + self.dv) - right = max(left, right - self.dh) - bottom = max(top, bottom - self.dv) - self.innerbounds = (left, top), (right, bottom) - self.child.setbounds(self.innerbounds) - # - def getbounds(self): - return self.bounds - # - def draw(self, d, area): - (left, top), (right, bottom) = self.bounds - left = left + 1 - top = top + 1 - right = right - 1 - bottom = bottom - 1 - d.box((left, top), (right, bottom)) - TransParent.draw(self, d, area) # XXX clip to innerbounds? - # - # XXX should scroll clip to innerbounds??? - # XXX currently the only user restricts itself to child's bounds |