Back to index

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

#include <nsDeviceContextSpecFactoryO.h>

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

List of all members.

Public Member Functions

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

Protected Member Functions

 ~nsDeviceContextSpecFactoryOS2 ()

Detailed Description

Definition at line 45 of file nsDeviceContextSpecFactoryO.h.


Constructor & Destructor Documentation

Definition at line 44 of file nsDeviceContextSpecFactoryO.cpp.

{
}

Definition at line 48 of file nsDeviceContextSpecFactoryO.cpp.

{
}

Member Function Documentation

NS_IMETHODIMP nsDeviceContextSpecFactoryOS2::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 61 of file nsDeviceContextSpecFactoryO.cpp.

{
     nsresult rv;
     static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
     nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID, &rv);

       if (NS_SUCCEEDED(rv)) {
         rv = ((nsDeviceContextSpecOS2 *)devSpec.get())->Init(aPrintSettings, aIsPrintPreview);
       if (NS_SUCCEEDED(rv)) {
           aNewSpec = devSpec;
         NS_ADDREF(aNewSpec);
         }
       }
       return rv;
}

Here is the call graph for this function:

Initialize the device context spec factory.

Returns:
error status

Implements nsIDeviceContextSpecFactory.

Definition at line 54 of file nsDeviceContextSpecFactoryO.cpp.

{
  return NS_OK;
}

Here is the caller graph for this function:


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