зеркало из https://github.com/mozilla/pjs.git
Added Getbounds and GetBorderSize (these need to be removed when
nsWindow is derived from nsBaseWidget)
This commit is contained in:
Родитель
b30f491a5b
Коммит
8d070c5828
|
@ -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); };
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче