nsIWebBrowserPrint

IID:9A7CA4B0-FBBA-11d4-A869-00105A183419
Inherits From:nsISupports
Status:FROZEN

nsIWebBrowserPrint corresponds to the main interface for printing an embedded Gecko web browser window/document


Constants

PrintPreview Navigation Constants
PRInt16 PRINTPREVIEW_GOTO_PAGENUM = 0
PRInt16 PRINTPREVIEW_PREV_PAGE = 1
PRInt16 PRINTPREVIEW_NEXT_PAGE = 2
PRInt16 PRINTPREVIEW_HOME = 3
PRInt16 PRINTPREVIEW_END = 4

Properties

readonly nsIDOMWindow currentChildDOMWindow

Returns a pointer to the current child DOMWindow that is being print previewed. (FrameSet Frames)

Returns null if parent document is not a frameset or the entire FrameSet document is being print previewed

This enables any consumers of the interface to have access to the "current" child DOMWindow at later points in the execution

readonly nsIPrintSettings currentPrintSettings

Returns a pointer to the PrintSettings object that that was passed into either "print" or "print preview"

This enables any consumers of the interface to have access to the "current" PrintSetting at later points in the execution

readonly PRBool doingPrint

Returns whether it is in Print mode

readonly PRBool doingPrintPreview

Returns whether it is in Print Preview mode

readonly nsIPrintSettings globalPrintSettings

Returns a "global" PrintSettings object Creates a new the first time, if one doesn't exist.

Then returns the same object each time after that.

Initializes the globalPrintSettings from the default printer

readonly PRBool isFramesetDocument

This returns whether the current document is a frameset document

readonly PRBool isFramesetFrameSelected

This returns whether the current document is a frameset document

readonly PRBool isIFrameSelected

This returns whether there is an IFrame selected

readonly PRBool isRangeSelection

This returns whether there is a "range" selection

readonly PRInt32 printPreviewNumPages

This returns the total number of pages for the Print Preview


Methods

void cancel ( ) void enumerateDocumentNames ( out PRUint32 count , out arrayof PRUnichar* result ) void exitPrintPreview ( ) void print ( nsIPrintSettings thePrintSettings , nsIWebProgressListener WPListener ) void printPreview ( nsIPrintSettings thePrintSettings , nsIDOMWindow childDOMWin , nsIWebProgressListener WPListener ) void printPreviewNavigate ( PRInt16 navType , PRInt32 pageNum )

void cancel ( )

Cancels the current print

Returns:
void

void enumerateDocumentNames ( out PRUint32 count , out arrayof PRUnichar* result )

Returns an array of the names of all documents names (Title or URL) and sub-documents. This will return a single item if the attr "isFramesetDocument" is false and may return any number of items is "isFramesetDocument" is true

Arguments:
count: - returns number of printers returned
result: - returns array of names
Returns:
void

void exitPrintPreview ( )

This exists PrintPreview mode and returns browser window to galley mode

Returns:
void

void print ( nsIPrintSettings thePrintSettings , nsIWebProgressListener WPListener )

Print the specified DOM window

Arguments:
thePrintSettings: - Printer Settings for the print job, if thePrintSettings is null then the global PS will be used.
WPListener: - is updated during the print
Returns:
void

void printPreview ( nsIPrintSettings thePrintSettings , nsIDOMWindow childDOMWin , nsIWebProgressListener WPListener )

Print Preview the specified DOM window

Arguments:
thePrintSettings: - Printer Settings for the print preview, if thePrintSettings is null then the global PS will be used.
childDOMWin: - DOM Window of the child document to be PP (FrameSet frames)
WPListener: - is updated during the printpreview
Returns:
void

void printPreviewNavigate ( PRInt16 navType , PRInt32 pageNum )

Print Preview - Navigates within the window

Arguments:
navType: - navigation enum
pageNum: - page num to navigate to when navType = ePrintPreviewGoToPageNum
Returns:
void

References

This interface is the type of the following properties:

nsIMsgPrintEngine.webBrowserPrint

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

nsIPrintingPrompt.showPrintDialog, nsIPrintingPrompt.showProgress, nsIPrintingPromptService.showPrintDialog, nsIPrintingPromptService.showProgress

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com