added wxWindow::HasFocus() for more convenient way of determining if a (possibly composite) window has focus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2733,6 +2733,13 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, WindowOrder move)
|
||||
return win ? win->GetMainWindowOfCompositeControl() : NULL;
|
||||
}
|
||||
|
||||
bool wxWindowBase::HasFocus() const
|
||||
{
|
||||
wxWindowBase *win = DoFindFocus();
|
||||
return win == this ||
|
||||
win == wxConstCast(this, wxWindowBase)->GetMainWindowOfCompositeControl();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// global functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user