Bug 1376625 - Updating meta data for newly added tests r=ato
[gecko.git] / widget / nsPrintSettingsImpl.h
blob8e344d06fdfc1c94da55fe7b32ce0dcaa9dbbce3
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"
11 #include "nsMargin.h"
12 #include "nsString.h"
13 #include "nsWeakReference.h"
15 #define NUM_HEAD_FOOT 3
17 //*****************************************************************************
18 //*** nsPrintSettings
19 //*****************************************************************************
21 class nsPrintSettings : public nsIPrintSettings
23 public:
24 NS_DECL_ISUPPORTS
25 NS_DECL_NSIPRINTSETTINGS
27 nsPrintSettings();
28 nsPrintSettings(const nsPrintSettings& aPS);
30 nsPrintSettings& operator=(const nsPrintSettings& rhs);
32 protected:
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);
39 typedef enum {
40 eHeader,
41 eFooter
42 } nsHeaderFooterEnum;
45 nsresult GetMarginStrs(char16_t * *aTitle, nsHeaderFooterEnum aType, int16_t aJust);
46 nsresult SetMarginStrs(const char16_t * aTitle, nsHeaderFooterEnum aType, int16_t aJust);
48 // Members
49 nsWeakPtr mSession; // Should never be touched by Clone or Assign
51 // mMargin, mEdge, and mUnwriteableMargin are stored in twips
52 nsIntMargin mMargin;
53 nsIntMargin mEdge;
54 nsIntMargin mUnwriteableMargin;
56 int32_t mPrintOptions;
58 // scriptable data members
59 int16_t mPrintRange;
60 int32_t mStartPageNum; // only used for ePrintRange_SpecifiedRange
61 int32_t mEndPageNum;
62 double mScaling;
63 bool mPrintBGColors; // print background colors
64 bool mPrintBGImages; // print background images
66 int16_t mPrintFrameTypeUsage;
67 int16_t mPrintFrameType;
68 int16_t mHowToEnableFrameUI;
69 bool mIsCancelled;
70 bool mPrintSilent;
71 bool mPrintPreview;
72 bool mShrinkToFit;
73 bool mShowPrintProgress;
74 int32_t mPrintPageDelay;
76 nsString mTitle;
77 nsString mURL;
78 nsString mPageNumberFormat;
79 nsString mHeaderStrs[NUM_HEAD_FOOT];
80 nsString mFooterStrs[NUM_HEAD_FOOT];
82 nsString mPaperName;
83 int16_t mPaperData;
84 double mPaperWidth;
85 double mPaperHeight;
86 int16_t mPaperSizeUnit;
88 bool mPrintReversed;
89 bool mPrintInColor; // a false means grayscale
90 int32_t mOrientation; // see orientation consts
91 int32_t mResolution;
92 int32_t mDuplex;
93 int32_t mNumCopies;
94 nsString mPrinter;
95 bool mPrintToFile;
96 nsString mToFileName;
97 int16_t mOutputFormat;
98 bool mIsInitedFromPrinter;
99 bool mIsInitedFromPrefs;
102 #endif /* nsPrintSettings_h__ */