home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / mnwizard.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.1 KB  |  233 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef MNWIZARD_H
  20. #define MNWIZARD_H
  21.  
  22. #include "property.h"
  23. #include "resource.h"
  24.  
  25. class CMailNewsWizard;
  26.  
  27. #ifdef _WIN32
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CCoverPage  
  30. class CCoverPage : public CNetscapePropertyPage
  31. {
  32. public:
  33.  
  34.     CCoverPage(CWnd *pParent);
  35.     
  36.     enum { IDD = IDD_WIZARD_COVERPAGE };
  37.  
  38.     //{{AFX_VIRTUAL(CCoverPage)
  39.     protected:
  40.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  41.     //}}AFX_VIRTUAL
  42.  
  43.  
  44. protected: 
  45.     CMailNewsWizard* m_pParent;
  46.  
  47.     virtual BOOL OnInitDialog();
  48.     virtual BOOL OnSetActive();
  49.  
  50.     DECLARE_MESSAGE_MAP()
  51. };
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CSendMailPage  
  55. class CSendMailPage : public CNetscapePropertyPage
  56. {
  57. public:
  58.  
  59.     CSendMailPage(CWnd *pParent, BOOL bVerify = FALSE);
  60.     
  61.     enum { IDD = IDD_WIZARD_SENDMAIL };
  62.  
  63.     virtual BOOL OnInitDialog();
  64.  
  65.     void DoFinish();
  66.  
  67.     //{{AFX_VIRTUAL(CSendMailPage)
  68.     protected:
  69.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  70.     //}}AFX_VIRTUAL
  71.  
  72.  
  73. protected: 
  74.  
  75.     CMailNewsWizard*    m_pParent;
  76.     BOOL                m_bVerify;        
  77.  
  78.     virtual BOOL OnSetActive();
  79.     virtual LRESULT OnWizardNext();
  80.  
  81.     DECLARE_MESSAGE_MAP()
  82. };
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85. // CReceiveMailPage  
  86. class CReceiveMailPage : public CNetscapePropertyPage
  87. {
  88. public:
  89.  
  90.     CReceiveMailPage(CWnd *pParent, BOOL bVerify = FALSE);
  91.     
  92.     enum { IDD = IDD_WIZARD_RECEIVEMAIL };
  93.  
  94.     virtual BOOL OnInitDialog();
  95.  
  96.     void DoFinish();
  97.  
  98.     //{{AFX_VIRTUAL(CReceiveMailPage)
  99.     protected:
  100.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  101.     //}}AFX_VIRTUAL
  102.  
  103.  
  104. protected: 
  105.  
  106.     CMailNewsWizard*    m_pParent;
  107.     BOOL                m_bVerify;        
  108.  
  109.     virtual BOOL OnSetActive();
  110.     virtual LRESULT OnWizardNext();
  111.  
  112.     DECLARE_MESSAGE_MAP()
  113. };
  114.  
  115. /////////////////////////////////////////////////////////////////////////////
  116. // CReadNewsPage  
  117. class CReadNewsPage : public CNetscapePropertyPage
  118. {
  119. public:
  120.  
  121.     CReadNewsPage(CWnd *pParent);
  122.    ~CReadNewsPage();
  123.     
  124.     enum { IDD = IDD_WIZARD_READNEWS };
  125.  
  126.     virtual BOOL OnInitDialog();
  127.  
  128.     BOOL DoFinish();
  129.  
  130.     //PE:
  131.     void SetFinish(BOOL nFinish);
  132.  
  133.     //{{AFX_VIRTUAL(CReadNewsPage)
  134.     protected:
  135.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  136.     //}}AFX_VIRTUAL
  137.  
  138.  
  139. protected: 
  140.  
  141.     CMailNewsWizard* m_pParent;
  142.  
  143.     virtual BOOL OnSetActive();
  144.  
  145.     afx_msg void OnCheckSecure();
  146.     DECLARE_MESSAGE_MAP()
  147.  
  148. private:
  149.     BOOL m_bPEFinish;        // PE
  150. };
  151.  
  152. /////////////////////////////////////////////////////////////////////////////
  153. // CMailNewsWizard
  154. class CMailNewsWizard : public CNetscapePropertySheet
  155. {
  156. public:
  157.  
  158.     CMailNewsWizard(CWnd *pPare);
  159.     ~CMailNewsWizard();
  160.  
  161. protected:  
  162.     
  163.     CCoverPage            *m_pCoverPage;
  164.     CSendMailPage        *m_pSendMailPage;
  165.     CReceiveMailPage    *m_pReceiveMailPage;
  166.     CReadNewsPage        *m_pReadNewsPage;
  167.  
  168.     virtual BOOL OnInitDialog();
  169.  
  170.     afx_msg void DoFinish();
  171.     DECLARE_MESSAGE_MAP()
  172. };
  173.  
  174. #else       //Win16 Code
  175.  
  176.  
  177. #define ID_PAGE_COVER        1
  178. #define ID_PAGE_SENDMAIL    2
  179. #define ID_PAGE_READMAIL    3
  180. #define ID_PAGE_READNEWS    4
  181. #define ID_PAGE_FINISH        5
  182.  
  183. /////////////////////////////////////////////////////////////////////////////
  184. // CMailNewsWizard
  185. class CMailNewsWizard : public CDialog
  186. {
  187. public:
  188.  
  189.     CMailNewsWizard(CWnd *pPare);
  190.     enum { IDD = IDD_WIZARD_MAILNEWS_WIN16 };
  191.  
  192.     //{{AFX_VIRTUAL(CMailNewsWizard)
  193.     protected:
  194.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  195.     //}}AFX_VIRTUAL
  196.  
  197.     virtual BOOL OnInitDialog();
  198.  
  199. protected:
  200.     
  201.     int32 m_lPort;
  202.     int m_nCurrentPage;
  203.     int m_nNewsServerLen;
  204.     CString m_szFullName;
  205.     CString m_szEmail;
  206.     CString m_szMailServer;
  207.     CString m_szPopName;
  208.     CString m_szInMailServer;
  209.     CString m_szNewsServer;
  210.     XP_Bool    m_bUseIMAP;
  211.     XP_Bool    m_bIsSecure;
  212.  
  213.     void SetControlText(int nID, int nStringID); 
  214.     void ShowCoverPage();
  215.     void ShowSendMailPage();
  216.     void ShowHideSendMailControls(int nShowCmd);
  217.     void ShowReadMailPage();
  218.     void ShowHideReadMailControls(int nShowCmd);
  219.     void ShowReadNewsPage();
  220.     void ShowHideReadNewsControls(int nShowCmd);
  221.     BOOL DoFinish(); 
  222.     BOOL CheckValidText(); 
  223.     
  224.     afx_msg void DoBack();
  225.     afx_msg void OnCheckSecure();
  226.     afx_msg void DoNext();
  227.     DECLARE_MESSAGE_MAP()
  228. };
  229.  
  230. #endif _WIN32
  231.  
  232. #endif MNWIZARD_H
  233.