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