Bug 1073336 part 5 - Add AnimationPlayerCollection::PlayerUpdated; r=dbaron
[gecko.git] / widget / nsPrintSettingsImpl.h
blobe1a08dac3453877c9d1643fd893d88982556b9e5
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 "gfxCore.h"
11 #include "nsIPrintSettings.h"
12 #include "nsMargin.h"
13 #include "nsString.h"
14 #include "nsWeakReference.h"
16 #define NUM_HEAD_FOOT 3
18 //*****************************************************************************
19 //*** nsPrintSettings
20 //*****************************************************************************
22 class nsPrintSettings : public nsIPrintSettings
24 public:
25 NS_DECL_ISUPPORTS
26 NS_DECL_NSIPRINTSETTINGS
28 nsPrintSettings();
29 nsPrintSettings(const nsPrintSettings& aPS);
31 nsPrintSettings& operator=(const nsPrintSettings& rhs);
33 protected:
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);
40 typedef enum {
41 eHeader,
42 eFooter
43 } nsHeaderFooterEnum;
46 nsresult GetMarginStrs(char16_t * *aTitle, nsHeaderFooterEnum aType, int16_t aJust);
47 nsresult SetMarginStrs(const char16_t * aTitle, nsHeaderFooterEnum aType, int16_t aJust);
49 // Members
50 nsWeakPtr mSession; // Should never be touched by Clone or Assign
52 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
53 nsIntMargin mMargin;
54 nsIntMargin mEdge;
55 nsIntMargin mUnwriteableMargin;
57 int32_t mPrintOptions;
59 // scriptable data members
60 int16_t mPrintRange;
61 int32_t mStartPageNum; // only used for ePrintRange_SpecifiedRange
62 int32_t mEndPageNum;
63 double mScaling;
64 bool mPrintBGColors; // print background colors
65 bool mPrintBGImages; // print background images
67 int16_t mPrintFrameTypeUsage;
68 int16_t mPrintFrameType;
69 int16_t mHowToEnableFrameUI;
70 bool mIsCancelled;
71 bool mPrintSilent;
72 bool mPrintPreview;
73 bool mShrinkToFit;
74 bool mShowPrintProgress;
75 int32_t mPrintPageDelay;
77 nsString mTitle;
78 nsString mURL;
79 nsString mPageNumberFormat;
80 nsString mHeaderStrs[NUM_HEAD_FOOT];
81 nsString mFooterStrs[NUM_HEAD_FOOT];
83 nsString mPaperName;
84 nsString mPlexName;
85 int16_t mPaperData;
86 int16_t mPaperSizeType;
87 double mPaperWidth;
88 double mPaperHeight;
89 int16_t mPaperSizeUnit;
91 bool mPrintReversed;
92 bool mPrintInColor; // a false means grayscale
93 int32_t mOrientation; // see orientation consts
94 nsString mColorspace;
95 nsString mResolutionName;
96 int32_t mResolution;
97 int32_t mDuplex;
98 bool mDownloadFonts;
99 nsString mPrintCommand;
100 int32_t mNumCopies;
101 nsXPIDLString mPrinter;
102 bool mPrintToFile;
103 nsString mToFileName;
104 int16_t mOutputFormat;
105 bool mIsInitedFromPrinter;
106 bool mIsInitedFromPrefs;
107 bool mPersistMarginBoxSettings;
110 #endif /* nsPrintSettings_h__ */