X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/449d48f9e15e1430805aed3b33e55000754ad926..0d5b4bc274158c9d8bf30b97cd2228489a60ba69:/src/common/cshelp.cpp diff --git a/src/common/cshelp.cpp b/src/common/cshelp.cpp index 43ebbef496..f25d0943e7 100644 --- a/src/common/cshelp.cpp +++ b/src/common/cshelp.cpp @@ -6,7 +6,7 @@ // Created: 08/09/2000 // RCS-ID: $Id$ // Copyright: (c) 2000 Julian Smart, Vadim Zeitlin -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -144,14 +144,14 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win) { wxPoint pt; wxWindow* winAtPtr = wxFindWindowAtPointer(pt); - /* + /* if (winAtPtr) { - wxString msg; + wxString msg; msg.Printf("Picked %s (%d)", (const char*) winAtPtr->GetName(), winAtPtr->GetId()); cout << msg << '\n'; } - */ + */ if (winAtPtr) DispatchEvent(winAtPtr, pt); @@ -170,6 +170,7 @@ bool wxContextHelp::EndContextHelp() bool wxContextHelp::EventLoop() { m_inHelp = TRUE; + while ( m_inHelp ) { if (wxTheApp->Pending()) @@ -181,6 +182,7 @@ bool wxContextHelp::EventLoop() wxTheApp->ProcessIdle(); } } + return TRUE; } @@ -223,8 +225,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. @@ -301,6 +304,11 @@ void wxHelpProvider::AddHelp(wxWindowID WXUNUSED(id), { } +// removes the association +void wxHelpProvider::RemoveHelp(wxWindowBase* WXUNUSED(window)) +{ +} + wxHelpProvider::~wxHelpProvider() { } @@ -329,6 +337,12 @@ void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text) m_hashIds.Put(id, text); } +// removes the association +void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window) +{ + m_hashWindows.Delete((long)window); +} + bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window) { #if wxUSE_TIPWINDOW