2002-08-21 12:01:05 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-08-21 12:01:05 +00:00
|
|
|
#ifndef nsPrintObject_h___
|
|
|
|
#define nsPrintObject_h___
|
|
|
|
|
2011-12-16 19:42:07 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
2002-08-21 12:01:05 +00:00
|
|
|
// Interfaces
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIPresShell.h"
|
2004-01-07 22:30:53 +00:00
|
|
|
#include "nsStyleSet.h"
|
2013-01-05 03:12:24 +00:00
|
|
|
#include "nsViewManager.h"
|
2002-08-21 12:01:05 +00:00
|
|
|
#include "nsIDocShell.h"
|
2010-11-10 21:15:21 +00:00
|
|
|
#include "nsIDocShellTreeOwner.h"
|
2002-08-21 12:01:05 +00:00
|
|
|
|
2013-03-22 00:05:20 +00:00
|
|
|
class nsIContent;
|
2013-03-22 00:05:19 +00:00
|
|
|
class nsIDocument;
|
2010-04-10 20:10:12 +00:00
|
|
|
class nsPresContext;
|
|
|
|
|
2002-08-21 12:01:05 +00:00
|
|
|
// nsPrintObject Document Type
|
|
|
|
enum PrintObjectType {eDoc = 0, eFrame = 1, eIFrame = 2, eFrameSet = 3};
|
|
|
|
|
|
|
|
//---------------------------------------------------
|
|
|
|
//-- nsPrintObject Class
|
|
|
|
//---------------------------------------------------
|
|
|
|
class nsPrintObject
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
nsPrintObject();
|
|
|
|
~nsPrintObject(); // non-virtual
|
|
|
|
|
|
|
|
// Methods
|
2009-12-11 04:02:13 +00:00
|
|
|
nsresult Init(nsIDocShell* aDocShell, nsIDOMDocument* aDoc,
|
2011-09-29 06:19:26 +00:00
|
|
|
bool aPrintPreview);
|
2002-08-21 12:01:05 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool IsPrintable() { return !mDontPrint; }
|
2002-08-21 12:01:05 +00:00
|
|
|
void DestroyPresentation();
|
|
|
|
|
|
|
|
// Data Members
|
|
|
|
nsCOMPtr<nsIDocShell> mDocShell;
|
2010-11-10 21:15:21 +00:00
|
|
|
nsCOMPtr<nsIDocShellTreeOwner> mTreeOwner;
|
2002-08-21 12:01:05 +00:00
|
|
|
nsCOMPtr<nsIDocument> mDocument;
|
|
|
|
|
2010-03-25 13:17:11 +00:00
|
|
|
nsRefPtr<nsPresContext> mPresContext;
|
2002-08-21 12:01:05 +00:00
|
|
|
nsCOMPtr<nsIPresShell> mPresShell;
|
2013-01-05 03:12:42 +00:00
|
|
|
nsRefPtr<nsViewManager> mViewManager;
|
2002-08-21 12:01:05 +00:00
|
|
|
|
2009-12-11 04:02:13 +00:00
|
|
|
nsCOMPtr<nsIContent> mContent;
|
2006-03-30 00:27:42 +00:00
|
|
|
PrintObjectType mFrameType;
|
|
|
|
|
2009-02-03 14:42:18 +00:00
|
|
|
nsTArray<nsPrintObject*> mKids;
|
2006-03-30 00:27:42 +00:00
|
|
|
nsPrintObject* mParent;
|
2011-09-29 06:19:26 +00:00
|
|
|
bool mHasBeenPrinted;
|
|
|
|
bool mDontPrint;
|
|
|
|
bool mPrintAsIs;
|
|
|
|
bool mInvisible; // Indicates PO is set to not visible by CSS
|
|
|
|
bool mPrintPreview;
|
|
|
|
bool mDidCreateDocShell;
|
2002-08-21 12:01:05 +00:00
|
|
|
float mShrinkRatio;
|
2007-02-07 07:46:44 +00:00
|
|
|
float mZoomRatio;
|
2002-08-21 12:01:05 +00:00
|
|
|
|
|
|
|
private:
|
2011-12-16 19:42:07 +00:00
|
|
|
nsPrintObject& operator=(const nsPrintObject& aOther) MOZ_DELETE;
|
2002-08-21 12:01:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* nsPrintObject_h___ */
|
|
|
|
|