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__
11 #include "nsIPrintSettings.h"
14 #include "nsWeakReference.h"
16 #define NUM_HEAD_FOOT 3
18 //*****************************************************************************
20 //*****************************************************************************
22 class nsPrintSettings
: public nsIPrintSettings
26 NS_DECL_NSIPRINTSETTINGS
29 nsPrintSettings(const nsPrintSettings
& aPS
);
31 nsPrintSettings
& operator=(const nsPrintSettings
& rhs
);
34 virtual ~nsPrintSettings();
36 // May be implemented by the platform-specific derived class
37 virtual nsresult
_Clone(nsIPrintSettings
**_retval
);
38 virtual nsresult
_Assign(nsIPrintSettings
*aPS
);
46 nsresult
GetMarginStrs(char16_t
* *aTitle
, nsHeaderFooterEnum aType
, int16_t aJust
);
47 nsresult
SetMarginStrs(const char16_t
* aTitle
, nsHeaderFooterEnum aType
, int16_t aJust
);
50 nsWeakPtr mSession
; // Should never be touched by Clone or Assign
52 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
55 nsIntMargin mUnwriteableMargin
;
57 int32_t mPrintOptions
;
59 // scriptable data members
61 int32_t mStartPageNum
; // only used for ePrintRange_SpecifiedRange
64 bool mPrintBGColors
; // print background colors
65 bool mPrintBGImages
; // print background images
67 int16_t mPrintFrameTypeUsage
;
68 int16_t mPrintFrameType
;
69 int16_t mHowToEnableFrameUI
;
74 bool mShowPrintProgress
;
75 int32_t mPrintPageDelay
;
79 nsString mPageNumberFormat
;
80 nsString mHeaderStrs
[NUM_HEAD_FOOT
];
81 nsString mFooterStrs
[NUM_HEAD_FOOT
];
86 int16_t mPaperSizeType
;
89 int16_t mPaperSizeUnit
;
92 bool mPrintInColor
; // a false means grayscale
93 int32_t mOrientation
; // see orientation consts
95 nsString mResolutionName
;
99 nsString mPrintCommand
;
101 nsXPIDLString mPrinter
;
103 nsString mToFileName
;
104 int16_t mOutputFormat
;
105 bool mIsInitedFromPrinter
;
106 bool mIsInitedFromPrefs
;
107 bool mPersistMarginBoxSettings
;
110 #endif /* nsPrintSettings_h__ */