Back to index

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