r=pedemont, sr=blizzard
OS/2 only - implement GetBounds
This commit is contained in:
mkaply%us.ibm.com 2002-09-23 21:35:53 +00:00
parent db4a3ac2ad
commit 08cedcbba7
2 changed files with 24 additions and 0 deletions

View File

@ -1408,6 +1408,29 @@ NS_METHOD nsWindow::SetFocus(PRBool aRaise)
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Get this component dimension
//
//-------------------------------------------------------------------------
NS_METHOD nsWindow::GetBounds(nsRect &aRect)
{
if (mWnd) {
SWP swp;
WinQueryWindowPos(mWnd, &swp);
aRect.width = swp.cx;
aRect.height = swp.cy;
// Need to add code to convert coordinate if parent exists - see Windows
aRect.x = swp.x;
aRect.y = swp.y;
} else {
aRect = mBounds;
}
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Get this component dimension

View File

@ -116,6 +116,7 @@ class nsWindow : public nsBaseWidget,
NS_IMETHOD Enable( PRBool aState);
NS_IMETHOD IsEnabled(PRBool *aState);
NS_IMETHOD SetFocus(PRBool aRaise);
NS_IMETHOD GetBounds(nsRect &aRect);
NS_IMETHOD IsVisible( PRBool &aState);
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate);