layout/generic/nsIPageSequenceFrame.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial