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"
12 #include "nsIPresShell.h"
13 #include "nsStyleSet.h"
14 #include "nsViewManager.h"
15 #include "nsIDocShell.h"
16 #include "nsIDocShellTreeOwner.h"
22 // nsPrintObject Document Type
23 enum PrintObjectType
{eDoc
= 0, eFrame
= 1, eIFrame
= 2, eFrameSet
= 3};
25 //---------------------------------------------------
26 //-- nsPrintObject Class
27 //---------------------------------------------------
33 ~nsPrintObject(); // non-virtual
36 nsresult
Init(nsIDocShell
* aDocShell
, nsIDOMDocument
* aDoc
,
39 bool IsPrintable() { return !mDontPrint
; }
40 void DestroyPresentation();
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
;
59 bool mInvisible
; // Indicates PO is set to not visible by CSS
61 bool mDidCreateDocShell
;
66 nsPrintObject
& operator=(const nsPrintObject
& aOther
) MOZ_DELETE
;
71 #endif /* nsPrintObject_h___ */