Added Getbounds and GetBorderSize (these need to be removed when

nsWindow is derived from nsBaseWidget)
This commit is contained in:
rods%netscape.com 1998-11-04 21:02:42 +00:00
Родитель b30f491a5b
Коммит 8d070c5828
4 изменённых файлов: 61 добавлений и 0 удалений

Просмотреть файл

@ -1656,3 +1656,31 @@ NS_METHOD nsWindow::SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight)
mPreferredHeight = aHeight;
return NS_OK;
}
/**
*
*
**/
NS_METHOD nsWindow::GetClientBounds(nsRect &aRect)
{
return GetBounds(aRect);
}
/**
* Calculates the border width and height
*
**/
NS_METHOD nsWindow::GetBorderSize(PRInt32 &aWidth, PRInt32 &aHeight)
{
nsRect rectWin;
nsRect rectClient;
GetBounds(rectWin);
GetClientBounds(rectClient);
aWidth = rectWin.width - rectClient.width;
aHeight = rectWin.height - rectClient.height;
return NS_OK;
}

Просмотреть файл

@ -127,6 +127,9 @@ public:
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
NS_IMETHOD GetClientBounds(nsRect &aRect);
NS_IMETHOD GetBorderSize(PRInt32 &aWidth, PRInt32 &aHeight);
virtual PRBool IsChild() { return(PR_FALSE); };

Просмотреть файл

@ -1598,3 +1598,30 @@ NS_METHOD nsWindow::SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight)
return NS_OK;
}
/**
*
*
**/
NS_METHOD nsWindow::GetClientBounds(nsRect &aRect)
{
return GetBounds(aRect);
}
/**
* Calculates the border width and height
*
**/
NS_METHOD nsWindow::GetBorderSize(PRInt32 &aWidth, PRInt32 &aHeight)
{
nsRect rectWin;
nsRect rectClient;
GetBounds(rectWin);
GetClientBounds(rectClient);
aWidth = rectWin.width - rectClient.width;
aHeight = rectWin.height - rectClient.height;
return NS_OK;
}

Просмотреть файл

@ -131,6 +131,9 @@ public:
NS_IMETHOD GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight);
NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight);
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
NS_IMETHOD GetClientBounds(nsRect &aRect);
NS_IMETHOD GetBorderSize(PRInt32 &aWidth, PRInt32 &aHeight);
virtual PRBool IsChild() { return(PR_FALSE); };