Added GetBordersForSizer(int *bordertop, int *borderOther)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2003-04-05 23:26:30 +00:00
parent ddf7346ac0
commit 2ace5cf632
2 changed files with 16 additions and 0 deletions

View File

@@ -43,3 +43,17 @@ wxStaticBox::~wxStaticBox()
SetNSBox(NULL);
}
void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
{
NSRect contentRect = [[GetNSBox() contentView] frame];
NSRect thisRect = [m_cocoaNSView frame];
*borderTop = thisRect.size.height - (contentRect.origin.y+contentRect.size.height);
*borderOther = thisRect.size.width - (contentRect.origin.x+contentRect.size.width);
int nextBorder = contentRect.origin.y;
if(nextBorder > *borderOther)
*borderOther = nextBorder;
nextBorder = contentRect.origin.x;
if(nextBorder > *borderOther)
*borderOther = nextBorder;
}