include/ax/ax_messagebox.h

Go to the documentation of this file.
00001 
00002 // Name:        ax_messagebox.h
00003 // Purpose:     An accessible message box implementation
00004 // Author:      Julian Smart
00005 // Modified by: 
00006 // Created:     12/11/05 13:05:56
00007 // RCS-ID:
00008 // Copyright:   (c) Julian Smart
00009 // Licence:     New BSD License
00011 
00012 #ifndef _AX_MESSAGEBOX_H_
00013 #define _AX_MESSAGEBOX_H_
00014 
00015 #include "wx/dialog.h"
00016 
00017 #include "ax/ax_ui_adaptation.h"
00018 
00019 #define wxYES_TO_ALL        0x00100000
00020 #define wxNO_TO_ALL         0x00200000
00021 #define wxDISPLAY_NEXT_TIME 0x00400000
00022 
00029 class AxMessageDialog: public wxDialog
00030 {    
00031     DECLARE_DYNAMIC_CLASS( AxMessageDialog )
00032     DECLARE_EVENT_TABLE()
00033 
00034 public:
00036     AxMessageDialog( );
00037     AxMessageDialog( wxWindow* parent, const wxString& message, const wxString& caption = _("Message"), int style = wxOK, const wxPoint& pos = wxDefaultPosition );
00038 
00040     bool Create( wxWindow* parent, const wxString& message, const wxString& caption = _("Message"), int style = wxOK, const wxPoint& pos = wxDefaultPosition );
00041 
00043     void CreateControls();
00044 
00046     void SetYesLabel(const wxString& text) { m_yesLabel = text; }
00047     const wxString& GetYesLabel() const { return m_yesLabel; }
00048 
00050     void SetNoLabel(const wxString& text) { m_noLabel = text; }
00051     const wxString& GetNoLabel() const { return m_noLabel; }
00052 
00054     void OnYesClick( wxCommandEvent& event );
00055 
00057     void OnYestoallClick( wxCommandEvent& event );
00058 
00060     void OnNoClick( wxCommandEvent& event );
00061 
00063     void OnNotoallClick( wxCommandEvent& event );
00064 
00066     void OnOkClick( wxCommandEvent& event );
00067 
00069     void OnCancelClick( wxCommandEvent& event );
00070 
00071     wxString GetMessage() const { return m_message ; }
00072     void SetMessage(wxString value) { m_message = value ; }
00073 
00074     int GetMessageDialogStyle() const { return m_messageDialogStyle ; }
00075     void SetMessageDialogStyle(int value) { m_messageDialogStyle = value ; }
00076 
00077     bool GetDisplayNextTime() const { return m_displayNextTime ; }
00078     void SetDisplayNextTime(bool value) { m_displayNextTime = value ; }
00079 
00081     wxBitmap GetBitmapResource( const wxString& name );
00082 
00084     wxIcon GetIconResource( const wxString& name );
00085 
00087     static bool ShowToolTips();
00088 
00089     wxStaticBitmap*     m_staticBitmap;
00090     wxString            m_message;
00091     int                 m_messageDialogStyle;
00092     bool                m_displayNextTime;
00093 
00094     wxString            m_yesLabel;
00095     wxString            m_noLabel;
00096     AxSelfVoicing       m_adapter;
00097 };
00098 
00099 // Convenience dialog
00100 int AxMessageBox(const wxString& msg, const wxString& caption = _("Message"), int style = wxOK, wxWindow* parent = NULL);
00101 
00102 #endif
00103     // _AX_MESSAGEBOX_H_

Generated on Wed May 6 19:20:18 2009 for AxTk by  doxygen 1.5.1