X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6fbe2f0c8cd9321dd48ff4a87e111ef19e4a99b..39406a5d051fdcc372367c4dfedc6d711fdf51fd:/src/common/cshelp.cpp diff --git a/src/common/cshelp.cpp b/src/common/cshelp.cpp index 5d5f7f200f..ae2a282c3a 100644 --- a/src/common/cshelp.cpp +++ b/src/common/cshelp.cpp @@ -13,10 +13,6 @@ // declarations // ============================================================================ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "cshelp.h" -#endif - // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- @@ -254,6 +250,8 @@ bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt) * to put the application into context help mode. */ +#ifndef __WXPM__ + static const char * csquery_xpm[] = { "12 11 2 1", " c None", @@ -270,6 +268,8 @@ static const char * csquery_xpm[] = { " .. ", " "}; +#endif + IMPLEMENT_CLASS(wxContextHelpButton, wxBitmapButton) BEGIN_EVENT_TABLE(wxContextHelpButton, wxBitmapButton) @@ -330,9 +330,11 @@ wxHelpProvider::~wxHelpProvider() // wxSimpleHelpProvider // ---------------------------------------------------------------------------- +#define WINHASH_KEY(w) wxPtrToUInt(w) + wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window) { - wxLongToStringHashMap::iterator it = m_hashWindows.find((long)window); + wxSimpleHelpProviderHashMap::iterator it = m_hashWindows.find(WINHASH_KEY(window)); if ( it == m_hashWindows.end() ) { @@ -346,13 +348,13 @@ wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window) void wxSimpleHelpProvider::AddHelp(wxWindowBase *window, const wxString& text) { - m_hashWindows.erase((long)window); - m_hashWindows[(long)window] = text; + m_hashWindows.erase(WINHASH_KEY(window)); + m_hashWindows[WINHASH_KEY(window)] = text; } void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text) { - wxLongToStringHashMap::key_type key = (wxLongToStringHashMap::key_type)id; + wxSimpleHelpProviderHashMap::key_type key = (wxSimpleHelpProviderHashMap::key_type)id; m_hashIds.erase(key); m_hashIds[key] = text; } @@ -360,7 +362,7 @@ void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text) // removes the association void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window) { - m_hashWindows.erase((long)window); + m_hashWindows.erase(WINHASH_KEY(window)); } bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window) @@ -384,6 +386,8 @@ bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window) return true; } +#else + wxUnusedVar(window); #endif // wxUSE_TIPWINDOW return false;