2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
1998-12-07 07:05:12 +03:00
|
|
|
#ifndef nsIPageSequenceFrame_h___
|
|
|
|
#define nsIPageSequenceFrame_h___
|
|
|
|
|
2009-01-12 22:20:59 +03:00
|
|
|
#include "nsQueryFrame.h"
|
2013-09-07 06:15:49 +04:00
|
|
|
#include "nsCoord.h"
|
1998-12-07 07:05:12 +03:00
|
|
|
|
2004-08-01 03:15:21 +04:00
|
|
|
class nsPresContext;
|
2002-01-01 15:58:53 +03:00
|
|
|
class nsIPrintSettings;
|
2012-08-31 04:24:35 +04:00
|
|
|
class nsITimerCallback;
|
1998-12-07 07:05:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for accessing special capabilities of the page sequence frame.
|
|
|
|
*
|
|
|
|
* Today all that exists are member functions for printing.
|
|
|
|
*/
|
2009-01-12 22:20:59 +03:00
|
|
|
class nsIPageSequenceFrame : public nsQueryFrame
|
|
|
|
{
|
1998-12-07 07:05:12 +03:00
|
|
|
public:
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsIPageSequenceFrame)
|
1998-12-07 07:05:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Print the set of pages.
|
|
|
|
*
|
|
|
|
* @param aPrintOptions options for printing
|
|
|
|
* @param aStatusCallback interface that the client provides to receive
|
2013-10-08 22:47:21 +04:00
|
|
|
* progress notifications. Can be nullptr
|
1998-12-07 07:05:12 +03:00
|
|
|
* @return NS_OK if successful
|
|
|
|
* NS_ERROR_ABORT if the client cancels printing using the callback
|
|
|
|
* interface
|
|
|
|
* NS_ERROR_INVALID_ARG if printing a range of pages (not all pages)
|
|
|
|
* and the start page is greater than the total number of pages
|
|
|
|
* NS_ERROR_FAILURE if there is an error
|
|
|
|
*/
|
2013-07-24 15:48:37 +04:00
|
|
|
NS_IMETHOD StartPrint(nsPresContext* aPresContext,
|
2002-05-07 16:03:37 +04:00
|
|
|
nsIPrintSettings* aPrintOptions,
|
2013-07-24 15:48:37 +04:00
|
|
|
const nsAString& aDocTitle,
|
|
|
|
const nsAString& aDocURL) = 0;
|
2012-08-31 04:24:35 +04:00
|
|
|
|
|
|
|
NS_IMETHOD PrePrintNextPage(nsITimerCallback* aCallback, bool* aDone) = 0;
|
2006-03-30 04:27:42 +04:00
|
|
|
NS_IMETHOD PrintNextPage() = 0;
|
2012-08-31 04:24:35 +04:00
|
|
|
NS_IMETHOD ResetPrintCanvasList() = 0;
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD GetCurrentPageNum(int32_t* aPageNum) = 0;
|
|
|
|
NS_IMETHOD GetNumPages(int32_t* aNumPages) = 0;
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD IsDoingPrintRange(bool* aDoing) = 0;
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD GetPrintRange(int32_t* aFromPage, int32_t* aToPage) = 0;
|
2001-03-27 15:56:03 +04:00
|
|
|
|
2006-03-30 04:27:42 +04:00
|
|
|
NS_IMETHOD DoPageEnd() = 0;
|
2001-11-03 17:59:39 +03:00
|
|
|
NS_IMETHOD SetSelectionHeight(nscoord aYOffset, nscoord aHeight) = 0;
|
2002-02-12 16:33:39 +03:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD SetTotalNumPages(int32_t aTotal) = 0;
|
2002-02-15 02:18:09 +03:00
|
|
|
|
2002-09-20 01:45:07 +04:00
|
|
|
// For Shrink To Fit
|
|
|
|
NS_IMETHOD GetSTFPercent(float& aSTFPercent) = 0;
|
1998-12-07 07:05:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsIPageSequenceFrame_h___ */
|
|
|
|
|
|
|
|
|