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

@@ -740,6 +740,10 @@ public:
// is this window a top level one?
virtual bool IsTopLevel() const;
// is this window a child or grand child of this one (inside the same
// TLW)?
bool IsDescendant(wxWindowBase* win) const;
// it doesn't really change parent, use Reparent() instead
void SetParent( wxWindowBase *parent ) { m_parent = (wxWindow *)parent; }
// change the real parent of this window, return true if the parent