nsISupports
Last changed in Gecko 1.7 This interface is identical to nsIPintingPromptService
but without the parent nsIDOMWindow
parameter. See nsIPrintingPromptService
for all documentation.
This service enables embedders to implement their own Print and Progress Dialogs. Each platform has a "base" or "backstop" implementation of the service. The service is automatically registered at start up.
Historically, platform toolkits with native dialogs have implemented them in the GFX layer Usually they were displayed when a new DeviceContextSpec
specific to that platform was created.
The GFX layer no longer supports default toolkit behavior for displaying the native Print Dialog. If an embedder implemented service returns any error code (other than NS_ERROR_ABORT
) printing will terminate.
Returning NS_OK
assumes that the PrintSettings
object was correctly filled in and if it does not have valid fields for printer name, and so on. it may also terminate.
Defaults for platform service:
showPrintDialog
- displays a native dialogshowPageSetup()
- displays a XUL dialogshowProgress()
- displays a XUL dialogSummary for Windows embedders:
nsIWebBrowserPrint
's Print method. If you stub out this service you MUST set "printSilent" to true
, if you do not, Printing will terminate and an error dialog will be displayed.The GFX layer still supports default toolkit behavior for displaying the Print Dialog. If an embedder implemented service returns NS_ERROR_NOT_IMPLEMENTED for "showPrintDialog
" The toolkit will display the native print dialog.
Defaults for platform service:
Mac OS X:
showPrintDialog
- displays a native dialogshowPageSetup()
- displays a native dialogshowProgress()
- not implemented (provided by OS)There are no native dialogs for GTK.
Defaults for platform service:
showPrintDialog
- displays a native dialogshowPageSetup()
- displays a native dialogshowProgress()
- displays a XUL dialogvoid showPageSetup(in nsIPrintSettings printSettings, in nsIObserver aObs); |
void showPrintDialog(in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings); |
void showProgress(in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen); |
Shows the print progress dialog.
void showPageSetup( in nsIPrintSettings printSettings, in nsIObserver aObs );
printSettings
aObs Optional
Show the Print Dialog.
void showPrintDialog( in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings );
webBrowserPrint
printSettings
Shows the print progress dialog.
void showProgress( in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen );
webBrowserPrint
printSettings
openDialogObserver
isForPrinting
true
- for printing, false
for print preview.webProgressListener
printProgressParams
notifyOnOpen
false
is returned it means the observer (usually the caller) shouldn't wait For Print Preview Progress there is intermediate progress.