michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsPrintObject_h___ michael@0: #define nsPrintObject_h___ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: // Interfaces michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIPresShell.h" michael@0: #include "nsStyleSet.h" michael@0: #include "nsViewManager.h" michael@0: #include "nsIDocShell.h" michael@0: #include "nsIDocShellTreeOwner.h" michael@0: michael@0: class nsIContent; michael@0: class nsIDocument; michael@0: class nsPresContext; michael@0: michael@0: // nsPrintObject Document Type michael@0: enum PrintObjectType {eDoc = 0, eFrame = 1, eIFrame = 2, eFrameSet = 3}; michael@0: michael@0: //--------------------------------------------------- michael@0: //-- nsPrintObject Class michael@0: //--------------------------------------------------- michael@0: class nsPrintObject michael@0: { michael@0: michael@0: public: michael@0: nsPrintObject(); michael@0: ~nsPrintObject(); // non-virtual michael@0: michael@0: // Methods michael@0: nsresult Init(nsIDocShell* aDocShell, nsIDOMDocument* aDoc, michael@0: bool aPrintPreview); michael@0: michael@0: bool IsPrintable() { return !mDontPrint; } michael@0: void DestroyPresentation(); michael@0: michael@0: // Data Members michael@0: nsCOMPtr mDocShell; michael@0: nsCOMPtr mTreeOwner; michael@0: nsCOMPtr mDocument; michael@0: michael@0: nsRefPtr mPresContext; michael@0: nsCOMPtr mPresShell; michael@0: nsRefPtr mViewManager; michael@0: michael@0: nsCOMPtr mContent; michael@0: PrintObjectType mFrameType; michael@0: michael@0: nsTArray mKids; michael@0: nsPrintObject* mParent; michael@0: bool mHasBeenPrinted; michael@0: bool mDontPrint; michael@0: bool mPrintAsIs; michael@0: bool mInvisible; // Indicates PO is set to not visible by CSS michael@0: bool mPrintPreview; michael@0: bool mDidCreateDocShell; michael@0: float mShrinkRatio; michael@0: float mZoomRatio; michael@0: michael@0: private: michael@0: nsPrintObject& operator=(const nsPrintObject& aOther) MOZ_DELETE; michael@0: }; michael@0: michael@0: michael@0: michael@0: #endif /* nsPrintObject_h___ */ michael@0: