diff options
author | Guido van Rossum <guido@python.org> | 2000-05-08 17:25:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-08 17:25:17 (GMT) |
commit | 813008e506def2e19fdb44a55f9e91e749bc1869 (patch) | |
tree | 08d56a938b5136f26b0a7875cff094ac2791b9f1 /Lib/lib-stdwin/BoxParent.py | |
parent | e298c3018cf5613aa3d8af4a5cc5652f1659f12b (diff) | |
download | cpython-813008e506def2e19fdb44a55f9e91e749bc1869.zip cpython-813008e506def2e19fdb44a55f9e91e749bc1869.tar.gz cpython-813008e506def2e19fdb44a55f9e91e749bc1869.tar.bz2 |
Deleting all stdwin library modules.
Diffstat (limited to 'Lib/lib-stdwin/BoxParent.py')
-rw-r--r-- | Lib/lib-stdwin/BoxParent.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/Lib/lib-stdwin/BoxParent.py b/Lib/lib-stdwin/BoxParent.py deleted file mode 100644 index c792731..0000000 --- a/Lib/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 |