Back to index

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

#include <nsDeviceContextSpecFactoryX.h>

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

List of all members.

Public Member Functions

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

virtual ~nsDeviceContextSpecFactoryXlib ()

Detailed Description

Definition at line 44 of file nsDeviceContextSpecFactoryX.h.


Constructor & Destructor Documentation

Definition at line 47 of file nsDeviceContextSpecFactoryX.cpp.

{
}

Definition at line 51 of file nsDeviceContextSpecFactoryX.cpp.

{
}

Member Function Documentation

NS_IMETHODIMP nsDeviceContextSpecFactoryXlib::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 60 of file nsDeviceContextSpecFactoryX.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 = ((nsDeviceContextSpecXlib *)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 55 of file nsDeviceContextSpecFactoryX.cpp.

{
  return NS_OK;
}

Here is the caller graph for this function:


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