1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications, Inc.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
24 * Travis Bogard <travis@netscape.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #ifndef nsPrintSettingsImpl_h__
41 #define nsPrintSettingsImpl_h__
44 #include "nsIPrintSettings.h"
47 #include "nsWeakReference.h"
49 #define NUM_HEAD_FOOT 3
51 //*****************************************************************************
53 //*****************************************************************************
55 class nsPrintSettings
: public nsIPrintSettings
59 NS_DECL_NSIPRINTSETTINGS
62 nsPrintSettings(const nsPrintSettings
& aPS
);
63 virtual ~nsPrintSettings();
65 virtual nsPrintSettings
& operator=(const nsPrintSettings
& rhs
);
68 // May be implemented by the platform-specific derived class
69 virtual nsresult
_Clone(nsIPrintSettings
**_retval
);
70 virtual nsresult
_Assign(nsIPrintSettings
*aPS
);
78 nsresult
GetMarginStrs(PRUnichar
* *aTitle
, nsHeaderFooterEnum aType
, PRInt16 aJust
);
79 nsresult
SetMarginStrs(const PRUnichar
* aTitle
, nsHeaderFooterEnum aType
, PRInt16 aJust
);
82 nsWeakPtr mSession
; // Should never be touched by Clone or Assign
84 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
87 nsMargin mUnwriteableMargin
;
89 PRInt32 mPrintOptions
;
91 // scriptable data members
93 PRInt32 mStartPageNum
; // only used for ePrintRange_SpecifiedRange
96 PRBool mPrintBGColors
; // print background colors
97 PRBool mPrintBGImages
; // print background images
99 PRInt16 mPrintFrameTypeUsage
;
100 PRInt16 mPrintFrameType
;
101 PRBool mHowToEnableFrameUI
;
104 PRBool mPrintPreview
;
106 PRBool mShowPrintProgress
;
107 PRInt32 mPrintPageDelay
;
111 nsString mPageNumberFormat
;
112 nsString mHeaderStrs
[NUM_HEAD_FOOT
];
113 nsString mFooterStrs
[NUM_HEAD_FOOT
];
118 PRInt16 mPaperSizeType
;
121 PRInt16 mPaperSizeUnit
;
123 PRBool mPrintReversed
;
124 PRBool mPrintInColor
; // a false means grayscale
125 PRInt32 mOrientation
; // see orientation consts
126 nsString mColorspace
;
127 nsString mResolutionName
;
128 PRBool mDownloadFonts
;
129 nsString mPrintCommand
;
131 nsXPIDLString mPrinter
;
133 nsString mToFileName
;
134 PRInt16 mOutputFormat
;
135 PRPackedBool mIsInitedFromPrinter
;
136 PRPackedBool mIsInitedFromPrefs
;
140 #endif /* nsPrintSettings_h__ */