X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8208e181cb576ec6cda37624923f95a59af43072..94e2ed3b8db0220160c0b939782cd46914ec073a:/include/wx/mac/dialog.h diff --git a/include/wx/mac/dialog.h b/include/wx/mac/dialog.h index d725df8d57..78d8942e7c 100644 --- a/include/wx/mac/dialog.h +++ b/include/wx/mac/dialog.h @@ -65,40 +65,36 @@ public: ~wxDialog(); virtual bool Destroy(); + bool Show(bool show); + void Iconize(bool iconize); + virtual bool IsIconized() const; - virtual void DoSetClientSize(int width, int height); + virtual bool IsTopLevel() const { return TRUE; } - virtual void GetPosition(int *x, int *y) const; + void SetModal(bool flag); + virtual bool IsModal() const; - bool Show(bool show); - bool IsShown() const; - void Iconize(bool iconize); + // For now, same as Show(TRUE) but returns return code + 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 - virtual bool IsIconized() const; - void Fit(); - - void SetTitle(const wxString& title); - wxString GetTitle() const ; + // implementation + // -------------- - void OnSize(wxSizeEvent& event); + // event handlers bool OnClose(); void OnCharHook(wxKeyEvent& event); - void OnPaint(wxPaintEvent& event); void OnCloseWindow(wxCloseEvent& event); - void SetModal(bool flag); - - virtual void Centre(int direction = wxBOTH); - virtual bool IsModal() const; - - // For now, same as Show(TRUE) but returns return code - virtual int ShowModal(); - virtual void EndModal(int retCode); - // Standard buttons void OnOK(wxCommandEvent& event); void OnApply(wxCommandEvent& event); @@ -107,22 +103,12 @@ public: // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); - // implementation - // -------------- - - bool IsModalShowing() const { return m_modalShowing; } - virtual bool IsTopLevel() const { return TRUE; } - - // tooltip management -#if wxUSE_TOOLTIPS - wxMacToolTip* GetToolTipCtrl() const { return m_hwndToolTip; } - void SetToolTipCtrl(wxMacToolTip *tt) { m_hwndToolTip = tt; } - wxMacToolTip* m_hwndToolTip ; -#endif // tooltips + // override more base class virtuals + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoSetClientSize(int width, int height); -protected: - bool m_modalShowing; - WXHWND m_hwndOldFocus; // the window which had focus before we were shown + // show modal dialog and enter modal loop + void DoShowModal(); private: DECLARE_EVENT_TABLE()