// declarations
// ============================================================================
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "cshelp.h"
-#endif
-
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
* to put the application into context help mode.
*/
+#ifndef __WXPM__
+
static const char * csquery_xpm[] = {
"12 11 2 1",
" c None",
" .. ",
" "};
+#endif
+
IMPLEMENT_CLASS(wxContextHelpButton, wxBitmapButton)
BEGIN_EVENT_TABLE(wxContextHelpButton, wxBitmapButton)
// 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() )
{
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;
}
// removes the association
void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window)
{
- m_hashWindows.erase((long)window);
+ m_hashWindows.erase(WINHASH_KEY(window));
}
bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)
return true;
}
+#else
+ wxUnusedVar(window);
#endif // wxUSE_TIPWINDOW
return false;