home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / setupwiz.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  7.1 KB  |  298 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 SETUPWIZ_H
  20. #define SETUPWIZ_H
  21.  
  22. #include "property.h"
  23. #include "resource.h"
  24. #ifdef MOZ_MAIL_NEWS
  25. #include "mnwizard.h"
  26. #endif /* MOZ_MAIL_NEWS */
  27. #include "mucwiz.h"
  28.  
  29. #ifdef XP_WIN32
  30.  
  31. class CNewProfileWizard;
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CConfirmPage  
  35. class CConfirmPage : public CNetscapePropertyPage
  36. {
  37. public:
  38.  
  39.     CConfirmPage(CWnd *pParent);
  40.    ~CConfirmPage();
  41.     
  42.     enum { IDD = IDD_SETUPWIZARD_CONFIRMTYPE };
  43.  
  44.     virtual BOOL OnInitDialog();
  45.  
  46.     afx_msg int DoFinish();
  47.     //{{AFX_VIRTUAL(CIntroPage)
  48.     protected:
  49.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  50.     //}}AFX_VIRTUAL
  51.  
  52.  
  53. protected: 
  54.     CNewProfileWizard* m_pParent;
  55.  
  56.     virtual BOOL OnSetActive();
  57.  
  58.     DECLARE_MESSAGE_MAP()
  59. };
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CIntroPage  
  63. class CIntroPage : public CNetscapePropertyPage
  64. {
  65. public:
  66.  
  67.     CIntroPage(CWnd *pParent);
  68.     
  69.     enum { IDD = IDD_SETUPWIZARD_INTRO };
  70.     virtual BOOL OnInitDialog();
  71.  
  72.     //{{AFX_VIRTUAL(CIntroPage)
  73.     protected:
  74.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  75.     //}}AFX_VIRTUAL
  76.  
  77.  
  78. protected: 
  79.     CNewProfileWizard* m_pParent;
  80.  
  81.     virtual BOOL OnSetActive();
  82.  
  83.     DECLARE_MESSAGE_MAP()
  84. };
  85. /////////////////////////////////////////////////////////////////////////////
  86. // CNamePage  
  87. class CNamePage : public CNetscapePropertyPage
  88. {
  89. public:
  90.  
  91.     CNamePage(CWnd *pParent);
  92.    ~CNamePage();
  93.     
  94.     enum { IDD = IDD_SETUPWIZARD_NAMEEMAIL };
  95.  
  96.     virtual BOOL OnInitDialog();
  97.     void ShowHideEmailName();
  98.     afx_msg void DoFinish();
  99.  
  100.     //{{AFX_VIRTUAL(CProfileNamePage)
  101.     protected:
  102.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  103.     //}}AFX_VIRTUAL
  104.  
  105.  
  106. protected: 
  107.  
  108.     CNewProfileWizard* m_pParent;
  109.  
  110.     virtual BOOL OnSetActive();
  111.  
  112.     DECLARE_MESSAGE_MAP()
  113. };
  114.  
  115. /////////////////////////////////////////////////////////////////////////////
  116. // CProfileNamePage  
  117. class CProfileNamePage : public CNetscapePropertyPage
  118. {
  119. public:
  120.  
  121.     CProfileNamePage(CWnd *pParent);
  122.    ~CProfileNamePage();
  123.     
  124.     enum { IDD = IDD_SETUPWIZARD_PROFILENAME };
  125.  
  126.     void GetProfilePath(char *str);
  127.  
  128.     virtual BOOL OnInitDialog();
  129.  
  130.     afx_msg int DoFinish();
  131.  
  132.     //{{AFX_VIRTUAL(CProfileNamePage)
  133.     protected:
  134.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  135.     virtual BOOL UpdateData(BOOL bValidate);
  136.     //}}AFX_VIRTUAL
  137.  
  138.  
  139. protected: 
  140.  
  141.     CNewProfileWizard* m_pParent;
  142.  
  143.     virtual BOOL OnSetActive();
  144.  
  145.     DECLARE_MESSAGE_MAP()
  146. };
  147.  
  148. /////////////////////////////////////////////////////////////////////////////
  149. // CNewProfileWizard
  150. class CNewProfileWizard : public CNetscapePropertySheet
  151. {
  152. public:
  153.  
  154.     CNewProfileWizard(CWnd *pPare, BOOL bUpgrade);
  155.     ~CNewProfileWizard();
  156.  
  157.     afx_msg void DoFinish();
  158.     virtual BOOL OnInitDialog();
  159.  
  160.     CString         m_pUserAddr;
  161.     CString         m_pFullName;
  162.     CString         m_pProfileName;
  163.     CString         m_pProfilePath;
  164.     BOOL            m_bUpgrade;
  165.     BOOL            m_bExistingDir;
  166.  
  167.     //PE
  168.     CString         m_pModemName;
  169.     CString         m_pAcctName;
  170.     BOOL            m_bASWEnabled;
  171.     BOOL            m_bMucEnabled;
  172.     CString            m_title;
  173.     // for PE
  174.     afx_msg void DoNext();
  175.     afx_msg void DoBack();
  176.     void GetProfilePath(char *str);
  177.  
  178. protected:  
  179.     
  180.     CIntroPage                      *m_pIntroPage;
  181.     CNamePage                       *m_pNamePage;
  182.     CProfileNamePage        *m_pProfileNamePage;
  183.     CConfirmPage            *m_pConfirmPage;
  184. #ifdef MOZ_MAIL_NEWS  
  185.     CSendMailPage           *m_pSendMailPage;
  186.     CReceiveMailPage        *m_pReceiveMailPage;
  187.     CReadNewsPage           *m_pReadNewsPage;
  188. #endif /* MOZ_MAIL_NEWS */   
  189.     //PE
  190.     CMucIntroPage           *m_pMucIntroPage;
  191.     CMucEditPage            *m_pMucEditPage;
  192.     CASWReadyPage           *m_pASWReadyPage;
  193.     CMucReadyPage           *m_pMucReadyPage;
  194.  
  195.     DECLARE_MESSAGE_MAP()
  196. };
  197.  
  198.  
  199. #else      //Win16 Code
  200. /////////////////////////////////////////////////////////////////////////////
  201. #define ID_PAGE_INTRO           1
  202. #define ID_PAGE_NAME            2
  203. #define ID_PAGE_PROFILE         3
  204. #define ID_PAGE_CONFIRM         4
  205. #define ID_PAGE_SENDMAIL        5
  206. #define ID_PAGE_RECEIVEMAIL     6
  207. #define ID_PAGE_READNEWS        7
  208. #define ID_PAGE_FINISH          8
  209. #define ID_PEMUC_INTRO            9
  210. #define ID_PEMUC_ASWREADY        10
  211. #define ID_PEMUC_MUCREADY        11
  212. #define ID_PEMUC_MUCEDIT        12
  213.  
  214. // CMailNewsWizard
  215. class CNewProfileWizard : public CDialog
  216. {
  217. public:
  218.  
  219.     CNewProfileWizard(CWnd *pPare, BOOL bUpgrade);
  220.        ~CNewProfileWizard();
  221.     enum { IDD = IDD_SETUPWIZARD_WIN16 };
  222.  
  223.     CString         m_pUserAddr;
  224.     CString         m_pFullName;
  225.     CString         m_pProfileName;
  226.     CString         m_pProfilePath;
  227.     int             m_bFirstProfile;
  228.     int             m_nCurrentPage;
  229.     BOOL            m_bUpgrade;
  230.     BOOL            m_bExistingDir;
  231.  
  232.     CString m_szFullName;
  233.     CString m_szEmail;
  234.     CString m_szMailServer;
  235.     CString m_szPopName;
  236.     CString m_szInMailServer;
  237.     CString m_szNewsServer;
  238.     XP_Bool m_bUseIMAP;
  239.     XP_Bool m_bLeftOnServer;
  240.     XP_Bool    m_bIsSecure;
  241.     int        m_nPort;
  242.  
  243.     
  244.     //PE
  245.     CString         m_pModemName;
  246.     CString         m_pAcctName;
  247.     BOOL            m_bASWEnabled;
  248.     BOOL            m_bMucEnabled;
  249.  
  250.     // for PE
  251.     void GetProfilePath(char *str);
  252.  
  253.  
  254.     //{{AFX_VIRTUAL(CMailNewsWizard)
  255.     protected:
  256.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  257.     //}}AFX_VIRTUAL
  258.  
  259.     virtual BOOL OnInitDialog();
  260.  
  261. protected:
  262.  
  263.     void InitPrefStrings(); 
  264.     void SetControlText(int nID, int nStringID); 
  265.     void ShowHideIntroPage(int nShowCmd);
  266.     void ShowHideNamePage(int nShowCmd);
  267.     void ShowHideProfilePage(int nShowCmd);
  268.     void ShowHideConfirmPage(int nShowCmd);
  269.     void ShowHideSendPage(int nShowCmd);
  270.     void ShowHideReceivePage(int nShowCmd);
  271.     void ShowHideNewsPage(int nShowCmd);
  272.  
  273.     //PE
  274.     void ShowHidePEMucIntroPage(int nShowCmd);
  275.     void ShowHidePEMucReadyPage(int nShowCmd);
  276.     void ShowHidePEMucASWReadyPage(int nShowCmd);
  277.     void ShowHidePEMucEditPage(int nShowCmd);
  278.  
  279.     BOOL DoFinish(); 
  280.     
  281.     afx_msg void DoBack();
  282.     afx_msg void DoNext();
  283.     afx_msg void OnMove(int x, int y);
  284.     afx_msg void OnCheckSecure();
  285.  
  286.     DECLARE_MESSAGE_MAP()
  287.  
  288.     //PE
  289.     CMucIntroPage           *m_pMucIntroPage;
  290.     CMucEditPage            *m_pMucEditPage;
  291.     CASWReadyPage           *m_pASWReadyPage;
  292.     CMucReadyPage           *m_pMucReadyPage;
  293.  
  294. };
  295. #endif XP_WIN32
  296. #endif SETUPWIZ_H
  297.  
  298.