Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIPrintSettingsService Interface Reference

import "nsIPrintSettingsService.idl";

Inheritance diagram for nsIPrintSettingsService:
Inheritance graph
[legend]
Collaboration diagram for nsIPrintSettingsService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings)
 Initializes certain settings from the native printer into the PrintSettings if aPrinterName is null then it uses the default printer name if it can These settings include, but are not limited to: Page Orientation Page Size Number of Copies.
void initPrintSettingsFromPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags)
 Reads PrintSettings values from Prefs, the values to be read are indicated by the "flags" arg.
void savePrintSettingsToPrefs (in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags)
 Writes PrintSettings values to Prefs, the values to be written are indicated by the "flags" arg.

Public Attributes

readonly attribute nsIPrintSettings globalPrintSettings
 Returns a "global" PrintSettings object Creates a new the first time, if one doesn't exist.
readonly attribute nsIPrintSettings newPrintSettings
 Returns a new, unique PrintSettings object each time.
readonly attribute wstring defaultPrinterName
 The name of the last printer used, or else the system default printer.

Detailed Description

Definition at line 47 of file nsIPrintSettingsService.idl.


Member Function Documentation

void nsIPrintSettingsService::initPrintSettingsFromPrefs ( in nsIPrintSettings  aPrintSettings,
in boolean  aUsePrinterNamePrefix,
in unsigned long  aFlags 
)

Reads PrintSettings values from Prefs, the values to be read are indicated by the "flags" arg.

aPrintSettings should be initialized with the name of a printer. First it reads in the PrintSettings from the last print job. Then it uses the PrinterName in the PrinterSettings to read any settings that were saved just for that printer.

aPS - PrintSettings to have its settings read aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the const values.

Items not read: startPageRange, endPageRange, scaling, printRange, title docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage printFrameType, printSilent, shrinkToFit, numCopies, printerName

void nsIPrintSettingsService::initPrintSettingsFromPrinter ( in wstring  aPrinterName,
in nsIPrintSettings  aPrintSettings 
)

Initializes certain settings from the native printer into the PrintSettings if aPrinterName is null then it uses the default printer name if it can These settings include, but are not limited to: Page Orientation Page Size Number of Copies.

void nsIPrintSettingsService::savePrintSettingsToPrefs ( in nsIPrintSettings  aPrintSettings,
in boolean  aUsePrinterNamePrefix,
in unsigned long  aFlags 
)

Writes PrintSettings values to Prefs, the values to be written are indicated by the "flags" arg.

If there is no PrinterName in the PrinterSettings the values are saved as the "generic" values not associated with any printer. If a PrinterName is there, then it saves the items qualified for that Printer

aPS - PrintSettings to have its settings saved aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix aFlags - indicates which prefs to save, see nsIPrintSettings.idl for the const values.

Items not written: startPageRange, endPageRange, scaling, printRange, title docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage printFrameType, printSilent, shrinkToFit, numCopies


Member Data Documentation

The name of the last printer used, or else the system default printer.

Definition at line 77 of file nsIPrintSettingsService.idl.

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

Definition at line 57 of file nsIPrintSettingsService.idl.

Returns a new, unique PrintSettings object each time.

For example, if each browser was to have its own unique PrintSettings, then each browser window would call this to create its own unique PrintSettings object.

If each browse window was to use the same PrintSettings object then it should use "globalPrintSettings"

Initializes the newPrintSettings from the default printer

Definition at line 72 of file nsIPrintSettingsService.idl.


The documentation for this interface was generated from the following file: