added wxWindow::GetPrev/NextSibling() [backport of r50108 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2617,6 +2617,27 @@ bool wxWindowBase::TryParent(wxEvent& event)
|
||||
return wxEvtHandler::TryParent(event);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// window relationships
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxWindow *wxWindowBase::DoGetSibling(MoveKind order) const
|
||||
{
|
||||
wxCHECK_MSG( GetParent(), NULL,
|
||||
_T("GetPrev/NextSibling() don't work for TLWs!") );
|
||||
|
||||
wxWindowList& siblings = GetParent()->GetChildren();
|
||||
wxWindowList::compatibility_iterator i = siblings.Find(this);
|
||||
wxCHECK_MSG( i, NULL, _T("window not a child of its parent?") );
|
||||
|
||||
if ( order == MoveBefore )
|
||||
i = i->GetPrevious();
|
||||
else // MoveAfter
|
||||
i = i->GetNext();
|
||||
|
||||
return i ? i->GetData() : NULL;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// keyboard navigation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user