home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / dialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  8.9 KB  |  345 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 _DIALOG_H_
  20. #define _DIALOG_H_
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CDialogURL dialog
  24.  
  25. class FAR CDialogURL : public CDialog
  26. {
  27.  
  28. protected:
  29.     MWContext * m_Context;
  30.  
  31. public:
  32.     CDialogURL(CWnd *pParent, MWContext * context = NULL);
  33.     void SetContext(MWContext * context) {m_Context = context;}
  34.  
  35.     enum { IDD = IDD_OPENURL_BOX };
  36.  
  37.     CString m_csURL;
  38.  
  39. // Implementation
  40. protected:
  41.     CWnd      * m_Parent;
  42.  
  43.     virtual void OnOK();
  44.     
  45.     afx_msg void OnBrowseForFile();
  46.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  47.     // Generated message map functions
  48.     //{{AFX_MSG(CDialogURL)
  49.     // NOTE: the ClassWizard will add member functions here
  50.         afx_msg void OnHelp();
  51.     //}}AFX_MSG
  52.  
  53.     BOOL OnInitDialog();
  54.     DECLARE_MESSAGE_MAP()
  55. };
  56.  
  57.  
  58. /////////////////////////////////////////////////////////////////////////////
  59. /////////////////////////////////////////////////////////////////////////////
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CDialogLicense dialog
  62.  
  63. class FAR CDialogLicense : public CDialog
  64. {
  65. // Construction
  66. public:
  67.     CDialogLicense(CWnd* pParent = NULL);   // standard constructor
  68.     int DoModal();
  69.  
  70. // Dialog Data
  71.     enum { IDD = IDD_LICENSE };
  72.  
  73. // Text Font
  74.     CFont m_cfTextFont;
  75. // Implementation
  76. protected:
  77.     afx_msg int  OnInitDialog();
  78.     DECLARE_MESSAGE_MAP()
  79. };
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. /////////////////////////////////////////////////////////////////////////////
  83. /////////////////////////////////////////////////////////////////////////////
  84. // CDialogSecurity dialog
  85.  
  86. class FAR CDialogSecurity : public CDialog
  87. {
  88. // Construction
  89. public: 
  90.     int m_Type;
  91.     XP_Bool *returnpref;
  92.     CDialogSecurity(int myType, XP_Bool *returnPref, CWnd* pParent = NULL);   // standard constructor
  93.     int DoModal();
  94.  
  95. // Dialog Data
  96.     enum { IDD = IDD_SECURITY };
  97.  
  98. // Implementation
  99. protected:
  100.     afx_msg int  OnInitDialog();
  101.     afx_msg void OnOK();
  102.     DECLARE_MESSAGE_MAP()
  103. };
  104.  
  105. /////////////////////////////////////////////////////////////////////////////
  106. /////////////////////////////////////////////////////////////////////////////
  107. /////////////////////////////////////////////////////////////////////////////
  108. // CDialogPRMT dialog
  109.  
  110. class FAR CDialogPRMT : public CDialog
  111. {
  112. protected:
  113.     CString m_csCaption;
  114.  
  115. // Construction
  116. public:
  117.     CDialogPRMT(CWnd* pParent = NULL);  // standard constructor
  118.     char * DoModal(const char * Msg, const char * Dflt, const char *pszCaption = NULL);
  119.  
  120.     void SetSecureTitle( CString &csTitle ) { m_csTitle = csTitle; }
  121.     
  122. // Dialog Data
  123.     //{{AFX_DATA(CDialogPRMT)
  124.     enum { IDD = IDD_PROMPT };
  125.     CString m_csAsk;
  126.     CString m_csAns;
  127.     //}}AFX_DATA
  128.  
  129.     CString m_csTitle;
  130.     
  131. // Implementation
  132. protected:
  133.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  134.     afx_msg int  OnInitDialog();
  135.     DECLARE_MESSAGE_MAP()
  136. };
  137.  
  138. /////////////////////////////////////////////////////////////////////////////
  139. /////////////////////////////////////////////////////////////////////////////
  140. /////////////////////////////////////////////////////////////////////////////
  141. // CDialogPASS dialog
  142.  
  143. class FAR CDialogPASS : public CDialog
  144. {
  145. // Construction
  146. public:
  147.     CDialogPASS(CWnd* pParent = NULL);  // standard constructor
  148.     char * DoModal(const char * Msg);
  149.  
  150.     void SetSecureTitle( CString &csTitle ) { m_csTitle = csTitle; }
  151.     
  152. // Dialog Data
  153.     //{{AFX_DATA(CDialogPASS)
  154.     enum { IDD = IDD_PROMPT_PASSWD };
  155.     CString m_csAsk;
  156.     CString m_csAns;
  157.     //}}AFX_DATA
  158.  
  159.     CString m_csTitle;
  160.     
  161. // Implementation
  162. protected:
  163.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  164.     BOOL OnInitDialog();
  165.  
  166.     // Generated message map functions
  167.     //{{AFX_MSG(CDialogPASS)
  168.         // NOTE: the ClassWizard will add member functions here
  169.     //}}AFX_MSG
  170.     DECLARE_MESSAGE_MAP()
  171. };
  172.  
  173. /////////////////////////////////////////////////////////////////////////////
  174. // CDialogUPass dialog
  175.  
  176. class CDialogUPass : public CDialog
  177. {
  178. // Construction
  179. public:
  180.     CDialogUPass(CWnd* pParent = NULL);    // standard constructor
  181.     int DoModal(char * message, char ** user, char ** passwd);
  182.  
  183.     void SetSecureTitle( CString &csTitle ) { m_csTitle = csTitle; }
  184.     
  185. // Dialog Data
  186.     //{{AFX_DATA(CDialogUPass)
  187.     enum { IDD = IDD_USERPASS };
  188.         // NOTE: the ClassWizard will add data members here
  189.     //}}AFX_DATA
  190.  
  191.     CString m_csTitle;
  192.     
  193. // Implementation
  194. protected:
  195.  
  196.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  197.     
  198.     CString m_csUser, m_csPasswd, m_csMessage;
  199.  
  200.     // Generated message map functions
  201.     //{{AFX_MSG(CDialogUPass)
  202.         // NOTE: the ClassWizard will add member functions here
  203.     //}}AFX_MSG
  204.     afx_msg int  OnInitDialog();    
  205.     DECLARE_MESSAGE_MAP()
  206. };
  207.  
  208. /////////////////////////////////////////////////////////////////////////////
  209. // CUnknownTypeDlg dialog
  210.  
  211. class CUnknownTypeDlg : public CDialog
  212. {
  213. // Construction
  214. public:
  215.     CUnknownTypeDlg(CWnd* pParent = NULL, char * filetype = NULL, CHelperApp * app = NULL);    
  216.  
  217. // Dialog Data
  218.     //{{AFX_DATA(CUnknownTypeDlg)
  219.     enum { IDD = IDD_UNKNOWNTYPE };
  220.     CString    m_FileType;
  221.     //}}AFX_DATA
  222.     CHelperApp * m_app;
  223.  
  224. // Implementation
  225. protected:
  226.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  227.  
  228.     // Generated message map functions
  229.     //{{AFX_MSG(CUnknownTypeDlg)
  230.     afx_msg void OnConfigureviewer();
  231.     afx_msg void OnSavetodisk();
  232.     afx_msg void OnMoreInfo();
  233.     virtual void OnCancel();
  234.     //}}AFX_MSG
  235.     DECLARE_MESSAGE_MAP()
  236. };
  237.  
  238. /////////////////////////////////////////////////////////////////////////////
  239. // CNewMimeType dialog
  240.  
  241. class CNewMimeType : public CDialog
  242. {
  243. // Construction
  244. public:
  245.     CNewMimeType(CWnd* pParent = NULL);    // standard constructor
  246.  
  247. // Dialog Data
  248.     //{{AFX_DATA(CNewMimeType)
  249.     enum { IDD = IDD_NEWMIMETYPE };
  250.     CString    m_MimeSubtype;
  251.     CString    m_MimeType;
  252.     //}}AFX_DATA
  253.  
  254. // Implementation
  255. protected:
  256.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  257.  
  258.     // Generated message map functions
  259.     //{{AFX_MSG(CNewMimeType)
  260.         // NOTE: the ClassWizard will add member functions here
  261.     //}}AFX_MSG
  262.     DECLARE_MESSAGE_MAP()
  263. };
  264.  
  265.  
  266. /////////////////////////////////////////////////////////////////////////////
  267. // CConfigureViewerSmall dialog
  268.  
  269. class CConfigureViewerSmall : public CDialog
  270. {
  271. // Construction
  272. public:
  273.     CConfigureViewerSmall(CWnd* pParent = NULL, const char * filetype = NULL,CHelperApp * app = NULL);
  274.  
  275. // Dialog Data
  276.     //{{AFX_DATA(CConfigureViewerSmall)
  277.     enum { IDD = IDD_CONFIGUREVIEWER_SMALL };
  278.     CString    m_MimeType;    
  279.     CString    m_AppName;
  280.     //}}AFX_DATA
  281.     CHelperApp * m_app;
  282.     
  283. // Implementation
  284. protected:
  285.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  286.  
  287.     // Generated message map functions
  288.     //{{AFX_MSG(CConfigureViewerSmall)
  289.     afx_msg void OnHelperBrowse();
  290.     //}}AFX_MSG
  291.     DECLARE_MESSAGE_MAP()
  292. };
  293.  
  294.  
  295. /****************************************************************************
  296. *
  297. *    Class: CDefaultBrowserDlg
  298. *
  299. *    DESCRIPTION:
  300. *        This provides a dialog for notifying the user that another application
  301. *        has made themselves the "default browser" by changing our registry
  302. *        entries.
  303. *
  304. ****************************************************************************/
  305.  
  306. #define CDefaultBrowserDlgBase    CDialog
  307.  
  308. class  CDefaultBrowserDlg : public  CDefaultBrowserDlgBase
  309. {
  310.     public:
  311.         CDefaultBrowserDlg(CWnd* pParent = NULL);
  312.          
  313.     // Dialog Data
  314.     //{{AFX_DATA(CDefaultBrowserDlg)
  315.     enum { IDD = IDD_DEFAULT_BROWSER };
  316.     BOOL    m_bIgnore;
  317.     CListBox    m_Listbox;
  318.     //}}AFX_DATA
  319.         
  320.     // Overrides
  321.     // ClassWizard generated virtual function overrides
  322.     //{{AFX_VIRTUAL(CDefaultBrowserDlg)
  323.     protected:
  324.         virtual void DoDataExchange(CDataExchange* pDX);
  325.         virtual BOOL OnInitDialog();
  326.         virtual void OnOK( );
  327.  
  328.     //}}AFX_VIRTUAL
  329.     
  330.     protected:
  331.     
  332.     // Generated message map functions
  333.     //{{AFX_MSG(CDefaultBrowserDlg)
  334.     afx_msg void OnNo();
  335.     afx_msg void OnPaint();
  336.     //}}AFX_MSG
  337.     
  338.     
  339.     DECLARE_MESSAGE_MAP()
  340.  
  341. }; // END OF CLASS  CDefaultBrowserDlg()
  342.  
  343.  
  344. #endif /* _DIALOG_H_ */
  345.