X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19193a2c85987b595932957e73013e7ea100f0e8..9f8845289521c7f53e95b6dfd8275daab8b05639:/include/wx/os2/dialog.h?ds=sidebyside diff --git a/include/wx/os2/dialog.h b/include/wx/os2/dialog.h index 49f5af72ec..89671430e9 100644 --- a/include/wx/os2/dialog.h +++ b/include/wx/os2/dialog.h @@ -16,6 +16,8 @@ WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr; +class WXDLLEXPORT wxDialogModalData; + // // Dialog boxes // @@ -41,7 +43,6 @@ public: { long lModalStyle = lStyle ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; - bModal = false; Create( pParent ,-1 ,rsTitle @@ -84,30 +85,19 @@ public: ); ~wxDialog(); - virtual bool Destroy(void); - virtual bool Show(bool bShow); - virtual void Iconize(bool bIconize); - virtual bool IsIconized(void) const; - - virtual bool IsTopLevel(void) const { return TRUE; } - - void SetModal(bool bFlag); + void SetModal(bool bFlag); virtual bool IsModal(void) const; - // // For now, same as Show(TRUE) but returns return code - // - virtual int ShowModal(void); - virtual void EndModal(int nRetCode); + virtual int ShowModal(); + + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); // // Returns TRUE if we're in a modal loop // - bool IsModalShowing() const; - -#if WXWIN_COMPATIBILITY - bool Iconized() const { return IsIconized(); }; -#endif + bool IsModalShowing() const; // // Implementation only from now on @@ -115,15 +105,15 @@ public: // // - // Event handlers + // Override some base class virtuals // - bool OnClose(void); - void OnCharHook(wxKeyEvent& rEvent); - void OnCloseWindow(wxCloseEvent& rEvent); + virtual bool Show(bool bShow); // - // May be called to terminate the dialog with the given return code + // Event handlers // + void OnCharHook(wxKeyEvent& rEvent); + void OnCloseWindow(wxCloseEvent& rEvent); // // Standard buttons @@ -144,17 +134,9 @@ public: ,WXWPARAM wParam ,WXLPARAM lParam ); + protected: // - // Override more base class virtuals - // - virtual void DoSetClientSize( int nWidth - ,int nHeight - ); - virtual void DoGetPosition( int* pnX - ,int* pnY - ) const; - // // Show modal dialog and enter modal loop // void DoShowModal(void); @@ -162,11 +144,14 @@ protected: // // Common part of all ctors // - void Init(); + void Init(void); private: wxWindow* m_pOldFocus; + // this pointer is non-NULL only while the modal event loop is running + wxDialogModalData *m_modalData; + // // While we are showing a modal dialog we disable the other windows using // this object