layout/base/src/nsPrintContext.cpp,3.12 | . | Disk File |
Skipping to line 40 | . | |
#include "nsUnitConversion.h" |
. |
#include "nsUnitConversion.h" |
#include "nsIView.h" |
. |
#include "nsIView.h" |
#include "nsIWidget.h" |
. |
#include "nsIWidget.h" |
#include "nsGfxCIID.h" |
. |
#include "nsGfxCIID.h" |
#include "nsLayoutAtoms.h" |
. |
#include "nsLayoutAtoms.h" |
  |
. |
#include "nsIPrintSettings.h" |
|
. |
|
|
. |
|
class PrintContext : public nsPresContext , nsIPrintContext{ |
. |
class PrintContext : public nsPresContext , nsIPrintContext{ |
public: |
. |
public: |
//NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRINTCONTEXT_IID) |
. |
//NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRINTCONTEXT_IID) |
Skipping to line 63 | . | |
NS_IMETHOD IsPaginated(PRBool* aResult); |
. |
NS_IMETHOD IsPaginated(PRBool* aResult); |
NS_IMETHOD SetPaginatedScrolling(PRBool aResult) { return NS_ERROR_FAILURE;
} |
. |
NS_IMETHOD SetPaginatedScrolling(PRBool aResult) { return NS_ERROR_FAILURE;
} |
NS_IMETHOD GetPaginatedScrolling(PRBool* aResult); |
. |
NS_IMETHOD GetPaginatedScrolling(PRBool* aResult); |
NS_IMETHOD GetPageDim(nsRect* aActualRect, nsRect* aAdjRect); |
. |
NS_IMETHOD GetPageDim(nsRect* aActualRect, nsRect* aAdjRect); |
NS_IMETHOD SetPageDim(nsRect* aRect); |
. |
NS_IMETHOD SetPageDim(nsRect* aRect); |
  |
. |
NS_IMETHOD SetPrintSettings(nsIPrintSettings* aPS); |
  |
. |
NS_IMETHOD GetPrintSettings(nsIPrintSettings** aPS); |
  |
. |
|
protected: |
. |
protected: |
nsRect mPageDim; |
. |
nsRect mPageDim; |
  |
. |
nsCOMPtr<nsIPrintSettings> mPrintSettings; |
}; |
. |
}; |
|
. |
|
PrintContext::PrintContext() : |
. |
PrintContext::PrintContext() : |
mPageDim(0,0,0,0) |
. |
mPageDim(0,0,0,0) |
{ |
. |
{ |
Skipping to line 151 | . | |
NS_IMETHODIMP |
. |
NS_IMETHODIMP |
PrintContext::SetPageDim(nsRect* aPageDim) |
. |
PrintContext::SetPageDim(nsRect* aPageDim) |
{ |
. |
{ |
NS_ENSURE_ARG_POINTER(aPageDim); |
. |
NS_ENSURE_ARG_POINTER(aPageDim); |
mPageDim = *aPageDim; |
. |
mPageDim = *aPageDim; |
  |
. |
return NS_OK; |
  |
. |
} |
  |
. |
|
  |
. |
NS_IMETHODIMP |
  |
. |
PrintContext::SetPrintSettings(nsIPrintSettings * aPrintSettings) |
  |
. |
{ |
  |
. |
NS_ENSURE_ARG_POINTER(aPrintSettings); |
  |
. |
mPrintSettings = aPrintSettings; |
  |
. |
return NS_OK; |
  |
. |
} |
  |
. |
|
  |
. |
NS_IMETHODIMP |
  |
. |
PrintContext::GetPrintSettings(nsIPrintSettings * *aPrintSettings) |
  |
. |
{ |
  |
. |
NS_ENSURE_ARG_POINTER(aPrintSettings); |
  |
. |
|
  |
. |
*aPrintSettings = mPrintSettings; |
  |
. |
NS_IF_ADDREF(*aPrintSettings); |
  |
. |
|
return NS_OK; |
. |
return NS_OK; |
} |
. |
} |
|
. |
|
|
. |
|
NS_EXPORT nsresult |
. |
NS_EXPORT nsresult |