// Author: Vadim Zeitlin
// Modified by:
// Created: 06.08.01
-// RCS-ID: $Id$
// Copyright: (c) 2001, 2011 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
bool DoSetFocus();
// returns whether we should accept focus ourselves or not
- bool AcceptsFocus() const { return m_acceptsFocusSelf; }
+ bool AcceptsFocus() const;
// Returns whether we or one of our children accepts focus.
bool AcceptsFocusRecursively() const
- { return m_acceptsFocusSelf || m_acceptsFocusChildren; }
+ { return AcceptsFocus() ||
+ (m_acceptsFocusChildren && HasAnyChildrenAcceptingFocus()); }
// We accept focus from keyboard if we accept it at all.
bool AcceptsFocusFromKeyboard() const { return AcceptsFocusRecursively(); }
// return true if we have any children accepting focus
bool HasAnyFocusableChildren() const;
+ // return true if we have any children that do accept focus right now
+ bool HasAnyChildrenAcceptingFocus() const;
+
+
// the parent window we manage the children for
wxWindow *m_winParent;