X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad9fb0334fbfe5747b67c09ba714c1f00bd40ff8..f357c0d42c17bf5be30e65e68cd99c474678da71:/src/common/cshelp.cpp?ds=sidebyside diff --git a/src/common/cshelp.cpp b/src/common/cshelp.cpp index f25d0943e7..b5091e8369 100644 --- a/src/common/cshelp.cpp +++ b/src/common/cshelp.cpp @@ -56,6 +56,8 @@ public: //// Data wxContextHelp* m_contextHelp; + + DECLARE_NO_COPY_CLASS(wxContextHelpEvtHandler) }; // ============================================================================ @@ -170,7 +172,7 @@ bool wxContextHelp::EndContextHelp() bool wxContextHelp::EventLoop() { m_inHelp = TRUE; - + while ( m_inHelp ) { if (wxTheApp->Pending()) @@ -182,7 +184,7 @@ bool wxContextHelp::EventLoop() wxTheApp->ProcessIdle(); } } - + return TRUE; } @@ -225,9 +227,9 @@ bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt) { wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ; helpEvent.SetEventObject(this); - + eventProcessed = win->GetEventHandler()->ProcessEvent(helpEvent); - + // Go up the window hierarchy until the event is handled (or not). // I.e. keep submitting ancestor windows until one is recognised // by the app code that processes the ids and displays help. @@ -275,8 +277,15 @@ wxContextHelpButton::wxContextHelpButton(wxWindow* parent, const wxPoint& pos, const wxSize& size, long style) +#if defined(__WXPM__) + : wxBitmapButton(parent, id, wxBitmap(wxCSQUERY_BITMAP + ,wxBITMAP_TYPE_RESOURCE + ), + pos, size, style) +#else : wxBitmapButton(parent, id, wxBITMAP(csquery), pos, size, style) +#endif { } @@ -329,11 +338,13 @@ wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window) void wxSimpleHelpProvider::AddHelp(wxWindowBase *window, const wxString& text) { + m_hashWindows.Delete((long)window); m_hashWindows.Put((long)window, text); } void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text) { + m_hashIds.Delete((long)id); m_hashIds.Put(id, text); }