1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/msgdlg.h
3 // Purpose: wxMessageDialog class
4 // Author: Gareth Simpson
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_COCOA_MSGDLG_H_
10 #define _WX_COCOA_MSGDLG_H_
12 #include "wx/msgdlg.h"
14 DECLARE_WXCOCOA_OBJC_CLASS(NSAlert
);
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
23 #define wxUSE_COCOA_NATIVE_MSGDLG 0
27 #if wxUSE_COCOA_NATIVE_MSGDLG
28 #define wxMessageDialog wxCocoaMessageDialog
30 #include "wx/generic/msgdlgg.h"
32 #define wxMessageDialog wxGenericMessageDialog
35 // ----------------------------------------------------------------------------
36 // wxCocoaMessageDialog
37 // ----------------------------------------------------------------------------
40 class WXDLLIMPEXP_CORE wxCocoaMessageDialog
41 : public wxMessageDialogWithCustomLabels
44 wxCocoaMessageDialog(wxWindow
*parent
,
45 const wxString
& message
,
46 const wxString
& caption
= wxMessageBoxCaptionStr
,
47 long style
= wxOK
|wxCENTRE
,
48 const wxPoint
& pos
= wxDefaultPosition
);
50 virtual int ShowModal();
53 // not supported for message dialog
54 virtual void DoSetSize(int WXUNUSED(x
), int WXUNUSED(y
),
55 int WXUNUSED(width
), int WXUNUSED(height
),
56 int WXUNUSED(sizeFlags
) = wxSIZE_AUTO
) {}
58 // override wxMessageDialogWithCustomLabels method to get rid of
59 // accelerators in the custom label strings
61 // VZ: I have no idea _why_ do we do this but the old version did and
62 // I didn't want to change the existing behaviour
63 virtual void DoSetCustomLabel(wxString
& var
, const ButtonLabel
& label
);
65 DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog
)
66 wxDECLARE_NO_COPY_CLASS(wxCocoaMessageDialog
);
69 #endif // _WX_MSGDLG_H_