nsIWebBrowserChrome

IID:BA434C60-9D52-11d3-AFB0-00A024FFC08C
Inherits From:nsISupports
Status:FROZEN

nsIWebBrowserChrome corresponds to the top-level, outermost window containing an embedded Gecko web browser.


Constants

PRUint32 STATUS_SCRIPT = 1
PRUint32 STATUS_SCRIPT_DEFAULT = 2
PRUint32 STATUS_LINK = 3
Definitions for the chrome flags
PRUint32 CHROME_DEFAULT = 1
PRUint32 CHROME_WINDOW_BORDERS = 2
PRUint32 CHROME_WINDOW_CLOSE = 4
PRUint32 CHROME_WINDOW_RESIZE = 8
PRUint32 CHROME_MENUBAR = 16
PRUint32 CHROME_TOOLBAR = 32
PRUint32 CHROME_LOCATIONBAR = 64
PRUint32 CHROME_STATUSBAR = 128
PRUint32 CHROME_PERSONAL_TOOLBAR = 256
PRUint32 CHROME_SCROLLBARS = 512
PRUint32 CHROME_TITLEBAR = 1024
PRUint32 CHROME_EXTRA = 2048
PRUint32 CHROME_WITH_SIZE = 4096
PRUint32 CHROME_WITH_POSITION = 8192
PRUint32 CHROME_WINDOW_MIN = 16384
PRUint32 CHROME_WINDOW_POPUP = 32768
PRUint32 CHROME_WINDOW_RAISED = 33554432
PRUint32 CHROME_WINDOW_LOWERED = 67108864
PRUint32 CHROME_CENTER_SCREEN = 134217728
PRUint32 CHROME_DEPENDENT = 268435456
PRUint32 CHROME_MODAL = 536870912
PRUint32 CHROME_OPENAS_DIALOG = 1073741824
PRUint32 CHROME_OPENAS_CHROME = -2147483648
PRUint32 CHROME_ALL = 4094

Properties

PRUint32 chromeFlags

The chrome flags for this browser chrome. The implementation should reflect the value of this attribute by hiding or showing its chrome appropriately.

nsIWebBrowser webBrowser

The currently loaded WebBrowser. The browser chrome may be told to set the WebBrowser object to a new object by setting this attribute. In this case the implementer is responsible for taking the new WebBrowser object and doing any necessary initialization or setup as if it had created the WebBrowser itself. This includes positioning setting up listeners etc.


Methods

void destroyBrowserWindow ( ) void exitModalEventLoop ( nsresult status ) PRBool isWindowModal ( ) void setStatus ( PRUint32 statusType , PRUnichar* status ) void showAsModal ( ) void sizeBrowserTo ( PRInt32 CX , PRInt32 CY )

void destroyBrowserWindow ( )

Asks the implementer to destroy the window associated with this WebBrowser object.


void exitModalEventLoop ( nsresult status )

Exit a modal event loop if we're in one. The implementation should also exit out of the loop if the window is destroyed.

Arguments:
status: - the result code to return from showAsModal

PRBool isWindowModal ( )

Is the window modal (that is, currently executing a modal loop)?

Returns:
true if it's a modal window

void setStatus ( PRUint32 statusType , PRUnichar* status )

Called when the status text in the chrome needs to be updated.

Arguments:
statusType: indicates what is setting the text
status: status string. null is an acceptable value meaning no status.

void showAsModal ( )

Shows the window as a modal window.

Returns:
(the function error code) the status value specified by in exitModalEventLoop.

void sizeBrowserTo ( PRInt32 CX , PRInt32 CY )

Tells the chrome to size itself such that the browser will be the specified size.

Arguments:
CX: new width of the browser
CY: new height of the browser

References

This interface is the type of the following properties:

nsIWebBrowser.containerWindow

This interface is passed as an argument to the following methods:

nsIWindowCreator.createChromeWindow, nsIWindowCreator2.createChromeWindow2, nsPIWindowWatcher.addWindow

This interface is returned from the following methods:

nsIWindowCreator.createChromeWindow, nsIWindowCreator2.createChromeWindow2, nsIWindowWatcher.getChromeForWindow

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com