Moved some methods/classes inside COMPATIBILITY_2_4.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-07-03 21:59:55 +00:00
parent 2ea4a2f552
commit ba8c160144
19 changed files with 132 additions and 52 deletions

View File

@@ -326,30 +326,34 @@ wxHelpProvider::~wxHelpProvider()
wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window)
{
bool wasFound;
wxString text = m_hashWindows.Get((long)window, &wasFound);
if ( !wasFound )
text = m_hashIds.Get(window->GetId());
wxLongToStringHashMap::iterator it = m_hashWindows.find((long)window);
return text;
if ( it == m_hashWindows.end() )
{
it = m_hashIds.find(window->GetId());
if ( it == m_hashIds.end() )
return wxEmptyString;
}
return it->second;
}
void wxSimpleHelpProvider::AddHelp(wxWindowBase *window, const wxString& text)
{
m_hashWindows.Delete((long)window);
m_hashWindows.Put((long)window, text);
m_hashWindows.erase((long)window);
m_hashWindows[(long)window] = text;
}
void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text)
{
m_hashIds.Delete((long)id);
m_hashIds.Put(id, text);
m_hashIds.erase((long)id);
m_hashIds[id] = text;
}
// removes the association
void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window)
{
m_hashWindows.Delete((long)window);
m_hashWindows.erase((long)window);
}
bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)