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:
Vadim Zeitlin
2007-11-20 16:12:12 +00:00
parent 20d78b39b2
commit cf22e46119
5 changed files with 88 additions and 10 deletions

View File

@@ -573,6 +573,13 @@ public:
// needed just for extended runtime
const wxWindowList& GetWindowChildren() const { return GetChildren() ; }
#if wxABI_VERSION >= 20808
// get the window before/after this one in the parents children list,
// returns NULL if this is the first/last window
wxWindow *GetPrevSibling() const { return DoGetSibling(MoveBefore); }
wxWindow *GetNextSibling() const { return DoGetSibling(MoveAfter); }
#endif // wx 2.8.8+
// get the parent or the parent of the parent
wxWindow *GetParent() const { return m_parent; }
inline wxWindow *GetGrandParent() const;
@@ -1141,12 +1148,18 @@ protected:
virtual bool TryValidator(wxEvent& event);
virtual bool TryParent(wxEvent& event);
// common part of MoveBefore/AfterInTabOrder()
enum MoveKind
{
MoveBefore, // insert before the given window
MoveAfter // insert after the given window
};
#if wxABI_VERSION >= 20808
// common part of GetPrev/NextSibling()
wxWindow *DoGetSibling(MoveKind order) const;
#endif // wx 2.8.8+
// common part of MoveBefore/AfterInTabOrder()
virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move);
#if wxUSE_CONSTRAINTS