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: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org Code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 2001
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Chak Nanga <chak@netscape.com>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #ifndef _DIALOGS_H_
00040 #define _DIALOGS_H_
00041 
00042 #include "resource.h"
00043 
00044 class CPromptDialog : public CDialog
00045 {
00046 public:
00047     CPromptDialog(CWnd* pParent, const char* pTitle, const char* pText,
00048                   const char* pInitPromptText,
00049                   BOOL bHasCheck, const char* pCheckText, int initCheckVal);
00050        
00051        // Dialog Data
00052     enum { IDD = IDD_PROMPT_DIALOG };
00053     CString m_csPromptAnswer;
00054 
00055     CString m_csDialogTitle;
00056        CString m_csPromptText;
00057        BOOL m_bHasCheckBox;
00058        CString m_csCheckBoxText;
00059        int m_bCheckBoxValue;
00060     
00061        // ClassWizard generated virtual function overrides
00062        //{{AFX_VIRTUAL(CPromptDialog)
00063        protected:
00064     virtual void DoDataExchange(CDataExchange* pDX);
00065        //}}AFX_VIRTUAL
00066 
00067        //{{AFX_MSG(CPromptDialog)
00068        virtual BOOL OnInitDialog();
00069        //}}AFX_MSG
00070     DECLARE_MESSAGE_MAP()
00071 };
00072 
00073 class CPromptPasswordDialog : public CDialog
00074 {
00075 public:
00076     CPromptPasswordDialog(CWnd* pParent, const char* pTitle, const char* pText,
00077                           const char* pInitPasswordText,
00078                           BOOL bHasCheck, const char* pCheckText, int initCheckVal);
00079        
00080        // Dialog Data
00081     enum { IDD = IDD_PROMPT_PASSWORD_DIALOG };
00082 
00083     CString m_csDialogTitle;
00084        CString m_csPromptText;
00085        CString m_csPassword;
00086        BOOL m_bHasCheckBox;
00087        CString m_csCheckBoxText;
00088        int m_bCheckBoxValue;
00089 
00090        // ClassWizard generated virtual function overrides
00091        //{{AFX_VIRTUAL(CPromptPasswordDialog)           
00092        protected:
00093     virtual void DoDataExchange(CDataExchange* pDX);
00094        //}}AFX_VIRTUAL
00095 
00096        //{{AFX_MSG(CPromptPasswordDialog)
00097        virtual BOOL OnInitDialog();
00098        //}}AFX_MSG
00099     DECLARE_MESSAGE_MAP()
00100 };
00101 
00102 class CPromptUsernamePasswordDialog : public CDialog
00103 {
00104 public:
00105     CPromptUsernamePasswordDialog(CWnd* pParent, const char* pTitle, const char* pText,
00106                                   const char* pInitUsername, const char* pInitPassword, 
00107                                         BOOL bHasCheck, const char* pCheckText, int initCheckVal);
00108        
00109        // Dialog Data
00110     enum { IDD = IDD_PROMPT_USERPASS_DIALOG };
00111 
00112     CString m_csDialogTitle;
00113        CString m_csPromptText;
00114        CString m_csUserNameLabel;
00115        CString m_csPasswordLabel;
00116        CString m_csPassword;
00117        CString m_csUserName;
00118        BOOL m_bHasCheckBox;
00119        CString m_csCheckBoxText;
00120        int m_bCheckBoxValue;
00121 
00122        // ClassWizard generated virtual function overrides
00123        //{{AFX_VIRTUAL(CPromptUsernamePasswordDialog)   
00124        protected:
00125     virtual void DoDataExchange(CDataExchange* pDX);
00126        //}}AFX_VIRTUAL
00127 
00128        //{{AFX_MSG(CPromptUsernamePasswordDialog)
00129        virtual BOOL OnInitDialog();
00130        //}}AFX_MSG
00131 
00132     DECLARE_MESSAGE_MAP()
00133 };
00134 
00135 class CAlertCheckDialog : public CDialog
00136 {
00137 public:
00138     CAlertCheckDialog(CWnd* pParent, const char* pTitle, const char* pText,
00139                   const char* pCheckText, int initCheckVal);
00140        
00141     // Dialog Data
00142     enum { IDD = IDD_ALERT_CHECK_DIALOG };
00143 
00144     CString m_csDialogTitle;
00145     CString m_csMsgText;
00146     CString m_csCheckBoxText;
00147     int m_bCheckBoxValue;
00148     
00149     // ClassWizard generated virtual function overrides
00150     //{{AFX_VIRTUAL(CAlertCheckDialog)
00151     protected:
00152     virtual void DoDataExchange(CDataExchange* pDX);
00153     //}}AFX_VIRTUAL
00154 
00155     //{{AFX_MSG(CAlertCheckDialog)
00156     virtual BOOL OnInitDialog();
00157     //}}AFX_MSG
00158 
00159     DECLARE_MESSAGE_MAP()
00160 };
00161 
00162 class CConfirmCheckDialog : public CDialog
00163 {
00164 public:
00165     CConfirmCheckDialog(CWnd* pParent, const char* pTitle, const char* pText,
00166                   const char* pCheckText, int initCheckVal,
00167                   const char *pBtn1Text, const char *pBtn2Text, 
00168                   const char *pBtn3Text);
00169        
00170     // Dialog Data
00171     enum { IDD = IDD_CONFIRM_CHECK_DIALOG };
00172 
00173     CString m_csDialogTitle;
00174     CString m_csMsgText;
00175     CString m_csCheckBoxText;
00176     int m_bCheckBoxValue;
00177     CString m_csBtn1Text;
00178     CString m_csBtn2Text;
00179     CString m_csBtn3Text;
00180 
00181     // ClassWizard generated virtual function overrides
00182     //{{AFX_VIRTUAL(CConfirmCheckDialog)
00183     protected:
00184     virtual void DoDataExchange(CDataExchange* pDX);
00185     //}}AFX_VIRTUAL
00186 
00187     //{{AFX_MSG(CConfirmCheckDialog)
00188     virtual BOOL OnInitDialog();
00189     afx_msg void OnBtn1Clicked();
00190     afx_msg void OnBtn2Clicked();
00191     afx_msg void OnBtn3Clicked();
00192     //}}AFX_MSG
00193 
00194     DECLARE_MESSAGE_MAP()
00195 };
00196 
00197 #endif //_DIALOG_H_