• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_Dlg_MessageBox.h

Go to the documentation of this file.
00001 /* AbiSource Application Framework
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef XAP_DIALOG_MESSAGEBOX_H
00021 #define XAP_DIALOG_MESSAGEBOX_H
00022 
00023 #include "xap_Dialog.h"
00024 #include "xap_Strings.h"
00025 
00026 class ABI_EXPORT XAP_Dialog_MessageBox : public XAP_Dialog_NonPersistent
00027 {
00028 public:
00029     XAP_Dialog_MessageBox(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00030     virtual ~XAP_Dialog_MessageBox(void) ;
00031 
00032     virtual void                    runModal(XAP_Frame * pFrame) = 0;
00033 
00034     typedef enum { b_O, b_OC, b_YN, b_YNC }         tButtons;
00035     typedef enum { a_OK, a_CANCEL, a_YES, a_NO }    tAnswer;
00036 
00037     void                            setMessage(XAP_String_Id id, ...);
00038     void                            setMessage(const char * sz, ...);
00039     void                            setSecondaryMessage(XAP_String_Id id, ...);
00040     void                            setSecondaryMessage(const char * sz, ...);
00041     void                            setButtons(XAP_Dialog_MessageBox::tButtons buttons);
00042     void                            setDefaultAnswer(XAP_Dialog_MessageBox::tAnswer answer);
00043     XAP_Dialog_MessageBox::tAnswer  getAnswer(void) const;
00044 
00045 protected:
00046     char *                          m_szMessage;
00047     char *                          m_szSecondaryMessage;
00048     XAP_Dialog_MessageBox::tButtons m_buttons;
00049     XAP_Dialog_MessageBox::tAnswer  m_defaultAnswer;
00050     XAP_Dialog_MessageBox::tAnswer  m_answer;
00051 };
00052 
00053 #endif /* XAP_DIALOG_MESSAGEBOX_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1