remove wxMSW-specific FindSuitableParent() and use GetParentForModalDialog() everywhere; extend it with additional checks and remove redundant ones elsewhere

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-05-09 12:26:15 +00:00
parent 889e742216
commit 8bda0ec6a3
11 changed files with 59 additions and 118 deletions

View File

@@ -91,7 +91,7 @@ public:
int GetEscapeId() const { return m_escapeId; }
// Returns the parent to use for modal dialogs if the user did not specify it
// explicitly
// explicitly. If parent argument is NULL, use GetParent() by default.
wxWindow *GetParentForModalDialog(wxWindow *parent = NULL) const;
#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
@@ -211,6 +211,10 @@ private:
// common part of all ctors
void Init();
// helper of GetParentForModalDialog(): returns the passed in window if it
// can be used as our parent or NULL if it can't
wxWindow *CheckIfCanBeUsedAsParent(wxWindow *parent) const;
// handle Esc key presses
void OnCharHook(wxKeyEvent& event);