X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/313901f3e5b6c2b91ba7040e5fe2ac67b0ffa9cb..9a63feff3a93d9d9dc36f155d3a5c3a36cb922f0:/include/wx/msw/dialog.h?ds=sidebyside diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index c14daec8d2..56135edeb1 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -12,7 +12,7 @@ #ifndef _WX_DIALOG_H_ #define _WX_DIALOG_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "dialog.h" #endif @@ -20,7 +20,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxDialogNameStr; -class WXDLLEXPORT wxWindowDisabler; +class WXDLLEXPORT wxDialogModalData; // Dialog boxes class WXDLLEXPORT wxDialog : public wxDialogBase @@ -35,6 +35,8 @@ public: long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) { + Init(); + long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style | modalStyle, name); @@ -48,7 +50,9 @@ public: long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) { - Create(parent, id, title, pos, size, style, name); + Init(); + + (void)Create(parent, id, title, pos, size, style, name); } bool Create(wxWindow *parent, wxWindowID id, @@ -93,7 +97,7 @@ public: void OnSysColourChanged(wxSysColourChangedEvent& event); // Windows callbacks - long MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); #if wxUSE_CTL3D virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, @@ -114,11 +118,12 @@ protected: void Init(); private: - wxWindow *m_oldFocus; + wxWindow* m_oldFocus; + bool m_endModalCalled; // allow for closing within InitDialog + + // 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 - wxWindowDisabler *m_windowDisabler; DECLARE_DYNAMIC_CLASS(wxDialog) DECLARE_EVENT_TABLE()