Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsPagePrintTimer Class Reference

#include <nsPagePrintTimer.h>

Inheritance diagram for nsPagePrintTimer:
Inheritance graph
[legend]
Collaboration diagram for nsPagePrintTimer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS nsPagePrintTimer ()
virtual ~nsPagePrintTimer ()
NS_DECL_NSITIMERCALLBACK nsresult StartTimer (PRBool aUseDelay=PR_TRUE)
void Init (nsPrintEngine *aPrintEngine, nsIDocumentViewerPrint *aDocViewerPrint, nsPresContext *aPresContext, nsIPrintSettings *aPrintSettings, nsPrintObject *aPO, PRUint32 aDelay)
nsresult Start (nsPrintEngine *aPrintEngine, nsIDocumentViewerPrint *aDocViewerPrint, nsPresContext *aPresContext, nsIPrintSettings *aPrintSettings, nsPrintObject *aPO, PRUint32 aDelay)
void Stop ()
void notify (in nsITimer timer)

Private Attributes

nsPrintEnginemPrintEngine
nsCOMPtr< nsIDocumentViewerPrintmDocViewerPrint
nsPresContextmPresContext
nsCOMPtr< nsIPrintSettingsmPrintSettings
nsCOMPtr< nsITimermTimer
PRUint32 mDelay
nsPrintObjectmPrintObj

Detailed Description

Definition at line 58 of file nsPagePrintTimer.h.


Constructor & Destructor Documentation

Definition at line 53 of file nsPagePrintTimer.cpp.

{
  if (mTimer) {
    mTimer->Cancel();
  }
  mPrintEngine->SetIsPrinting(PR_FALSE); // this will notify the DV also

  nsCOMPtr<nsIContentViewer> cv(do_QueryInterface(mDocViewerPrint));
  if (cv) {
    cv->Destroy();
  }
}

Here is the call graph for this function:


Member Function Documentation

void nsPagePrintTimer::Init ( nsPrintEngine aPrintEngine,
nsIDocumentViewerPrint aDocViewerPrint,
nsPresContext aPresContext,
nsIPrintSettings aPrintSettings,
nsPrintObject aPO,
PRUint32  aDelay 
)

Definition at line 112 of file nsPagePrintTimer.cpp.

{
  mPrintEngine     = aPrintEngine;
  mDocViewerPrint  = aDocViewerPrint;

  mPresContext     = aPresContext;
  mPrintSettings   = aPrintSettings;
  mPrintObj        = aPO;
  mDelay           = aDelay;
}

Here is the caller graph for this function:

void nsITimerCallback::notify ( in nsITimer  timer) [inherited]
Parameters:
aTimerthe timer which has expired
nsresult nsPagePrintTimer::Start ( nsPrintEngine aPrintEngine,
nsIDocumentViewerPrint aDocViewerPrint,
nsPresContext aPresContext,
nsIPrintSettings aPrintSettings,
nsPrintObject aPO,
PRUint32  aDelay 
)

Definition at line 129 of file nsPagePrintTimer.cpp.

{
  Init(aPrintEngine, aDocViewerPrint, aPresContext, aPrintSettings, aPO, aDelay);
  return StartTimer(PR_FALSE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 67 of file nsPagePrintTimer.cpp.

{
  nsresult result;
  mTimer = do_CreateInstance("@mozilla.org/timer;1", &result);
  if (NS_FAILED(result)) {
    NS_WARNING("unable to start the timer");
  } else {
    mTimer->InitWithCallback(this, aUseDelay?mDelay:0, nsITimer::TYPE_ONE_SHOT);
  }
  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 142 of file nsPagePrintTimer.cpp.

{
  if (mTimer) {
    mTimer->Cancel();
    mTimer = nsnull;
  }
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 94 of file nsPagePrintTimer.h.

Definition at line 90 of file nsPagePrintTimer.h.

Definition at line 91 of file nsPagePrintTimer.h.

Definition at line 89 of file nsPagePrintTimer.h.

Definition at line 95 of file nsPagePrintTimer.h.

Definition at line 92 of file nsPagePrintTimer.h.

Definition at line 93 of file nsPagePrintTimer.h.


The documentation for this class was generated from the following files: