1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPrintSettingsImpl_h__
8 #define nsPrintSettingsImpl_h__
10 #include "nsIPrintSettings.h"
13 #include "nsWeakReference.h"
15 #define NUM_HEAD_FOOT 3
17 //*****************************************************************************
19 //*****************************************************************************
21 class nsPrintSettings
: public nsIPrintSettings
25 NS_DECL_NSIPRINTSETTINGS
28 nsPrintSettings(const nsPrintSettings
& aPS
);
30 nsPrintSettings
& operator=(const nsPrintSettings
& rhs
);
33 virtual ~nsPrintSettings();
35 // May be implemented by the platform-specific derived class
36 virtual nsresult
_Clone(nsIPrintSettings
**_retval
);
37 virtual nsresult
_Assign(nsIPrintSettings
*aPS
);
45 nsresult
GetMarginStrs(char16_t
* *aTitle
, nsHeaderFooterEnum aType
, int16_t aJust
);
46 nsresult
SetMarginStrs(const char16_t
* aTitle
, nsHeaderFooterEnum aType
, int16_t aJust
);
49 nsWeakPtr mSession
; // Should never be touched by Clone or Assign
51 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
54 nsIntMargin mUnwriteableMargin
;
56 int32_t mPrintOptions
;
58 // scriptable data members
60 int32_t mStartPageNum
; // only used for ePrintRange_SpecifiedRange
63 bool mPrintBGColors
; // print background colors
64 bool mPrintBGImages
; // print background images
66 int16_t mPrintFrameTypeUsage
;
67 int16_t mPrintFrameType
;
68 int16_t mHowToEnableFrameUI
;
73 bool mShowPrintProgress
;
74 int32_t mPrintPageDelay
;
78 nsString mPageNumberFormat
;
79 nsString mHeaderStrs
[NUM_HEAD_FOOT
];
80 nsString mFooterStrs
[NUM_HEAD_FOOT
];
86 int16_t mPaperSizeUnit
;
89 bool mPrintInColor
; // a false means grayscale
90 int32_t mOrientation
; // see orientation consts
97 int16_t mOutputFormat
;
98 bool mIsInitedFromPrinter
;
99 bool mIsInitedFromPrefs
;
102 #endif /* nsPrintSettings_h__ */