]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/containr.h
update mac gl, after rev 50900
[wxWidgets.git] / include / wx / containr.h
index 2d4cd3d0993b15ea50c390d3e9a87bbb871ad186..710078dc0cad154960c3526e69e9162cfa5f1a97 100644 (file)
@@ -70,10 +70,9 @@ public:
     // wxListCtrl) and so should get focus for ourselves
     bool AcceptsFocusRecursively() const { return true; }
 
-    // call this when the number of children of the window changes
-    //
-    // note that we have any children, this panel (used just as container for
-    // them) shouldn't get focus for itself
+    // Call this when the number of children of the window changes.
+    // If we have any children, this panel (used just as container for
+    // them) shouldn't get focus for itself.
     void UpdateCanFocus() { SetCanFocus(!HasAnyFocusableChildren()); }
 
 protected:
@@ -86,6 +85,9 @@ protected:
     // the parent window we manage the children for
     wxWindow *m_winParent;
 
+    // the child which had the focus last time this panel was activated
+    wxWindow *m_winLastFocused;
+
 private:
     // value returned by AcceptsFocus(), should be changed using SetCanFocus()
     // only
@@ -93,10 +95,6 @@ private:
 
     // a guard against infinite recursion
     bool m_inSetFocus;
-
-    // the child which had the focus last time this panel was activated
-    wxWindow *m_winLastFocused;
-
 };
 
 // common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases,
@@ -178,7 +176,7 @@ protected:
                                                                               \
     void classname::SetFocusIgnoringChildren()                                \
     {                                                                         \
-        SetFocus();                                                           \
+        basename::SetFocus();                                                 \
     }
 
 #else // !wxHAS_NATIVE_TAB_TRAVERSAL
@@ -256,12 +254,13 @@ public:                                                                       \
     void classname::OnChildFocus(wxChildFocusEvent& event)                    \
     {                                                                         \
         m_container.SetLastFocus(event.GetWindow());                          \
+        event.Skip();                                                         \
     }                                                                         \
                                                                               \
     void classname::OnFocus(wxFocusEvent& event)                              \
     {                                                                         \
         m_container.HandleOnFocus(event);                                     \
-    } 
+    }
 
 #endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL