Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions
nsDeviceContextSpecFactoryPh Class Reference

#include <nsDeviceContextSpecFactoryP.h>

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

List of all members.

Public Member Functions

 nsDeviceContextSpecFactoryPh ()
NS_DECL_ISUPPORTS NS_IMETHOD Init (void)
 Initialize the device context spec factory.
NS_IMETHOD CreateDeviceContextSpec (nsIWidget *aWidget, nsIPrintSettings *aPrintSettings, nsIDeviceContextSpec *&aNewSpec, PRBool aQuiet)
 Get a device context specification.

Protected Member Functions

virtual ~nsDeviceContextSpecFactoryPh ()

Detailed Description

Definition at line 44 of file nsDeviceContextSpecFactoryP.h.


Constructor & Destructor Documentation

Definition at line 49 of file nsDeviceContextSpecFactoryP.cpp.

{
}

Definition at line 53 of file nsDeviceContextSpecFactoryP.cpp.

{
}

Member Function Documentation

NS_IMETHODIMP nsDeviceContextSpecFactoryPh::CreateDeviceContextSpec ( nsIWidget aWidget,
nsIPrintSettings aPrintSettings,
nsIDeviceContextSpec *&  aNewSpec,
PRBool  aIsPrintPreview 
) [virtual]

Get a device context specification.

Typically, this means getting information about a printer. A previously returned device context spec can be passed in and used as a starting point for getting a new spec (or simply returning the old spec again).

Parameters:
aWidget..this is a widget a dialog can be hosted in
aNewSpecout parameter for device context spec returned. the aOldSpec may be returned if the object is recyclable.
aIsPrintPreviewif PR_TRUE, creating Spec for PrintPreview
Returns:
error status

Implements nsIDeviceContextSpecFactory.

Definition at line 69 of file nsDeviceContextSpecFactoryP.cpp.

{
       NS_ENSURE_ARG_POINTER(aWidget);

       nsresult  rv = NS_ERROR_FAILURE;
       nsIDeviceContextSpec  *devSpec = nsnull;

       CallCreateInstance(kDeviceContextSpecCID, &devSpec);

       if (devSpec != nsnull)
       {
              nsDeviceContextSpecPh* specPh = NS_STATIC_CAST(nsDeviceContextSpecPh*, devSpec);
              rv = specPh->Init(aWidget, aPrintSettings, aQuiet);
              if (NS_SUCCEEDED(rv)) {
                     aNewSpec = devSpec;
              } else {
              NS_RELEASE(devSpec);
              }
       }

       return rv;
}

Here is the call graph for this function:

Initialize the device context spec factory.

Returns:
error status

Implements nsIDeviceContextSpecFactory.

Definition at line 62 of file nsDeviceContextSpecFactoryP.cpp.

{
  return NS_OK;
}

The documentation for this class was generated from the following files: