Allow using windows that can't be focused with wxNavigationEnabled<>.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 13 Oct 2012 22:51:50 +0000 (22:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 13 Oct 2012 22:51:50 +0000 (22:51 +0000)
commite68b7b364aff19665e2c6ee8c68266b6f3d56355
treee53ca8340a3d56aa88c4197d7546d3eef554acc4
parent4ea366746bb0fdc232e5d44b5fc2938324a9d366
Allow using windows that can't be focused with wxNavigationEnabled<>.

The code in wxNavigationEnabled<> assumed that the window itself could be
focused if it didn't have any focusable children because it was originally
extracted from wxPanel that can, indeed, be focused. This is however not the
case for all windows, notably not for wxStaticBox which now derives from
wxNavigationEnabled as well but can never be focused itself.

Add wxControlContainer::DisableSelfFocus() and call it from wxStaticBox to
support this situation. This required splitting m_acceptsFocus flag into
m_acceptsFocusSelf and m_acceptsFocusChildren and updating various methods
using them.

See #13271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/containr.h
include/wx/statbox.h
src/common/containr.cpp