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 nsIPageSequenceFrame_h___ michael@0: #define nsIPageSequenceFrame_h___ michael@0: michael@0: #include "nsQueryFrame.h" michael@0: #include "nsCoord.h" michael@0: michael@0: class nsPresContext; michael@0: class nsIPrintSettings; michael@0: class nsITimerCallback; michael@0: michael@0: /** michael@0: * Interface for accessing special capabilities of the page sequence frame. michael@0: * michael@0: * Today all that exists are member functions for printing. michael@0: */ michael@0: class nsIPageSequenceFrame : public nsQueryFrame michael@0: { michael@0: public: michael@0: NS_DECL_QUERYFRAME_TARGET(nsIPageSequenceFrame) michael@0: michael@0: /** michael@0: * Print the set of pages. michael@0: * michael@0: * @param aPrintOptions options for printing michael@0: * @param aStatusCallback interface that the client provides to receive michael@0: * progress notifications. Can be nullptr michael@0: * @return NS_OK if successful michael@0: * NS_ERROR_ABORT if the client cancels printing using the callback michael@0: * interface michael@0: * NS_ERROR_INVALID_ARG if printing a range of pages (not all pages) michael@0: * and the start page is greater than the total number of pages michael@0: * NS_ERROR_FAILURE if there is an error michael@0: */ michael@0: NS_IMETHOD StartPrint(nsPresContext* aPresContext, michael@0: nsIPrintSettings* aPrintOptions, michael@0: const nsAString& aDocTitle, michael@0: const nsAString& aDocURL) = 0; michael@0: michael@0: NS_IMETHOD PrePrintNextPage(nsITimerCallback* aCallback, bool* aDone) = 0; michael@0: NS_IMETHOD PrintNextPage() = 0; michael@0: NS_IMETHOD ResetPrintCanvasList() = 0; michael@0: NS_IMETHOD GetCurrentPageNum(int32_t* aPageNum) = 0; michael@0: NS_IMETHOD GetNumPages(int32_t* aNumPages) = 0; michael@0: NS_IMETHOD IsDoingPrintRange(bool* aDoing) = 0; michael@0: NS_IMETHOD GetPrintRange(int32_t* aFromPage, int32_t* aToPage) = 0; michael@0: michael@0: NS_IMETHOD DoPageEnd() = 0; michael@0: NS_IMETHOD SetSelectionHeight(nscoord aYOffset, nscoord aHeight) = 0; michael@0: michael@0: NS_IMETHOD SetTotalNumPages(int32_t aTotal) = 0; michael@0: michael@0: // For Shrink To Fit michael@0: NS_IMETHOD GetSTFPercent(float& aSTFPercent) = 0; michael@0: }; michael@0: michael@0: #endif /* nsIPageSequenceFrame_h___ */ michael@0: michael@0: