]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/msgdlg.h
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / include / wx / cocoa / msgdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/msgdlg.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
14 DECLARE_WXCOCOA_OBJC_CLASS(NSAlert);
15
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 wxUSE_COCOA_NATIVE_MSGDLG
28 #define wxMessageDialog wxCocoaMessageDialog
29 #else
30 #include "wx/generic/msgdlgg.h"
31
32 #define wxMessageDialog wxGenericMessageDialog
33 #endif
34
35 // ----------------------------------------------------------------------------
36 // wxCocoaMessageDialog
37 // ----------------------------------------------------------------------------
38
39
40 class WXDLLIMPEXP_CORE wxCocoaMessageDialog
41 : public wxMessageDialogWithCustomLabels
42 {
43 public:
44 wxCocoaMessageDialog(wxWindow *parent,
45 const wxString& message,
46 const wxString& caption = wxMessageBoxCaptionStr,
47 long style = wxOK|wxCENTRE,
48 const wxPoint& pos = wxDefaultPosition);
49
50 virtual int ShowModal();
51
52 protected:
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) {}
57
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
63 virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label);
64
65 DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog)
66 wxDECLARE_NO_COPY_CLASS(wxCocoaMessageDialog);
67 };
68
69 #endif // _WX_MSGDLG_H_
70