]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid clash with control container event handlers
authorJulian Smart <julian@anthemion.co.uk>
Sat, 18 Aug 2007 11:34:45 +0000 (11:34 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 18 Aug 2007 11:34:45 +0000 (11:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/aui/auibook.h
src/aui/auibook.cpp

index a3de9e25cad905b7c0e893b3dfa8e487d2a34ba8..26398867a3f06820a411e828022e18d57a42deec 100644 (file)
@@ -598,7 +598,7 @@ protected:
 
 protected:
 
 
 protected:
 
-    void OnChildFocus(wxChildFocusEvent& evt);
+    void OnChildFocusNotebook(wxChildFocusEvent& evt);
     void OnRender(wxAuiManagerEvent& evt);
     void OnSize(wxSizeEvent& evt);
     void OnTabClicked(wxCommandEvent& evt);
     void OnRender(wxAuiManagerEvent& evt);
     void OnSize(wxSizeEvent& evt);
     void OnTabClicked(wxCommandEvent& evt);
@@ -610,7 +610,7 @@ protected:
     void OnTabMiddleUp(wxCommandEvent& evt);
     void OnTabRightDown(wxCommandEvent& evt);
     void OnTabRightUp(wxCommandEvent& evt);
     void OnTabMiddleUp(wxCommandEvent& evt);
     void OnTabRightDown(wxCommandEvent& evt);
     void OnTabRightUp(wxCommandEvent& evt);
-    void OnNavigationKey(wxNavigationKeyEvent& event);
+    void OnNavigationKeyNotebook(wxNavigationKeyEvent& event);
 
     // set selection to the given window (which must be non-NULL and be one of
     // our pages, otherwise an assert is raised)
 
     // set selection to the given window (which must be non-NULL and be one of
     // our pages, otherwise an assert is raised)
index 6288695abe3705896bc8769fa576974e232fd9c2..dcc83d68f9d7fc7e8486118e0e8b8d1910426c3e 100644 (file)
@@ -2684,7 +2684,7 @@ const int wxAuiBaseTabCtrlId = 5380;
 
 BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl)
     EVT_SIZE(wxAuiNotebook::OnSize)
 
 BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl)
     EVT_SIZE(wxAuiNotebook::OnSize)
-    EVT_CHILD_FOCUS(wxAuiNotebook::OnChildFocus)
+    EVT_CHILD_FOCUS(wxAuiNotebook::OnChildFocusNotebook)
     EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
                       wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING,
                       wxAuiNotebook::OnTabClicked)
     EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
                       wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING,
                       wxAuiNotebook::OnTabClicked)
@@ -2712,9 +2712,14 @@ BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl)
     EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
                       wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP,
                       wxAuiNotebook::OnTabRightUp)
     EVT_COMMAND_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500,
                       wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP,
                       wxAuiNotebook::OnTabRightUp)
-    EVT_NAVIGATION_KEY(wxAuiNotebook::OnNavigationKey)
+    EVT_NAVIGATION_KEY(wxAuiNotebook::OnNavigationKeyNotebook)
 
 
+#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
     WX_EVENT_TABLE_CONTROL_CONTAINER(wxAuiNotebook)
     WX_EVENT_TABLE_CONTROL_CONTAINER(wxAuiNotebook)
+#else
+    // Avoid clash with container event handler functions
+    EVT_SET_FOCUS(wxAuiNotebook::OnFocus)
+#endif
 END_EVENT_TABLE()
 
 WX_DELEGATE_TO_CONTROL_CONTAINER(wxAuiNotebook, wxControl)
 END_EVENT_TABLE()
 
 WX_DELEGATE_TO_CONTROL_CONTAINER(wxAuiNotebook, wxControl)
@@ -4000,7 +4005,7 @@ void wxAuiNotebook::RemoveEmptyTabFrames()
     m_mgr.Update();
 }
 
     m_mgr.Update();
 }
 
-void wxAuiNotebook::OnChildFocus(wxChildFocusEvent& evt)
+void wxAuiNotebook::OnChildFocusNotebook(wxChildFocusEvent& evt)
 {
     // if we're dragging a tab, don't change the current selection.
     // This code prevents a bug that used to happen when the hint window
 {
     // if we're dragging a tab, don't change the current selection.
     // This code prevents a bug that used to happen when the hint window
@@ -4030,7 +4035,7 @@ void wxAuiNotebook::OnChildFocus(wxChildFocusEvent& evt)
     }
 }
 
     }
 }
 
-void wxAuiNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
+void wxAuiNotebook::OnNavigationKeyNotebook(wxNavigationKeyEvent& event)
 {
     if ( event.IsWindowChange() ) {
         // change pages
 {
     if ( event.IsWindowChange() ) {
         // change pages