Get ShowWindowModal behavior working under OS X Cocoa for file, dir and message dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2010-01-28 04:06:23 +00:00
parent 896576e31e
commit bfa92264c0
10 changed files with 312 additions and 182 deletions

View File

@@ -55,6 +55,8 @@ WXDLLIMPEXP_BASE wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef add
WXDLLIMPEXP_BASE OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef );
WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname );
class WXDLLIMPEXP_FWD_CORE wxDialog;
//
//
//
@@ -346,8 +348,10 @@ protected :
{
BOOL sheetFinished;
int resultCode;
wxDialog* impl;
}
- (void)setImplementation: (wxDialog *)dialog;
- (BOOL)finished;
- (int)code;
- (void)waitForSheetToFinish;

View File

@@ -66,6 +66,10 @@ public:
wxDialogModality GetModality() const;
#if wxOSX_USE_COCOA
virtual void ModalFinishedCallback(void* WXUNUSED(panel), int WXUNUSED(returnCode)) {}
#endif
protected:
// show modal dialog and enter modal loop
void DoShowModal();
@@ -79,10 +83,10 @@ protected:
// needed for cleanup on the Cocoa side.
void EndWindowModal();
wxDialogModality m_modality;
private:
void Init();
wxDialogModality m_modality;
};
#endif

View File

@@ -24,6 +24,11 @@ public:
const wxString& name = wxDirDialogNameStr);
virtual int ShowModal();
#if wxOSX_USE_COCOA
virtual void ShowWindowModal();
virtual void ModalFinishedCallback(void* panel, int returnCode);
#endif
protected:

View File

@@ -38,6 +38,11 @@ public:
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
virtual int ShowModal();
#if wxOSX_USE_COCOA
virtual void ShowWindowModal();
virtual void ModalFinishedCallback(void* panel, int resultCode);
#endif
protected:
// not supported for file dialog, RR

View File

@@ -23,6 +23,11 @@ public:
const wxPoint& pos = wxDefaultPosition);
virtual int ShowModal();
#if wxOSX_USE_COCOA
virtual void ShowWindowModal();
virtual void ModalFinishedCallback(void* panel, int resultCode);
#endif
protected:
// not supported for message dialog
@@ -30,6 +35,13 @@ protected:
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
#if wxOSX_USE_COCOA
void* ConstructNSAlert();
#endif
int m_buttonId[3];
int m_buttonCount;
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
};