Added an extra parameter to the Init to tell it whether it should have a sunken border

This commit is contained in:
rods%netscape.com 1998-11-02 22:19:08 +00:00
parent d0e7ba9324
commit 87ab8f4f4a
3 changed files with 12 additions and 7 deletions

View File

@ -126,7 +126,8 @@ public:
NS_IMETHOD Init(nsNativeWidget aNativeParent,
PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h,
nsScrollPreference aScrolling = nsScrollPreference_kAuto,
PRBool aAllowPlugins = PR_TRUE);
PRBool aAllowPlugins = PR_TRUE,
PRBool aIsSunkenBorder = PR_TRUE);
NS_IMETHOD Destroy(void);
NS_IMETHOD GetBounds(PRInt32 &x, PRInt32 &y, PRInt32 &w, PRInt32 &h);
NS_IMETHOD SetBounds(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h);
@ -562,7 +563,8 @@ NS_IMETHODIMP
nsWebShell::Init(nsNativeWidget aNativeParent,
PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h,
nsScrollPreference aScrolling,
PRBool aAllowPlugins)
PRBool aAllowPlugins,
PRBool aIsSunkenBorder)
{
//XXX make sure plugins have started up. this really needs to
//be associated with the nsIContentViewerContainer interfaces,
@ -632,7 +634,7 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
}
widgetInit.clipChildren = PR_FALSE;
widgetInit.mBorderStyle = eBorderStyle_3DChildWindow;
widgetInit.mBorderStyle = aIsSunkenBorder ? eBorderStyle_3DChildWindow : eBorderStyle_none;
mWindow->Create(aNativeParent, aBounds, nsWebShell::HandleEvent,
mDeviceContext, nsnull, nsnull, &widgetInit);

View File

@ -95,7 +95,8 @@ public:
NS_IMETHOD Init(nsNativeWidget aNativeParent,
PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h,
nsScrollPreference aScrolling = nsScrollPreference_kAuto,
PRBool aAllowPlugins = PR_TRUE) = 0;
PRBool aAllowPlugins = PR_TRUE,
PRBool aIsSunkenBorder = PR_TRUE) = 0;
NS_IMETHOD Destroy() = 0;

View File

@ -126,7 +126,8 @@ public:
NS_IMETHOD Init(nsNativeWidget aNativeParent,
PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h,
nsScrollPreference aScrolling = nsScrollPreference_kAuto,
PRBool aAllowPlugins = PR_TRUE);
PRBool aAllowPlugins = PR_TRUE,
PRBool aIsSunkenBorder = PR_TRUE);
NS_IMETHOD Destroy(void);
NS_IMETHOD GetBounds(PRInt32 &x, PRInt32 &y, PRInt32 &w, PRInt32 &h);
NS_IMETHOD SetBounds(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h);
@ -562,7 +563,8 @@ NS_IMETHODIMP
nsWebShell::Init(nsNativeWidget aNativeParent,
PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h,
nsScrollPreference aScrolling,
PRBool aAllowPlugins)
PRBool aAllowPlugins,
PRBool aIsSunkenBorder)
{
//XXX make sure plugins have started up. this really needs to
//be associated with the nsIContentViewerContainer interfaces,
@ -632,7 +634,7 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
}
widgetInit.clipChildren = PR_FALSE;
widgetInit.mBorderStyle = eBorderStyle_3DChildWindow;
widgetInit.mBorderStyle = aIsSunkenBorder ? eBorderStyle_3DChildWindow : eBorderStyle_none;
mWindow->Create(aNativeParent, aBounds, nsWebShell::HandleEvent,
mDeviceContext, nsnull, nsnull, &widgetInit);