2007-11-09 13:11:17 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/cocoa/msgdlg.h
|
2007-11-09 13:11:17 -05:00
|
|
|
// Purpose: wxMessageDialog class
|
|
|
|
// Author: Gareth Simpson
|
|
|
|
// Created: 2007-10-29
|
2007-11-09 13:58:47 -05:00
|
|
|
// RCS-ID: $Id$
|
2007-11-09 13:11:17 -05:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_COCOA_MSGDLG_H_
|
|
|
|
#define _WX_COCOA_MSGDLG_H_
|
|
|
|
|
|
|
|
#include "wx/msgdlg.h"
|
|
|
|
|
|
|
|
DECLARE_WXCOCOA_OBJC_CLASS(NSAlert);
|
|
|
|
|
2007-11-09 13:26:21 -05:00
|
|
|
#ifndef wxUSE_COCOA_NATIVE_MSGDLG
|
|
|
|
// trunk: Always use Cocoa dialog
|
|
|
|
// 2.8: Only use Cocoa dialog if ABI incompatible features is on
|
|
|
|
// Build both on both branches (there was no wxCocoaMessageDialog class so it's not an ABI issue)
|
|
|
|
#if 1/* wxUSE_ABI_INCOMPATIBLE_FEATURES */
|
|
|
|
#define wxUSE_COCOA_NATIVE_MSGDLG 1
|
|
|
|
#else
|
|
|
|
#define wxUSE_COCOA_NATIVE_MSGDLG 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2007-11-09 14:02:06 -05:00
|
|
|
#if wxUSE_COCOA_NATIVE_MSGDLG
|
2007-11-09 13:26:21 -05:00
|
|
|
#define wxMessageDialog wxCocoaMessageDialog
|
|
|
|
#else
|
2008-09-05 10:39:36 -04:00
|
|
|
#include "wx/generic/msgdlgg.h"
|
|
|
|
|
2007-11-09 13:26:21 -05:00
|
|
|
#define wxMessageDialog wxGenericMessageDialog
|
|
|
|
#endif
|
2007-11-09 13:11:17 -05:00
|
|
|
|
2008-09-05 10:39:36 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxCocoaMessageDialog
|
|
|
|
// ----------------------------------------------------------------------------
|
2007-11-09 13:11:17 -05:00
|
|
|
|
|
|
|
|
2008-09-05 10:39:36 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxCocoaMessageDialog
|
|
|
|
: public wxMessageDialogWithCustomLabels
|
2007-11-09 13:11:17 -05:00
|
|
|
{
|
|
|
|
public:
|
2007-11-09 13:26:21 -05:00
|
|
|
wxCocoaMessageDialog(wxWindow *parent,
|
2007-11-09 13:11:17 -05:00
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption = wxMessageBoxCaptionStr,
|
|
|
|
long style = wxOK|wxCENTRE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition);
|
|
|
|
|
2007-11-09 13:58:47 -05:00
|
|
|
virtual int ShowModal();
|
|
|
|
|
2007-11-09 13:11:17 -05:00
|
|
|
protected:
|
|
|
|
// not supported for message dialog
|
|
|
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
|
|
|
int WXUNUSED(width), int WXUNUSED(height),
|
|
|
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
2007-11-09 13:58:47 -05:00
|
|
|
|
2008-09-05 10:39:36 -04:00
|
|
|
// override wxMessageDialogWithCustomLabels method to get rid of
|
|
|
|
// accelerators in the custom label strings
|
|
|
|
//
|
|
|
|
// VZ: I have no idea _why_ do we do this but the old version did and
|
|
|
|
// I didn't want to change the existing behaviour
|
2008-09-05 14:02:49 -04:00
|
|
|
virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label);
|
2007-11-09 13:11:17 -05:00
|
|
|
|
2008-09-05 10:39:36 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxCocoaMessageDialog);
|
2007-11-09 13:11:17 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_MSGDLG_H_
|
2004-10-07 04:53:48 -04:00
|
|
|
|