X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6762286db6cf974817dead5b88bebf0e390dbb7e..be7e10393ae37a8b6395c50ac258c2c77c98c946:/include/wx/osx/dialog.h diff --git a/include/wx/osx/dialog.h b/include/wx/osx/dialog.h index 351f6b8aee..77427be8b4 100644 --- a/include/wx/osx/dialog.h +++ b/include/wx/osx/dialog.h @@ -50,11 +50,13 @@ public: // virtual bool Destroy(); virtual bool Show(bool show = true); - void SetModal(bool flag); + // return true if we're showing the dialog modally virtual bool IsModal() const; - // For now, same as Show(TRUE) but returns return code + // show the dialog modally and return the value passed to EndModal() virtual int ShowModal(); + + virtual void ShowWindowModal(); // may be called to terminate the dialog with the given return code virtual void EndModal(int retCode); @@ -62,17 +64,29 @@ public: // implementation // -------------- + 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(); + + // show modal dialog and enter modal loop + void DoShowWindowModal(); -protected: // mac also takes command-period as cancel virtual bool IsEscapeKey(const wxKeyEvent& event); + // needed for cleanup on the Cocoa side. + void EndWindowModal(); + + wxDialogModality m_modality; + private: void Init(); - - bool m_isModalStyle; }; #endif