Un-kludged Decorator::GetFootprint
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4731 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -271,7 +271,7 @@ printf("BeDecorator: Move By (%.1f, %.1f)\n",pt.x,pt.y);
|
||||
_zoomrect.OffsetBy(pt);
|
||||
}
|
||||
|
||||
BRegion * BeDecorator::GetFootprint(void)
|
||||
void BeDecorator::GetFootprint(BRegion *region)
|
||||
{
|
||||
#ifdef DEBUG_DECORATOR
|
||||
printf("BeDecorator: Get Footprint\n");
|
||||
@@ -279,10 +279,11 @@ printf("BeDecorator: Get Footprint\n");
|
||||
// This function calculates the decorator's footprint in coordinates
|
||||
// relative to the layer. This is most often used to set a WinBorder
|
||||
// object's visible region.
|
||||
if(!region)
|
||||
return;
|
||||
|
||||
BRegion *reg=new BRegion(_borderrect);
|
||||
reg->Include(_tabrect);
|
||||
return reg;
|
||||
region->Set(_borderrect);
|
||||
region->Include(_tabrect);
|
||||
}
|
||||
|
||||
void BeDecorator::_DrawTitle(BRect r)
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
void MoveBy(BPoint pt);
|
||||
void Draw(BRect r);
|
||||
void Draw(void);
|
||||
BRegion *GetFootprint(void);
|
||||
void GetFootprint(BRegion *region);
|
||||
click_type Clicked(BPoint pt, int32 buttons, int32 modifiers);
|
||||
protected:
|
||||
void _DrawClose(BRect r);
|
||||
|
||||
@@ -175,6 +175,18 @@ void MacDecorator::_DrawTitle(BRect r)
|
||||
BPoint(_tabrect.left+textoffset,_closerect.bottom-1),&_layerdata);
|
||||
}
|
||||
|
||||
void MacDecorator::GetFootprint(BRegion *region)
|
||||
{
|
||||
// This function calculates the decorator's footprint in coordinates
|
||||
// relative to the layer. This is most often used to set a WinBorder
|
||||
// object's visible region.
|
||||
if(!region)
|
||||
return;
|
||||
|
||||
region->Set(_borderrect);
|
||||
region->Include(_tabrect);
|
||||
}
|
||||
|
||||
void MacDecorator::Draw(BRect update)
|
||||
{
|
||||
#ifdef DEBUG_DECOR
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
// void ResizeBy(BPoint pt);
|
||||
void Draw(BRect r);
|
||||
void Draw(void);
|
||||
//SRegion GetFootprint(void);
|
||||
void GetFootprint(BRegion *region);
|
||||
click_type Clicked(BPoint pt, int32 buttons, int32 modifiers);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -126,18 +126,18 @@ void WinDecorator::MoveBy(BPoint pt)
|
||||
_zoomrect.OffsetBy(pt);
|
||||
_minimizerect.OffsetBy(pt);
|
||||
}
|
||||
/*
|
||||
SRegion * WinDecorator::GetFootprint(void)
|
||||
|
||||
void WinDecorator::GetFootprint(BRegion *region)
|
||||
{
|
||||
// This function calculates the decorator's footprint in coordinates
|
||||
// relative to the layer. This is most often used to set a WindowBorder
|
||||
// relative to the layer. This is most often used to set a WinBorder
|
||||
// object's visible region.
|
||||
if(!region)
|
||||
return;
|
||||
|
||||
SRegion *reg=new SRegion(_borderrect);
|
||||
reg->Include(_tabrect);
|
||||
return reg;
|
||||
region->Set(_borderrect);
|
||||
region->Include(_tabrect);
|
||||
}
|
||||
*/
|
||||
|
||||
void WinDecorator::_DrawTitle(BRect r)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
// void ResizeBy(BPoint pt);
|
||||
void Draw(BRect r);
|
||||
void Draw(void);
|
||||
//SRegion GetFootprint(void);
|
||||
void GetFootprint(BRegion *region);
|
||||
click_type Clicked(BPoint pt, int32 buttons, int32 modifiers);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user