X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb896a322a2ed53d393ee738765ddd3f72cee004..e4277538a535d6d6c049f0b0ead9ed2b07cd93f2:/include/wx/cocoa/dialog.h diff --git a/include/wx/cocoa/dialog.h b/include/wx/cocoa/dialog.h index 142bcbbef4..d5b13e7cc6 100644 --- a/include/wx/cocoa/dialog.h +++ b/include/wx/cocoa/dialog.h @@ -6,7 +6,7 @@ // Created: 2002/12/15 // RCS-ID: $Id: // Copyright: David Elliott -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_COCOA_DIALOG_H_ @@ -17,7 +17,7 @@ #include "wx/panel.h" #include "wx/cocoa/NSPanel.h" -WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr; +WXDLLEXPORT_DATA(extern const wxChar) wxDialogNameStr[]; // ======================================================================== // wxDialog @@ -73,16 +73,19 @@ protected: // Cocoa specifics // ------------------------------------------------------------------------ protected: - virtual void Cocoa_close(void); + virtual void CocoaDelegate_windowWillClose(void); + virtual bool Cocoa_canBecomeMainWindow(bool &canBecome) + { canBecome = true; return true; } // ------------------------------------------------------------------------ // Implementation // ------------------------------------------------------------------------ public: - bool Show(bool show); + virtual bool Show(bool show = true); void SetModal(bool flag); - virtual bool IsModal() const; + virtual bool IsModal() const { return m_isModal; } + bool m_isModal; // For now, same as Show(TRUE) but returns return code virtual int ShowModal(); @@ -99,6 +102,10 @@ protected: void OnOK(wxCommandEvent& event); void OnApply(wxCommandEvent& event); void OnCancel(wxCommandEvent& event); + + // end either modal or modeless dialog + void EndDialog(int rc); + }; #endif // _WX_COCOA_DIALOG_H_