reimplement window scrollbar chrome attribute. oh and revert the damn nonstandard indentation tbogard snuck in in rev 1.5. bug 111524 r=hyatt,jst

git-svn-id: svn://10.0.0.236/trunk@114616 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com
2002-02-16 01:15:57 +00:00
parent 09bc815c72
commit 8f9244cc3a

View File

@@ -48,79 +48,94 @@
#include "nscore.h"
#include "nsIScriptContext.h"
#include "nsIDOMBarProp.h"
#include "nsIWeakReference.h"
class GlobalWindowImpl;
class nsIWebBrowserChrome;
// Script "BarProp" object
class BarPropImpl : public nsIDOMBarProp {
public:
BarPropImpl();
virtual ~BarPropImpl();
BarPropImpl();
virtual ~BarPropImpl();
NS_DECL_ISUPPORTS
NS_DECL_ISUPPORTS
NS_IMETHOD SetWebBrowserChrome(nsIWebBrowserChrome* aBrowserChrome);
NS_IMETHOD SetWebBrowserChrome(nsIWebBrowserChrome* aBrowserChrome);
NS_IMETHOD GetVisibleByFlag(PRBool *aVisible, PRUint32 aChromeFlag);
NS_IMETHOD SetVisibleByFlag(PRBool aVisible, PRUint32 aChromeFlag);
NS_IMETHOD GetVisibleByFlag(PRBool *aVisible, PRUint32 aChromeFlag);
NS_IMETHOD SetVisibleByFlag(PRBool aVisible, PRUint32 aChromeFlag);
protected:
// Weak Reference
nsIWebBrowserChrome* mBrowserChrome;
// Weak Reference
nsIWebBrowserChrome* mBrowserChrome;
};
// Script "menubar" object
class MenubarPropImpl : public BarPropImpl {
public:
MenubarPropImpl();
virtual ~MenubarPropImpl();
MenubarPropImpl();
virtual ~MenubarPropImpl();
NS_DECL_NSIDOMBARPROP
NS_DECL_NSIDOMBARPROP
};
// Script "toolbar" object
class ToolbarPropImpl : public BarPropImpl {
public:
ToolbarPropImpl();
virtual ~ToolbarPropImpl();
ToolbarPropImpl();
virtual ~ToolbarPropImpl();
NS_DECL_NSIDOMBARPROP
NS_DECL_NSIDOMBARPROP
};
// Script "locationbar" object
class LocationbarPropImpl : public BarPropImpl {
public:
LocationbarPropImpl();
virtual ~LocationbarPropImpl();
LocationbarPropImpl();
virtual ~LocationbarPropImpl();
NS_DECL_NSIDOMBARPROP
NS_DECL_NSIDOMBARPROP
};
// Script "personalbar" object
class PersonalbarPropImpl : public BarPropImpl {
public:
PersonalbarPropImpl();
virtual ~PersonalbarPropImpl();
PersonalbarPropImpl();
virtual ~PersonalbarPropImpl();
NS_DECL_NSIDOMBARPROP
NS_DECL_NSIDOMBARPROP
};
// Script "statusbar" object
class StatusbarPropImpl : public BarPropImpl {
public:
StatusbarPropImpl();
virtual ~StatusbarPropImpl();
StatusbarPropImpl();
virtual ~StatusbarPropImpl();
NS_DECL_NSIDOMBARPROP
NS_DECL_NSIDOMBARPROP
};
// Script "scrollbars" object
class ScrollbarsPropImpl : public BarPropImpl {
public:
ScrollbarsPropImpl();
virtual ~ScrollbarsPropImpl();
ScrollbarsPropImpl(GlobalWindowImpl *aWindow);
virtual ~ScrollbarsPropImpl();
NS_DECL_NSIDOMBARPROP
NS_DECL_NSIDOMBARPROP
private:
GlobalWindowImpl *mDOMWindow;
nsCOMPtr<nsIWeakReference> mDOMWindowWeakref;
/* Note the odd double reference to the owning global window.
Since the corresponding DOM window nominally owns this object,
yet refcounted ownership of this object can be handed off to
owners unknown, we need a weak ref to back to the DOM window.
However we also need access to properties of the DOM Window
that aren't available through interfaces. Then it's either
a weak ref and some skanky casting, or this funky double ref.
Funky beats skanky, so here we are. */
};
#endif /* nsBarProps_h___ */