1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/printing/nsPrintObject.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,72 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 +#ifndef nsPrintObject_h___ 1.9 +#define nsPrintObject_h___ 1.10 + 1.11 +#include "mozilla/Attributes.h" 1.12 + 1.13 +// Interfaces 1.14 +#include "nsCOMPtr.h" 1.15 +#include "nsIPresShell.h" 1.16 +#include "nsStyleSet.h" 1.17 +#include "nsViewManager.h" 1.18 +#include "nsIDocShell.h" 1.19 +#include "nsIDocShellTreeOwner.h" 1.20 + 1.21 +class nsIContent; 1.22 +class nsIDocument; 1.23 +class nsPresContext; 1.24 + 1.25 +// nsPrintObject Document Type 1.26 +enum PrintObjectType {eDoc = 0, eFrame = 1, eIFrame = 2, eFrameSet = 3}; 1.27 + 1.28 +//--------------------------------------------------- 1.29 +//-- nsPrintObject Class 1.30 +//--------------------------------------------------- 1.31 +class nsPrintObject 1.32 +{ 1.33 + 1.34 +public: 1.35 + nsPrintObject(); 1.36 + ~nsPrintObject(); // non-virtual 1.37 + 1.38 + // Methods 1.39 + nsresult Init(nsIDocShell* aDocShell, nsIDOMDocument* aDoc, 1.40 + bool aPrintPreview); 1.41 + 1.42 + bool IsPrintable() { return !mDontPrint; } 1.43 + void DestroyPresentation(); 1.44 + 1.45 + // Data Members 1.46 + nsCOMPtr<nsIDocShell> mDocShell; 1.47 + nsCOMPtr<nsIDocShellTreeOwner> mTreeOwner; 1.48 + nsCOMPtr<nsIDocument> mDocument; 1.49 + 1.50 + nsRefPtr<nsPresContext> mPresContext; 1.51 + nsCOMPtr<nsIPresShell> mPresShell; 1.52 + nsRefPtr<nsViewManager> mViewManager; 1.53 + 1.54 + nsCOMPtr<nsIContent> mContent; 1.55 + PrintObjectType mFrameType; 1.56 + 1.57 + nsTArray<nsPrintObject*> mKids; 1.58 + nsPrintObject* mParent; 1.59 + bool mHasBeenPrinted; 1.60 + bool mDontPrint; 1.61 + bool mPrintAsIs; 1.62 + bool mInvisible; // Indicates PO is set to not visible by CSS 1.63 + bool mPrintPreview; 1.64 + bool mDidCreateDocShell; 1.65 + float mShrinkRatio; 1.66 + float mZoomRatio; 1.67 + 1.68 +private: 1.69 + nsPrintObject& operator=(const nsPrintObject& aOther) MOZ_DELETE; 1.70 +}; 1.71 + 1.72 + 1.73 + 1.74 +#endif /* nsPrintObject_h___ */ 1.75 +