X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7445ff8ee26e39fab1e35455e1bef954bdf636f..cc3de8a3fc8e91ad88a20eb2df36490e532ba6c1:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 9e8bc62c7c..7bf7177a6a 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -41,17 +41,10 @@ #include "wx/statusbr.h" #include "wx/toolbar.h" #include "wx/dcclient.h" -#endif //WX_PRECOMP - -#if defined(__WXMAC__) && wxUSE_SCROLLBAR #include "wx/scrolbar.h" -#endif - -#if wxUSE_CONSTRAINTS #include "wx/layout.h" -#endif // wxUSE_CONSTRAINTS - -#include "wx/sizer.h" + #include "wx/sizer.h" +#endif //WX_PRECOMP #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" @@ -80,7 +73,11 @@ // For reporting compile- and runtime version of GTK+ in the ctrl+alt+mclick dialog. // The gtk includes don't pull any other headers in, at least not on my system - MR #ifdef __WXGTK__ - #include + #ifdef __WXGTK20__ + #include + #else + #include + #endif extern const unsigned int gtk_major_version; extern const unsigned int gtk_minor_version; extern const unsigned int gtk_micro_version; @@ -1472,7 +1469,10 @@ void wxWindowBase::SetHelpTextForId(const wxString& text) } // get the help string associated with this window (may be empty) -wxString wxWindowBase::GetHelpText() const +// default implementation forwards calls to the help provider +wxString +wxWindowBase::GetHelpTextAtPoint(const wxPoint & WXUNUSED(pt), + wxHelpEvent::Origin WXUNUSED(origin)) const { wxString text; wxHelpProvider *helpProvider = wxHelpProvider::Get(); @@ -1490,7 +1490,7 @@ void wxWindowBase::OnHelp(wxHelpEvent& event) wxHelpProvider *helpProvider = wxHelpProvider::Get(); if ( helpProvider ) { - if ( helpProvider->ShowHelp(this) ) + if ( helpProvider->ShowHelpAtPoint(this, event.GetPosition(), event.GetOrigin()) ) { // skip the event.Skip() below return; @@ -2804,7 +2804,7 @@ wxAccStatus wxWindowAccessible::GetDescription(int WXUNUSED(childId), wxString* if (!GetWindow()) return wxACC_FAIL; - wxString ht(GetWindow()->GetHelpText()); + wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard)); if (!ht.empty()) { *description = ht; @@ -2820,7 +2820,7 @@ wxAccStatus wxWindowAccessible::GetHelpText(int WXUNUSED(childId), wxString* hel if (!GetWindow()) return wxACC_FAIL; - wxString ht(GetWindow()->GetHelpText()); + wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard)); if (!ht.empty()) { *helpText = ht;