]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/msgdlg.h
Make new wxCocoaMessageDialog suitable for backport to 2.8.
[wxWidgets.git] / include / wx / cocoa / msgdlg.h
CommitLineData
e9871aaf
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/dirdlg.h
3// Purpose: wxMessageDialog class
4// Author: Gareth Simpson
5// Created: 2007-10-29
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef _WX_COCOA_MSGDLG_H_
10#define _WX_COCOA_MSGDLG_H_
11
12#include "wx/msgdlg.h"
13
14DECLARE_WXCOCOA_OBJC_CLASS(NSAlert);
15
c4f2b985
DE
16#ifndef wxUSE_COCOA_NATIVE_MSGDLG
17// trunk: Always use Cocoa dialog
18// 2.8: Only use Cocoa dialog if ABI incompatible features is on
19// Build both on both branches (there was no wxCocoaMessageDialog class so it's not an ABI issue)
20 #if 1/* wxUSE_ABI_INCOMPATIBLE_FEATURES */
21 #define wxUSE_COCOA_NATIVE_MSGDLG 1
22 #else
23 #define wxUSE_COCOA_NATIVE_MSGDLG 0
24 #endif
25#endif
26
27#if defined(__WX_COMPILING_COCOA_MSGDLG_MM__) || wxUSE_COCOA_NATIVE_MSGDLG
28 #define wxMessageDialog wxCocoaMessageDialog
29#else
30 #include "wx/generic/msgdlgg.h"
31 #define wxMessageDialog wxGenericMessageDialog
32#endif
e9871aaf 33
e9871aaf
DE
34//-------------------------------------------------------------------------
35// wxMsgDialog
36//-------------------------------------------------------------------------
37
38
39
c4f2b985 40class WXDLLEXPORT wxCocoaMessageDialog: public wxMessageDialogBase
e9871aaf 41{
c4f2b985
DE
42 DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog)
43 DECLARE_NO_COPY_CLASS(wxCocoaMessageDialog)
e9871aaf
DE
44
45
46public:
c4f2b985 47 wxCocoaMessageDialog(wxWindow *parent,
e9871aaf
DE
48 const wxString& message,
49 const wxString& caption = wxMessageBoxCaptionStr,
50 long style = wxOK|wxCENTRE,
51 const wxPoint& pos = wxDefaultPosition);
52
53 virtual ~wxCocoaMessageDialog();
54
55 virtual int ShowModal();
56
57 // customization of the message box
58 virtual bool SetYesNoLabels(const wxString& yes,const wxString& no);
59 virtual bool SetYesNoCancelLabels(const wxString& yes, const wxString& no, const wxString& cancel);
60 virtual bool SetOKLabel(const wxString& ok);
61 virtual bool SetOKCancelLabels(const wxString& ok, const wxString& cancel);
62
63protected:
64 // not supported for message dialog
65 virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
66 int WXUNUSED(width), int WXUNUSED(height),
67 int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
68
69private:
70 wxString m_yes,
71 m_no,
72 m_ok,
73 m_cancel;
74
75};
76
77#endif // _WX_MSGDLG_H_
dcb68102 78