2007-11-09 13:11:17 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/cocoa/dirdlg.h
|
|
|
|
// 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
|
|
|
#include "wx/generic/msgdlgg.h"
|
|
|
|
|
|
|
|
#if wxUSE_COCOA_NATIVE_MSGDLG
|
2007-11-09 13:26:21 -05:00
|
|
|
#define wxMessageDialog wxCocoaMessageDialog
|
|
|
|
#else
|
|
|
|
#define wxMessageDialog wxGenericMessageDialog
|
|
|
|
#endif
|
2007-11-09 13:11:17 -05:00
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// wxMsgDialog
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxCocoaMessageDialog: public wxMessageDialogBase
|
2007-11-09 13:11:17 -05:00
|
|
|
{
|
2007-11-09 13:26:21 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog)
|
|
|
|
DECLARE_NO_COPY_CLASS(wxCocoaMessageDialog)
|
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 ~wxCocoaMessageDialog();
|
|
|
|
|
|
|
|
virtual int ShowModal();
|
|
|
|
|
2007-11-09 13:11:17 -05:00
|
|
|
// customization of the message box
|
|
|
|
virtual bool SetYesNoLabels(const wxString& yes,const wxString& no);
|
|
|
|
virtual bool SetYesNoCancelLabels(const wxString& yes, const wxString& no, const wxString& cancel);
|
|
|
|
virtual bool SetOKLabel(const wxString& ok);
|
|
|
|
virtual bool SetOKCancelLabels(const wxString& ok, const wxString& cancel);
|
|
|
|
|
|
|
|
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
|
|
|
|
2007-11-09 13:11:17 -05:00
|
|
|
private:
|
2007-11-09 13:58:47 -05:00
|
|
|
wxString m_yes,
|
|
|
|
m_no,
|
|
|
|
m_ok,
|
|
|
|
m_cancel;
|
2007-11-09 13:11:17 -05:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_MSGDLG_H_
|
2004-10-07 04:53:48 -04:00
|
|
|
|