Add copy of .ttf font with .eot extension for testing
[wine-gecko.git] / widget / src / xpwidgets / nsPrintSettingsImpl.h
blobed9805a0d1d6f454dd6cf48cea4f04a9df8f6516
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
14 * License.
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.
23 * Contributor(s):
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__
43 #include "gfxCore.h"
44 #include "nsIPrintSettings.h"
45 #include "nsMargin.h"
46 #include "nsString.h"
47 #include "nsWeakReference.h"
49 #define NUM_HEAD_FOOT 3
51 //*****************************************************************************
52 //*** nsPrintSettings
53 //*****************************************************************************
55 class nsPrintSettings : public nsIPrintSettings
57 public:
58 NS_DECL_ISUPPORTS
59 NS_DECL_NSIPRINTSETTINGS
61 nsPrintSettings();
62 nsPrintSettings(const nsPrintSettings& aPS);
63 virtual ~nsPrintSettings();
65 virtual nsPrintSettings& operator=(const nsPrintSettings& rhs);
67 protected:
68 // May be implemented by the platform-specific derived class
69 virtual nsresult _Clone(nsIPrintSettings **_retval);
70 virtual nsresult _Assign(nsIPrintSettings *aPS);
72 typedef enum {
73 eHeader,
74 eFooter
75 } nsHeaderFooterEnum;
78 nsresult GetMarginStrs(PRUnichar * *aTitle, nsHeaderFooterEnum aType, PRInt16 aJust);
79 nsresult SetMarginStrs(const PRUnichar * aTitle, nsHeaderFooterEnum aType, PRInt16 aJust);
81 // Members
82 nsWeakPtr mSession; // Should never be touched by Clone or Assign
84 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
85 nsMargin mMargin;
86 nsMargin mEdge;
87 nsMargin mUnwriteableMargin;
89 PRInt32 mPrintOptions;
91 // scriptable data members
92 PRInt16 mPrintRange;
93 PRInt32 mStartPageNum; // only used for ePrintRange_SpecifiedRange
94 PRInt32 mEndPageNum;
95 double mScaling;
96 PRBool mPrintBGColors; // print background colors
97 PRBool mPrintBGImages; // print background images
99 PRInt16 mPrintFrameTypeUsage;
100 PRInt16 mPrintFrameType;
101 PRBool mHowToEnableFrameUI;
102 PRBool mIsCancelled;
103 PRBool mPrintSilent;
104 PRBool mPrintPreview;
105 PRBool mShrinkToFit;
106 PRBool mShowPrintProgress;
107 PRInt32 mPrintPageDelay;
109 nsString mTitle;
110 nsString mURL;
111 nsString mPageNumberFormat;
112 nsString mHeaderStrs[NUM_HEAD_FOOT];
113 nsString mFooterStrs[NUM_HEAD_FOOT];
115 nsString mPaperName;
116 nsString mPlexName;
117 PRInt16 mPaperData;
118 PRInt16 mPaperSizeType;
119 double mPaperWidth;
120 double mPaperHeight;
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;
130 PRInt32 mNumCopies;
131 nsXPIDLString mPrinter;
132 PRBool mPrintToFile;
133 nsString mToFileName;
134 PRInt16 mOutputFormat;
135 PRPackedBool mIsInitedFromPrinter;
136 PRPackedBool mIsInitedFromPrefs;
140 #endif /* nsPrintSettings_h__ */