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
);
46 nsWeakPtr mSession
; // Should never be touched by Clone or Assign
48 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
51 nsIntMargin mUnwriteableMargin
;
53 int32_t mPrintOptions
;
55 // scriptable data members
57 int32_t mStartPageNum
; // only used for ePrintRange_SpecifiedRange
60 bool mPrintBGColors
; // print background colors
61 bool mPrintBGImages
; // print background images
63 int16_t mPrintFrameTypeUsage
;
64 int16_t mPrintFrameType
;
65 int16_t mHowToEnableFrameUI
;
70 bool mShowPrintProgress
;
71 int32_t mPrintPageDelay
;
75 nsString mPageNumberFormat
;
76 nsString mHeaderStrs
[NUM_HEAD_FOOT
];
77 nsString mFooterStrs
[NUM_HEAD_FOOT
];
83 int16_t mPaperSizeUnit
;
86 bool mPrintInColor
; // a false means grayscale
87 int32_t mOrientation
; // see orientation consts
94 int16_t mOutputFormat
;
95 bool mIsInitedFromPrinter
;
96 bool mIsInitedFromPrefs
;
99 #endif /* nsPrintSettings_h__ */