Back to index

lightning-sunbird  0.9+nobinonly
Dialogs.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: Mozilla-sample-code 1.0
00004  *
00005  * Copyright (c) 2002 Netscape Communications Corporation and
00006  * other contributors
00007  *
00008  * Permission is hereby granted, free of charge, to any person obtaining a
00009  * copy of this Mozilla sample software and associated documentation files
00010  * (the "Software"), to deal in the Software without restriction, including
00011  * without limitation the rights to use, copy, modify, merge, publish,
00012  * distribute, sublicense, and/or sell copies of the Software, and to permit
00013  * persons to whom the Software is furnished to do so, subject to the
00014  * following conditions:
00015  *
00016  * The above copyright notice and this permission notice shall be included
00017  * in all copies or substantial portions of the Software.
00018  *
00019  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00020  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00021  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00022  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00023  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00024  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00025  * DEALINGS IN THE SOFTWARE.
00026  *
00027  * Contributor(s):
00028  *   Chak Nanga <chak@netscape.com>
00029  *
00030  * ***** END LICENSE BLOCK ***** */
00031 
00032 #ifndef _DIALOGS_H_
00033 #define _DIALOGS_H_
00034 
00035 #include "resource.h"
00036 
00037 class CPromptDialog : public CDialog
00038 {
00039 public:
00040     CPromptDialog(CWnd* pParent, const TCHAR* pTitle, const TCHAR* pText,
00041                   const TCHAR* pInitPromptText,
00042                   BOOL bHasCheck, const TCHAR* pCheckText, int initCheckVal);
00043        
00044        // Dialog Data
00045     enum { IDD = IDD_PROMPT_DIALOG };
00046     CString m_csPromptAnswer;
00047 
00048     CString m_csDialogTitle;
00049        CString m_csPromptText;
00050        BOOL m_bHasCheckBox;
00051        CString m_csCheckBoxText;
00052        int m_bCheckBoxValue;
00053     
00054        // ClassWizard generated virtual function overrides
00055        //{{AFX_VIRTUAL(CPromptDialog)
00056        protected:
00057     virtual void DoDataExchange(CDataExchange* pDX);
00058        //}}AFX_VIRTUAL
00059 
00060        //{{AFX_MSG(CPromptDialog)
00061        virtual BOOL OnInitDialog();
00062        //}}AFX_MSG
00063     DECLARE_MESSAGE_MAP()
00064 };
00065 
00066 class CPromptPasswordDialog : public CDialog
00067 {
00068 public:
00069     CPromptPasswordDialog(CWnd* pParent, const TCHAR* pTitle, const TCHAR* pText,
00070                           const TCHAR* pInitPasswordText,
00071                           BOOL bHasCheck, const TCHAR* pCheckText, int initCheckVal);
00072        
00073        // Dialog Data
00074     enum { IDD = IDD_PROMPT_PASSWORD_DIALOG };
00075 
00076     CString m_csDialogTitle;
00077        CString m_csPromptText;
00078        CString m_csPassword;
00079        BOOL m_bHasCheckBox;
00080        CString m_csCheckBoxText;
00081        int m_bCheckBoxValue;
00082 
00083        // ClassWizard generated virtual function overrides
00084        //{{AFX_VIRTUAL(CPromptPasswordDialog)           
00085        protected:
00086     virtual void DoDataExchange(CDataExchange* pDX);
00087        //}}AFX_VIRTUAL
00088 
00089        //{{AFX_MSG(CPromptPasswordDialog)
00090        virtual BOOL OnInitDialog();
00091        //}}AFX_MSG
00092     DECLARE_MESSAGE_MAP()
00093 };
00094 
00095 class CPromptUsernamePasswordDialog : public CDialog
00096 {
00097 public:
00098     CPromptUsernamePasswordDialog(CWnd* pParent, const TCHAR* pTitle, const TCHAR* pText,
00099                                   const TCHAR* pInitUsername, const TCHAR* pInitPassword, 
00100                                         BOOL bHasCheck, const TCHAR* pCheckText, int initCheckVal);
00101        
00102        // Dialog Data
00103     enum { IDD = IDD_PROMPT_USERPASS_DIALOG };
00104 
00105     CString m_csDialogTitle;
00106        CString m_csPromptText;
00107        CString m_csUserNameLabel;
00108        CString m_csPasswordLabel;
00109        CString m_csPassword;
00110        CString m_csUserName;
00111        BOOL m_bHasCheckBox;
00112        CString m_csCheckBoxText;
00113        int m_bCheckBoxValue;
00114 
00115        // ClassWizard generated virtual function overrides
00116        //{{AFX_VIRTUAL(CPromptUsernamePasswordDialog)   
00117        protected:
00118     virtual void DoDataExchange(CDataExchange* pDX);
00119        //}}AFX_VIRTUAL
00120 
00121        //{{AFX_MSG(CPromptUsernamePasswordDialog)
00122        virtual BOOL OnInitDialog();
00123        //}}AFX_MSG
00124 
00125     DECLARE_MESSAGE_MAP()
00126 };
00127 
00128 class CAlertCheckDialog : public CDialog
00129 {
00130 public:
00131     CAlertCheckDialog(CWnd* pParent, const TCHAR* pTitle, const TCHAR* pText,
00132                   const TCHAR* pCheckText, int initCheckVal);
00133        
00134     // Dialog Data
00135     enum { IDD = IDD_ALERT_CHECK_DIALOG };
00136 
00137     CString m_csDialogTitle;
00138     CString m_csMsgText;
00139     CString m_csCheckBoxText;
00140     int m_bCheckBoxValue;
00141     
00142     // ClassWizard generated virtual function overrides
00143     //{{AFX_VIRTUAL(CAlertCheckDialog)
00144     protected:
00145     virtual void DoDataExchange(CDataExchange* pDX);
00146     //}}AFX_VIRTUAL
00147 
00148     //{{AFX_MSG(CAlertCheckDialog)
00149     virtual BOOL OnInitDialog();
00150     //}}AFX_MSG
00151 
00152     DECLARE_MESSAGE_MAP()
00153 };
00154 
00155 class CConfirmCheckDialog : public CDialog
00156 {
00157 public:
00158     CConfirmCheckDialog(CWnd* pParent, const TCHAR* pTitle, const TCHAR* pText,
00159                   const TCHAR* pCheckText, int initCheckVal,
00160                   const TCHAR *pBtn1Text, const TCHAR *pBtn2Text, 
00161                   const TCHAR *pBtn3Text);
00162        
00163     // Dialog Data
00164     enum { IDD = IDD_CONFIRM_CHECK_DIALOG };
00165 
00166     CString m_csDialogTitle;
00167     CString m_csMsgText;
00168     CString m_csCheckBoxText;
00169     int m_bCheckBoxValue;
00170     CString m_csBtn1Text;
00171     CString m_csBtn2Text;
00172     CString m_csBtn3Text;
00173 
00174     // ClassWizard generated virtual function overrides
00175     //{{AFX_VIRTUAL(CConfirmCheckDialog)
00176     protected:
00177     virtual void DoDataExchange(CDataExchange* pDX);
00178     //}}AFX_VIRTUAL
00179 
00180     //{{AFX_MSG(CConfirmCheckDialog)
00181     virtual BOOL OnInitDialog();
00182     afx_msg void OnBtn1Clicked();
00183     afx_msg void OnBtn2Clicked();
00184     afx_msg void OnBtn3Clicked();
00185     //}}AFX_MSG
00186 
00187     DECLARE_MESSAGE_MAP()
00188 };
00189 
00190 #endif //_DIALOG_H_