]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
test whether pointer is non-NULL before using it, not after, in wxAnimation::Load...
[wxWidgets.git] / include / wx / window.h
index c48e7b8579aef478255188f8be49c97d7488985f..2dde62f41fe18e06dd5d7fd6dcc4113be83618c0 100644 (file)
@@ -592,8 +592,14 @@ public:
     bool CanAcceptFocusFromKeyboard() const
         { return AcceptsFocusFromKeyboard() && CanAcceptFocus(); }
 
-        // navigates in the specified direction by sending a wxNavigationKeyEvent
-    virtual bool Navigate(int flags = wxNavigationKeyEvent::IsForward);
+        // navigates inside this window
+    bool NavigateIn(int flags = wxNavigationKeyEvent::IsForward)
+        { return DoNavigateIn(flags); }
+
+        // navigates in the specified direction from this window, this is
+        // equivalent to GetParent()->NavigateIn()
+    bool Navigate(int flags = wxNavigationKeyEvent::IsForward)
+        { return m_parent && ((wxWindowBase *)m_parent)->DoNavigateIn(flags); }
 
         // move this window just before/after the specified one in tab order
         // (the other window must be our sibling!)
@@ -1200,6 +1206,10 @@ protected:
     };
     virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move);
 
+    // implementation of Navigate() and NavigateIn()
+    virtual bool DoNavigateIn(int flags);
+
+
 #if wxUSE_CONSTRAINTS
     // satisfy the constraints for the windows but don't set the window sizes
     void SatisfyConstraints();