From 56f043ed2d323f99cc275fe24224eaeb3d7f6957 Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Sun, 16 May 2004 19:15:36 +0000 Subject: [PATCH] modified Resize methods git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7599 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/DefaultDecorator.cpp | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/servers/app/server/DefaultDecorator.cpp b/src/servers/app/server/DefaultDecorator.cpp index 620f8e46ca..7c895a4f54 100644 --- a/src/servers/app/server/DefaultDecorator.cpp +++ b/src/servers/app/server/DefaultDecorator.cpp @@ -282,6 +282,35 @@ void DefaultDecorator::MoveBy(BPoint pt) bottomborder.OffsetBy(pt); } +void DefaultDecorator::ResizeBy(float x, float y) +{ + ResizeBy(BPoint(x,y)); +} + +void DefaultDecorator::ResizeBy(BPoint pt) +{ + STRACE(("DefaultDecorator: Resize By (%.1f, %.1f)\n",pt.x,pt.y)); + // Move all internal rectangles the appropriate amount + _frame.right += pt.x; + _frame.bottom += pt.y; + +// TODO: make bigger/smaller +// _tabrect. + + _resizerect.OffsetBy(pt); + _zoomrect.OffsetBy(pt); + _borderrect.right += pt.x; + _borderrect.bottom += pt.y; + + leftborder.bottom += pt.y; + topborder.right += pt.x; + rightborder.OffsetBy(pt.x, 0.0f); + rightborder.bottom += pt.y; + + bottomborder.OffsetBy(0.0, pt.y); + bottomborder.right += pt.x; +} + void DefaultDecorator::GetFootprint(BRegion *region) { STRACE(("DefaultDecorator: Get Footprint\n"));