Back to index

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

#include <nsDeviceContextSpecFactoryW.h>

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

List of all members.

Public Member Functions

 nsDeviceContextSpecFactoryWin ()
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

 ~nsDeviceContextSpecFactoryWin ()

Detailed Description

Definition at line 46 of file nsDeviceContextSpecFactoryW.h.


Constructor & Destructor Documentation

Definition at line 42 of file nsDeviceContextSpecFactoryW.cpp.

{
}

Definition at line 46 of file nsDeviceContextSpecFactoryW.cpp.

{
}

Member Function Documentation

NS_IMETHODIMP nsDeviceContextSpecFactoryWin::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 63 of file nsDeviceContextSpecFactoryW.cpp.

{
  NS_ENSURE_ARG_POINTER(aWidget);

  nsresult rv = NS_ERROR_FAILURE;
  nsIDeviceContextSpec* devspec = nsnull;

  CallCreateInstance(kDeviceContextSpecCID, &devspec);

  if (nsnull != devspec){
    nsDeviceContextSpecWin* specWin = NS_STATIC_CAST(nsDeviceContextSpecWin*, devspec);
    rv = specWin->Init(aWidget, aPrintSettings, aIsPrintPreview);
    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 56 of file nsDeviceContextSpecFactoryW.cpp.

{
  return NS_OK;
}

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