Added wxWindow::IsDescendant() helper.

This function checks if another window is a direct or indirect child of this
one, which can be needed in a number of situations.

See #3063.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-03-27 11:58:02 +00:00
parent ed98f424de
commit 8b2f64c6c1
3 changed files with 41 additions and 1 deletions

View File

@@ -493,6 +493,23 @@ public:
@see GetNextSibling()
*/
wxWindow* GetPrevSibling() const;
/**
Check if the specified window is a descendant of this one.
Returns @true if the window is a descendant (i.e. a child or
grand-child or grand-grand-child or ...) of this one.
Notice that a window can never be a descendant of another one if they
are in different top level windows, i.e. a child of a wxDialog is not
considered to be a descendant of dialogs parent wxFrame.
@param win Any window, possible @NULL (@false is always returned then).
@since 2.9.4
*/
bool IsDescendant(wxWindowBase* win) const;
/**
Reparents the window, i.e. the window will be removed from its
current parent window (e.g. a non-standard toolbar in a wxFrame)