]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
BU_EXACTFIT adapted
[wxWidgets.git] / src / common / wincmn.cpp
index 1d576711668bc9f5f0c54512b9308e0c83d49b42..5ba278de5fcd4b9a3611b4d46c102789ced2455a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     13/07/98
 // RCS-ID:      $Id$
 // Copyright:   (c) wxWidgets team
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -2400,6 +2400,23 @@ bool wxWindowBase::TryParent(wxEvent& event)
     return wxEvtHandler::TryParent(event);
 }
 
+// ----------------------------------------------------------------------------
+// navigation
+// ----------------------------------------------------------------------------
+
+// Navigates in the specified direction.
+bool wxWindowBase::Navigate(int flags)
+{
+    wxNavigationKeyEvent eventNav;
+    eventNav.SetFlags(flags);
+    eventNav.SetEventObject(this);
+    if ( GetParent()->GetEventHandler()->ProcessEvent(eventNav) )
+    {
+        return true;
+    }
+    return false;
+}
+
 // ----------------------------------------------------------------------------
 // global functions
 // ----------------------------------------------------------------------------
@@ -2570,9 +2587,11 @@ wxAccStatus wxWindowAccessible::GetName(int childId, wxString* name)
     // This will eventually be replaced by specialised
     // accessible classes, one for each kind of wxWidgets
     // control or window.
+#if wxUSE_BUTTON
     if (GetWindow()->IsKindOf(CLASSINFO(wxButton)))
         title = ((wxButton*) GetWindow())->GetLabel();
     else
+#endif
         title = GetWindow()->GetName();
 
     if (!title.IsEmpty())