]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
use GetPath() instead of GetFullPath() in the directory-oriented functions (patch...
[wxWidgets.git] / src / common / event.cpp
index f200ea664ca09754622933d66f94116fa1458f27..b270601e5e0b20d1e01d1b952a6bd2717b82d7e0 100644 (file)
@@ -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