Back to index

lightning-sunbird  0.9+nobinonly
nsIPageSequenceFrame.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 #ifndef nsIPageSequenceFrame_h___
00038 #define nsIPageSequenceFrame_h___
00039 
00040 #include "nsISupports.h"
00041 #include "nsRect.h"
00042 
00043 class nsPresContext;
00044 class nsIPrintSettings;
00045 
00046 // IID for the nsIPageSequenceFrame interface 
00047 // a6cf90d2-15b3-11d2-932e-00805f8add32
00048 #define NS_IPAGESEQUENCEFRAME_IID \
00049  { 0xa6cf90d2, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
00050 
00051 //----------------------------------------------------------------------
00052 
00058 class nsIPageSequenceFrame : public nsISupports {
00059 public:
00060   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPAGESEQUENCEFRAME_IID)
00061 
00062   
00075   NS_IMETHOD StartPrint(nsPresContext*  aPresContext,
00076                         nsIPrintSettings* aPrintOptions,
00077                         PRUnichar* aDocTitle,
00078                         PRUnichar* aDocURL) = 0;
00079   NS_IMETHOD PrintNextPage(nsPresContext*  aPresContext) = 0;
00080   NS_IMETHOD GetCurrentPageNum(PRInt32* aPageNum) = 0;
00081   NS_IMETHOD GetNumPages(PRInt32* aNumPages) = 0;
00082   NS_IMETHOD IsDoingPrintRange(PRBool* aDoing) = 0;
00083   NS_IMETHOD GetPrintRange(PRInt32* aFromPage, PRInt32* aToPage) = 0;
00084 
00085   NS_IMETHOD SkipPageBegin() = 0;
00086   NS_IMETHOD SkipPageEnd() = 0;
00087 
00088   NS_IMETHOD DoPageEnd(nsPresContext* aPresContext) = 0;
00089   NS_IMETHOD GetPrintThisPage(PRBool* aPrintThisPage) = 0;
00090   NS_IMETHOD SetOffset(nscoord aX, nscoord aY) = 0;
00091   NS_IMETHOD SuppressHeadersAndFooters(PRBool aDoSup) = 0;
00092   NS_IMETHOD SetClipRect(nsPresContext*  aPresContext, nsRect* aSize) = 0;
00093   NS_IMETHOD SetSelectionHeight(nscoord aYOffset, nscoord aHeight) = 0;
00094 
00095   NS_IMETHOD SetTotalNumPages(PRInt32 aTotal) = 0;
00096 
00097   // Gets the dead space (the gray area) around the Print Preview Page
00098   NS_IMETHOD GetDeadSpaceValue(nscoord* aValue) = 0;
00099 
00100   // For Shrink To Fit
00101   NS_IMETHOD GetSTFPercent(float& aSTFPercent) = 0;
00102   
00103 private:
00104   NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
00105   NS_IMETHOD_(nsrefcnt) Release(void) = 0;
00106 };
00107 
00108 #endif /* nsIPageSequenceFrame_h___ */
00109 
00110