// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "helpctrl.h"
#endif
#if wxUSE_HELP
#include "wx/tipwin.h"
#endif
+
+
+#if wxUSE_LIBMSPACK
+#include "wx/html/forcelnk.h"
+FORCE_LINK(wxhtml_chm_support)
+#endif
IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxHelpControllerBase)
{
actualFilename = dir + filename + wxString(wxT(".hhp"));
if (!wxFileExists(actualFilename))
- return FALSE;
+ {
+#if wxUSE_LIBMSPACK
+ actualFilename = dir + filename + wxString(wxT(".chm"));
+ if (!wxFileExists(actualFilename))
+#endif
+ return false;
+ }
}
}
-
return AddBook(wxFileName(actualFilename));
}
// Check if there are any modal windows present,
// in which case we need to add a grab.
- for ( wxWindowList::Node * node = wxTopLevelWindows.GetFirst();
+ for ( wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
node;
node = node->GetNext() )
{
return success;
}
-bool wxHtmlHelpController::KeywordSearch(const wxString& keyword)
+bool wxHtmlHelpController::KeywordSearch(const wxString& keyword,
+ wxHelpSearchMode mode)
{
CreateHelpWindow();
- bool success = m_helpFrame->KeywordSearch(keyword);
+ bool success = m_helpFrame->KeywordSearch(keyword, mode);
AddGrabIfNeeded();
return success;
}