X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..4c3ebca927cea2742ec128c9c3ef3676d1ecae01:/include/wx/mac/dialog.h diff --git a/include/wx/mac/dialog.h b/include/wx/mac/dialog.h index 1aa01b36f0..24a6464f5d 100644 --- a/include/wx/mac/dialog.h +++ b/include/wx/mac/dialog.h @@ -1,24 +1,24 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dialog.h // Purpose: wxDialog class -// Author: AUTHOR +// Author: Stefan Csomor // Modified by: -// Created: ??/??/98 +// Created: 1998-01-01 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DIALOG_H_ #define _WX_DIALOG_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "dialog.h" #endif #include "wx/panel.h" -WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr; +WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr; WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr; @@ -64,41 +64,32 @@ public: ~wxDialog(); - virtual bool Destroy(); +// virtual bool Destroy(); + bool Show(bool show = true); + + void SetModal(bool flag); + virtual bool IsModal() const; - virtual void DoSetClientSize(int width, int height); + // For now, same as Show(TRUE) but returns return code + virtual int ShowModal(); - virtual void GetPosition(int *x, int *y) const; + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); - bool Show(bool show); - bool IsShown() const; - void Iconize(bool iconize); + // 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); - bool OnClose(); + // event handlers 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,21 +98,8 @@ public: // Responds to colour changes void OnSysColourChanged(wxSysColourChangedEvent& event); - // implementation - // -------------- - - bool IsModalShowing() const { return m_modalShowing; } - - // tooltip management -#if wxUSE_TOOLTIPS - wxMacToolTip* GetToolTipCtrl() const { return m_hwndToolTip; } - void SetToolTipCtrl(wxMacToolTip *tt) { m_hwndToolTip = tt; } - wxMacToolTip* m_hwndToolTip ; -#endif // tooltips - -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()