Back to index

lightning-sunbird  0.9+nobinonly
PrintProgressDialog.h
Go to the documentation of this file.
00001 #if !defined(AFX_PRINTPROGRESSDIALOG_H__1E3AA1B5_B8BB_4B25_86A5_A90E663D137F__INCLUDED_)
00002 #define AFX_PRINTPROGRESSDIALOG_H__1E3AA1B5_B8BB_4B25_86A5_A90E663D137F__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 // PrintProgressDialog.h : header file
00008 //
00009 
00010 #include "resource.h"
00011 #include "nsIWebProgressListener.h"
00012 #include "nsIWebBrowserPrint.h"
00013 #include "nsIPrintSettings.h"
00014 #include "nsIPrintProgressParams.h"
00015 #include "nsCOMPtr.h"
00016 
00018 // CPrintProgressDialog dialog
00019 
00020 class CPrintProgressDialog : public CDialog
00021 {
00022 // Construction
00023 public:
00024        CPrintProgressDialog(CWnd*                   pParent,
00025                        BOOL                    aIsForPrinting,
00026                        nsIPrintProgressParams* aPPParams,
00027                        nsIWebBrowserPrint*     aWebBrowserPrint, 
00028                        nsIPrintSettings*       aPrintSettings);
00029        virtual ~CPrintProgressDialog();
00030 
00031   // Helper
00032   void SetDocAndURL();
00033 
00034   NS_IMETHOD OnStartPrinting(void);
00035   NS_IMETHOD OnProgressPrinting(PRUint32 aProgress, PRUint32 aProgressMax);
00036   NS_IMETHOD OnEndPrinting(PRUint32 aStatus);
00037 
00038 // Dialog Data
00039        //{{AFX_DATA(CPrintProgressDialog)
00040        enum { IDD = IDD_PRINT_PROGRESS_DIALOG };
00041               // NOTE: the ClassWizard will add data members here
00042        //}}AFX_DATA
00043 
00044 
00045 // Overrides
00046        // ClassWizard generated virtual function overrides
00047        //{{AFX_VIRTUAL(CPrintProgressDialog)
00048        protected:
00049        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00050        //}}AFX_VIRTUAL
00051 
00052 // Implementation
00053 protected:
00054        CProgressCtrl                    m_wndProgress;
00055   CString                          m_URL;
00056   nsCOMPtr<nsIWebBrowserPrint>     m_WebBrowserPrint;
00057   nsCOMPtr<nsIPrintProgressParams> m_PPParams;
00058   nsCOMPtr<nsIWebProgressListener> m_PrintListener;
00059   nsCOMPtr<nsIPrintSettings>       m_PrintSettings;
00060   BOOL                             m_HasStarted;
00061   BOOL                             m_IsForPrinting;
00062 
00063        // Generated message map functions
00064        //{{AFX_MSG(CPrintProgressDialog)
00065        virtual BOOL OnInitDialog();
00066        virtual void OnCancel();
00067        //}}AFX_MSG
00068        DECLARE_MESSAGE_MAP()
00069 };
00070 
00071 //{{AFX_INSERT_LOCATION}}
00072 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00073 
00074 #endif // !defined(AFX_PRINTPROGRESSDIALOG_H__1E3AA1B5_B8BB_4B25_86A5_A90E663D137F__INCLUDED_)