layout/generic/nsIPageSequenceFrame.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5 #ifndef nsIPageSequenceFrame_h___
michael@0 6 #define nsIPageSequenceFrame_h___
michael@0 7
michael@0 8 #include "nsQueryFrame.h"
michael@0 9 #include "nsCoord.h"
michael@0 10
michael@0 11 class nsPresContext;
michael@0 12 class nsIPrintSettings;
michael@0 13 class nsITimerCallback;
michael@0 14
michael@0 15 /**
michael@0 16 * Interface for accessing special capabilities of the page sequence frame.
michael@0 17 *
michael@0 18 * Today all that exists are member functions for printing.
michael@0 19 */
michael@0 20 class nsIPageSequenceFrame : public nsQueryFrame
michael@0 21 {
michael@0 22 public:
michael@0 23 NS_DECL_QUERYFRAME_TARGET(nsIPageSequenceFrame)
michael@0 24
michael@0 25 /**
michael@0 26 * Print the set of pages.
michael@0 27 *
michael@0 28 * @param aPrintOptions options for printing
michael@0 29 * @param aStatusCallback interface that the client provides to receive
michael@0 30 * progress notifications. Can be nullptr
michael@0 31 * @return NS_OK if successful
michael@0 32 * NS_ERROR_ABORT if the client cancels printing using the callback
michael@0 33 * interface
michael@0 34 * NS_ERROR_INVALID_ARG if printing a range of pages (not all pages)
michael@0 35 * and the start page is greater than the total number of pages
michael@0 36 * NS_ERROR_FAILURE if there is an error
michael@0 37 */
michael@0 38 NS_IMETHOD StartPrint(nsPresContext* aPresContext,
michael@0 39 nsIPrintSettings* aPrintOptions,
michael@0 40 const nsAString& aDocTitle,
michael@0 41 const nsAString& aDocURL) = 0;
michael@0 42
michael@0 43 NS_IMETHOD PrePrintNextPage(nsITimerCallback* aCallback, bool* aDone) = 0;
michael@0 44 NS_IMETHOD PrintNextPage() = 0;
michael@0 45 NS_IMETHOD ResetPrintCanvasList() = 0;
michael@0 46 NS_IMETHOD GetCurrentPageNum(int32_t* aPageNum) = 0;
michael@0 47 NS_IMETHOD GetNumPages(int32_t* aNumPages) = 0;
michael@0 48 NS_IMETHOD IsDoingPrintRange(bool* aDoing) = 0;
michael@0 49 NS_IMETHOD GetPrintRange(int32_t* aFromPage, int32_t* aToPage) = 0;
michael@0 50
michael@0 51 NS_IMETHOD DoPageEnd() = 0;
michael@0 52 NS_IMETHOD SetSelectionHeight(nscoord aYOffset, nscoord aHeight) = 0;
michael@0 53
michael@0 54 NS_IMETHOD SetTotalNumPages(int32_t aTotal) = 0;
michael@0 55
michael@0 56 // For Shrink To Fit
michael@0 57 NS_IMETHOD GetSTFPercent(float& aSTFPercent) = 0;
michael@0 58 };
michael@0 59
michael@0 60 #endif /* nsIPageSequenceFrame_h___ */
michael@0 61
michael@0 62

mercurial