LCOV - code coverage report
Current view: directory - layout/base - nsIDocumentViewerPrint.h (source / functions) Found Hit Coverage
Test: app.info Lines: 1 0 0.0 %
Date: 2012-06-02 Functions: 1 0 0.0 %

       1                 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2                 : /* ***** BEGIN LICENSE BLOCK *****
       3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       4                 :  *
       5                 :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :  * the License. You may obtain a copy of the License at
       8                 :  * http://www.mozilla.org/MPL/
       9                 :  *
      10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :  * for the specific language governing rights and limitations under the
      13                 :  * License.
      14                 :  *
      15                 :  * The Original Code is Mozilla Communicator client code.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is
      18                 :  * Netscape Communications Corporation.
      19                 :  * Portions created by the Initial Developer are Copyright (C) 1998
      20                 :  * the Initial Developer. All Rights Reserved.
      21                 :  *
      22                 :  * Contributor(s):
      23                 :  *
      24                 :  * Alternatively, the contents of this file may be used under the terms of
      25                 :  * either of the GNU General Public License Version 2 or later (the "GPL"),
      26                 :  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      27                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      28                 :  * of those above. If you wish to allow use of your version of this file only
      29                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      30                 :  * use your version of this file under the terms of the MPL, indicate your
      31                 :  * decision by deleting the provisions above and replace them with the notice
      32                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      33                 :  * the provisions above, a recipient may use your version of this file under
      34                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      35                 :  *
      36                 :  * ***** END LICENSE BLOCK ***** */
      37                 : #ifndef nsIDocumentViewerPrint_h___
      38                 : #define nsIDocumentViewerPrint_h___
      39                 : 
      40                 : #include "nsISupports.h"
      41                 : 
      42                 : class nsIDocument;
      43                 : class nsStyleSet;
      44                 : class nsIPresShell;
      45                 : class nsPresContext;
      46                 : class nsIWidget;
      47                 : class nsIViewManager;
      48                 : 
      49                 : // {c6f255cf-cadd-4382-b57f-cd2a9874169b}
      50                 : #define NS_IDOCUMENT_VIEWER_PRINT_IID \
      51                 : { 0xc6f255cf, 0xcadd, 0x4382, \
      52                 :   { 0xb5, 0x7f, 0xcd, 0x2a, 0x98, 0x74, 0x16, 0x9b } }
      53                 : 
      54                 : /**
      55                 :  * A DocumentViewerPrint is an INTERNAL Interface used for interaction
      56                 :  * between the DocumentViewer and the PrintEngine
      57                 :  */
      58                 : class nsIDocumentViewerPrint : public nsISupports
      59               0 : {
      60                 : public:
      61                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_PRINT_IID)
      62                 : 
      63                 :   virtual void SetIsPrinting(bool aIsPrinting) = 0;
      64                 :   virtual bool GetIsPrinting() = 0;
      65                 : 
      66                 :   virtual void SetIsPrintPreview(bool aIsPrintPreview) = 0;
      67                 :   virtual bool GetIsPrintPreview() = 0;
      68                 : 
      69                 :   // The style set returned by CreateStyleSet is in the middle of an
      70                 :   // update batch so that the caller can add sheets to it if needed.
      71                 :   // Callers should call EndUpdate() on it when ready to use.
      72                 :   virtual nsresult CreateStyleSet(nsIDocument* aDocument, nsStyleSet** aStyleSet) = 0;
      73                 : 
      74                 :   virtual void IncrementDestroyRefCount() = 0;
      75                 : 
      76                 :   virtual void ReturnToGalleyPresentation() = 0;
      77                 : 
      78                 :   virtual void OnDonePrinting() = 0;
      79                 : 
      80                 :   /**
      81                 :    * Returns true is InitializeForPrintPreview() has been called.
      82                 :    */
      83                 :   virtual bool IsInitializedForPrintPreview() = 0;
      84                 : 
      85                 :   /**
      86                 :    * Marks this viewer to be used for print preview.
      87                 :    */
      88                 :   virtual void InitializeForPrintPreview() = 0;
      89                 : 
      90                 :   /**
      91                 :    * Replaces the current presentation with print preview presentation.
      92                 :    */
      93                 :   virtual void SetPrintPreviewPresentation(nsIViewManager* aViewManager,
      94                 :                                            nsPresContext* aPresContext,
      95                 :                                            nsIPresShell* aPresShell) = 0;
      96                 : };
      97                 : 
      98                 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentViewerPrint,
      99                 :                               NS_IDOCUMENT_VIEWER_PRINT_IID)
     100                 : 
     101                 : /* Use this macro when declaring classes that implement this interface. */
     102                 : #define NS_DECL_NSIDOCUMENTVIEWERPRINT \
     103                 :   virtual void     SetIsPrinting(bool aIsPrinting); \
     104                 :   virtual bool     GetIsPrinting(); \
     105                 :   virtual void     SetIsPrintPreview(bool aIsPrintPreview); \
     106                 :   virtual bool     GetIsPrintPreview(); \
     107                 :   virtual nsresult CreateStyleSet(nsIDocument* aDocument, nsStyleSet** aStyleSet); \
     108                 :   virtual void     IncrementDestroyRefCount(); \
     109                 :   virtual void     ReturnToGalleyPresentation(); \
     110                 :   virtual void     OnDonePrinting(); \
     111                 :   virtual bool     IsInitializedForPrintPreview(); \
     112                 :   virtual void     InitializeForPrintPreview(); \
     113                 :   virtual void     SetPrintPreviewPresentation(nsIViewManager* aViewManager, \
     114                 :                                                nsPresContext* aPresContext, \
     115                 :                                                nsIPresShell* aPresShell);
     116                 : 
     117                 : #endif /* nsIDocumentViewerPrint_h___ */

Generated by: LCOV version 1.7