Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / layout / printing / nsPrintObject.h
blob00ec739371c80e76456df51ac2d57d157c45156c
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsPrintObject_h___
6 #define nsPrintObject_h___
8 #include "mozilla/Attributes.h"
10 // Interfaces
11 #include "nsCOMPtr.h"
12 #include "nsIPresShell.h"
13 #include "nsStyleSet.h"
14 #include "nsViewManager.h"
15 #include "nsIDocShell.h"
16 #include "nsIDocShellTreeOwner.h"
18 class nsIContent;
19 class nsIDocument;
20 class nsPresContext;
22 // nsPrintObject Document Type
23 enum PrintObjectType {eDoc = 0, eFrame = 1, eIFrame = 2, eFrameSet = 3};
25 //---------------------------------------------------
26 //-- nsPrintObject Class
27 //---------------------------------------------------
28 class nsPrintObject
31 public:
32 nsPrintObject();
33 ~nsPrintObject(); // non-virtual
35 // Methods
36 nsresult Init(nsIDocShell* aDocShell, nsIDOMDocument* aDoc,
37 bool aPrintPreview);
39 bool IsPrintable() { return !mDontPrint; }
40 void DestroyPresentation();
42 // Data Members
43 nsCOMPtr<nsIDocShell> mDocShell;
44 nsCOMPtr<nsIDocShellTreeOwner> mTreeOwner;
45 nsCOMPtr<nsIDocument> mDocument;
47 nsRefPtr<nsPresContext> mPresContext;
48 nsCOMPtr<nsIPresShell> mPresShell;
49 nsRefPtr<nsViewManager> mViewManager;
51 nsCOMPtr<nsIContent> mContent;
52 PrintObjectType mFrameType;
54 nsTArray<nsPrintObject*> mKids;
55 nsPrintObject* mParent;
56 bool mHasBeenPrinted;
57 bool mDontPrint;
58 bool mPrintAsIs;
59 bool mInvisible; // Indicates PO is set to not visible by CSS
60 bool mPrintPreview;
61 bool mDidCreateDocShell;
62 float mShrinkRatio;
63 float mZoomRatio;
65 private:
66 nsPrintObject& operator=(const nsPrintObject& aOther) MOZ_DELETE;
71 #endif /* nsPrintObject_h___ */