]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/msgdlg.h
fixed wxSpinCtrl's client size computation in wxMSW to return something sensible
[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
e5633f9a 6// RCS-ID: $Id$
e9871aaf
DE
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
15DECLARE_WXCOCOA_OBJC_CLASS(NSAlert);
16
c4f2b985
DE
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
9a6ffa74
DE
28#include "wx/generic/msgdlgg.h"
29
30#if wxUSE_COCOA_NATIVE_MSGDLG
c4f2b985
DE
31 #define wxMessageDialog wxCocoaMessageDialog
32#else
c4f2b985
DE
33 #define wxMessageDialog wxGenericMessageDialog
34#endif
e9871aaf 35
e9871aaf
DE
36//-------------------------------------------------------------------------
37// wxMsgDialog
38//-------------------------------------------------------------------------
39
40
41
c4f2b985 42class WXDLLEXPORT wxCocoaMessageDialog: public wxMessageDialogBase
e9871aaf 43{
c4f2b985
DE
44 DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog)
45 DECLARE_NO_COPY_CLASS(wxCocoaMessageDialog)
e9871aaf
DE
46
47
48public:
c4f2b985 49 wxCocoaMessageDialog(wxWindow *parent,
e9871aaf
DE
50 const wxString& message,
51 const wxString& caption = wxMessageBoxCaptionStr,
52 long style = wxOK|wxCENTRE,
53 const wxPoint& pos = wxDefaultPosition);
e9871aaf 54
e5633f9a
DE
55 virtual ~wxCocoaMessageDialog();
56
57 virtual int ShowModal();
58
e9871aaf
DE
59 // customization of the message box
60 virtual bool SetYesNoLabels(const wxString& yes,const wxString& no);
61 virtual bool SetYesNoCancelLabels(const wxString& yes, const wxString& no, const wxString& cancel);
62 virtual bool SetOKLabel(const wxString& ok);
63 virtual bool SetOKCancelLabels(const wxString& ok, const wxString& cancel);
64
65protected:
66 // not supported for message dialog
67 virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
68 int WXUNUSED(width), int WXUNUSED(height),
69 int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
e5633f9a 70
e9871aaf 71private:
e5633f9a
DE
72 wxString m_yes,
73 m_no,
74 m_ok,
75 m_cancel;
e9871aaf
DE
76
77};
78
79#endif // _WX_MSGDLG_H_
dcb68102 80