added help event origin field: indicates if the help was requested using the mouse or from keyboard
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -768,6 +768,23 @@ wxChildFocusEvent::wxChildFocusEvent(wxWindow *win)
|
||||
SetEventObject(win);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxHelpEvent
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/* static */
|
||||
wxHelpEvent::Origin wxHelpEvent::GuessOrigin(Origin origin)
|
||||
{
|
||||
if ( origin == Origin_Unknown )
|
||||
{
|
||||
// assume that the event comes from the help button if it's not from
|
||||
// keyboard and that pressing F1 always results in the help event
|
||||
origin = wxGetKeyState(WXK_F1) ? Origin_Keyboard : Origin_HelpButton;
|
||||
}
|
||||
|
||||
return origin;
|
||||
}
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user