From 28e42e023cf61e6cd85a8ca119bb5e15671d8886 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 May 2012 10:03:57 +0000 Subject: [PATCH] Fix keyboard navigation in wx{List,Choice,Tree,Tool}book controls. Inherit from wxNavigationEnabled instead of just wxBookCtrlBase to ensure that the keyboard navigation works correctly for these controls. The toolbar in wxToolbook still doesn't accept focus from keyboard but at least the pages can be TAB-bed too and from. And the rest of the controls are now fully accessible using only the keyboard. Closes #14303. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/choicebk.h | 3 ++- include/wx/listbook.h | 3 ++- include/wx/toolbook.h | 3 ++- include/wx/treebook.h | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/wx/choicebk.h b/include/wx/choicebk.h index 972a97c6a0..6c9f7d4980 100644 --- a/include/wx/choicebk.h +++ b/include/wx/choicebk.h @@ -18,6 +18,7 @@ #include "wx/bookctrl.h" #include "wx/choice.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxChoice; @@ -36,7 +37,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGI // wxChoicebook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxChoicebook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxChoicebook : public wxNavigationEnabled { public: wxChoicebook() { } diff --git a/include/wx/listbook.h b/include/wx/listbook.h index 48140dc0bb..1d8853526c 100644 --- a/include/wx/listbook.h +++ b/include/wx/listbook.h @@ -17,6 +17,7 @@ #if wxUSE_LISTBOOK #include "wx/bookctrl.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxListView; class WXDLLIMPEXP_FWD_CORE wxListEvent; @@ -36,7 +37,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING // wxListbook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxListbook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxListbook : public wxNavigationEnabled { public: wxListbook() { } diff --git a/include/wx/toolbook.h b/include/wx/toolbook.h index f3e3e3aad2..86d50d57b6 100644 --- a/include/wx/toolbook.h +++ b/include/wx/toolbook.h @@ -17,6 +17,7 @@ #if wxUSE_TOOLBOOK #include "wx/bookctrl.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxToolBarBase; class WXDLLIMPEXP_FWD_CORE wxCommandEvent; @@ -40,7 +41,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING // wxToolbook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxToolbook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxToolbook : public wxNavigationEnabled { public: wxToolbook() diff --git a/include/wx/treebook.h b/include/wx/treebook.h index a6bd61d2d1..784a9f1dd3 100644 --- a/include/wx/treebook.h +++ b/include/wx/treebook.h @@ -17,6 +17,7 @@ #if wxUSE_TREEBOOK #include "wx/bookctrl.h" +#include "wx/containr.h" #include "wx/treectrl.h" // for wxArrayTreeItemIds typedef wxWindow wxTreebookPage; @@ -27,7 +28,7 @@ class WXDLLIMPEXP_FWD_CORE wxTreeEvent; // wxTreebook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxTreebook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxTreebook : public wxNavigationEnabled { public: // Constructors and such -- 2.45.2