]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/msgdlg.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / cocoa / msgdlg.h
CommitLineData
e9871aaf 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/cocoa/msgdlg.h
e9871aaf
DE
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
9a6ffa74 27#if wxUSE_COCOA_NATIVE_MSGDLG
c4f2b985
DE
28 #define wxMessageDialog wxCocoaMessageDialog
29#else
23e00c55
VZ
30 #include "wx/generic/msgdlgg.h"
31
c4f2b985
DE
32 #define wxMessageDialog wxGenericMessageDialog
33#endif
e9871aaf 34
23e00c55
VZ
35// ----------------------------------------------------------------------------
36// wxCocoaMessageDialog
37// ----------------------------------------------------------------------------
e9871aaf
DE
38
39
23e00c55
VZ
40class WXDLLIMPEXP_CORE wxCocoaMessageDialog
41 : public wxMessageDialogWithCustomLabels
e9871aaf 42{
e9871aaf 43public:
c4f2b985 44 wxCocoaMessageDialog(wxWindow *parent,
e9871aaf
DE
45 const wxString& message,
46 const wxString& caption = wxMessageBoxCaptionStr,
47 long style = wxOK|wxCENTRE,
48 const wxPoint& pos = wxDefaultPosition);
e9871aaf 49
e5633f9a
DE
50 virtual int ShowModal();
51
e9871aaf
DE
52protected:
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) {}
e5633f9a 57
23e00c55
VZ
58 // override wxMessageDialogWithCustomLabels method to get rid of
59 // accelerators in the custom label strings
60 //
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
e08931c0 63 virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label);
e9871aaf 64
23e00c55 65 DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog)
c0c133e1 66 wxDECLARE_NO_COPY_CLASS(wxCocoaMessageDialog);
e9871aaf
DE
67};
68
69#endif // _WX_MSGDLG_H_
dcb68102 70