Mozilla/mozilla/embedding/browser/webBrowser/nsIWebBrowserPrint.idl
rods%netscape.com 1d1f95e7c0 1) Enables the PageSeq frame to specify the "gap" of gray space around
it in Print Preview
2) It now positions the page in the window with the gray "gap" showing.
3) factors out code for calc'ing the number of pages
4) Adds the methods to get the number of page while in PP
Bug 125151 r=sgehanisr=attinasi


git-svn-id: svn://10.0.0.236/trunk@114536 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-14 23:18:09 +00:00

158 lines
4.7 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved.
*
* Contributor(s):
* Don Cone <dcone@netscape.com>
*/
#include "nsISupports.idl"
interface nsIDOMWindow;
interface nsIPrintSettings;
interface nsIWebProgressListener;
/**
* The nsIWebBrowserPrint
*/
[scriptable, uuid(9A7CA4B0-FBBA-11d4-A869-00105A183419)]
interface nsIWebBrowserPrint : nsISupports
{
/**
* PrintPreview Navigation Constants
*/
const short PRINTPREVIEW_GOTO_PAGENUM = 0;
const short PRINTPREVIEW_PREV_PAGE = 1;
const short PRINTPREVIEW_NEXT_PAGE = 2;
const short PRINTPREVIEW_HOME = 3;
const short PRINTPREVIEW_END = 4;
/**
* Returns a new, unique PrintSettings object each time.
*
* For example, if each browser was to have its own unique
* PrintSettings, then each brower window would call this to
* create its own unique PrintSettings object.
*
* If each browse window was to use the same PrintSettings object
* then it should use "globalPrintSettings"
*
*/
readonly attribute nsIPrintSettings newPrintSettings;
/**
* Returns a "global" PrintSettings object
* Creates a new the first time, if one doesn't exist.
*
* Then returns the same object each time after that.
*/
readonly attribute nsIPrintSettings globalPrintSettings;
/**
* Returns whether it is in Print Preview mode
*/
readonly attribute boolean doingPrintPreview;
/**
* The name of the default printer
*/
readonly attribute wstring defaultPrinterName;
/**
* Initializes certain settings from the native printer into the PrintSettings
* These settings include, but are not limited to:
* Page Orientation
* Page Size
* Number of Copies
*/
void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
/**
* Use this to Set and Get the current values of the last print invocation
* of "print" or "printpreview". The print engine always sets the PrintSettings
* from whoever is printing (or printpreview'ing) into the global settings.
*
* It is the responsibilitity of those implementing page setup
* to set their setting into the global settings if they want those new value
* to avilable to other callers of "globalPrintSettingsValues"
*/
attribute nsIPrintSettings globalPrintSettingsValues;
/**
* This returns whether the current document is a frameset document
*/
readonly attribute boolean isFramesetDocument;
/**
* This returns the total number of pages for the Print Preview
*/
readonly attribute long printPreviewNumPages;
/**
* Print the specified DOM window
*
* aThePrintOptions - Printer Settings for the print job
* nsIWebProgressListener - is updated during the print
* @return void
*/
void print(in nsIPrintSettings aThePrintSettings,
in nsIWebProgressListener aWPListener);
/**
* Print Preview the specified DOM window
*
* aThePrintOptions - Printer Settings for the print preview
* @return void
*/
void printPreview(in nsIPrintSettings aThePrintSettings);
/**
* Print Preview - Navigates within the window
*
* aNavType - navigation enum
* aPageNum - page num to navigate to when aNavType = ePrintPreviewGoToPageNum
* @return void
*/
void printPreviewNavigate(in short aNavType, in long aPageNum);
/**
* Cancel - Cancels the current print
* @return void
*/
void cancel();
/**
* Returns an array of the names of all documents names (Title or URL)
* and sub-documents. This will return a single item if the attr "isFramesetDocument" is false
* and may return any number of items is "isFramesetDocument" is true
*
* @param aCount - returns number of printers returned
* @param aResult - returns array of names
* @return void
*/
void enumerateDocumentNames(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult);
/**
* This exists PrintPreview mode and returns browser window to galley mode
* @return void
*/
void exitPrintPreview();
};