/////////////////////////////////////////////////////////////////////////////
-// Name: helpext.cpp
+// Name: src/generic/helpext.cpp
// Purpose: an external help controller for wxWidgets
// Author: Karsten Ballueder
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-# pragma implementation "wxexthlp.h"
-#endif
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#if wxUSE_HELP && !defined(__WXWINCE__) && (!defined(__WXMAC__) || defined(__WXMAC_OSX__))
#ifndef WX_PRECOMP
- #include "wx/setup.h"
#include "wx/string.h"
#include "wx/utils.h"
#include "wx/list.h"
#include <unistd.h>
#endif
+#ifdef __WINDOWS__
+#include "wx/msw/mslu.h"
+#endif
+
#ifdef __WXMSW__
#include <windows.h>
#include "wx/msw/winundef.h"
and a file mapping numerical Section numbers to relative URLS.
*/
-wxExtHelpController::wxExtHelpController()
+wxExtHelpController::wxExtHelpController(wxWindow* parentWindow):
+ wxHelpControllerBase(parentWindow)
{
m_MapList = (wxList*) NULL;
m_NumOfEntries = 0;
}
return true;
-#elif defined(__WXPM__)
+#elif defined(__OS2__)
wxString url;
url << m_MapFile << '\\' << relativeURL.BeforeFirst('#');
file = ifile;
if(! wxIsAbsolutePath(file))
{
- wxChar* f = wxGetWorkingDirectory();
- file = f;
- delete[] f; // wxGetWorkingDirectory returns new memory
+ file = wxGetCwd();
#ifdef __WXMAC__
file << ifile;
#else
{
wxString newfile;
newfile << WXEXTHELP_SEPARATOR << wxGetLocale()->GetName();
- if(wxPathExists(newfile))
+ if(wxDirExists(newfile))
file = newfile;
else
{
const wxChar *cptr = wxGetLocale()->GetName().c_str();
while(*cptr && *cptr != wxT('_'))
newfile << *(cptr++);
- if(wxPathExists(newfile))
+ if(wxDirExists(newfile))
file = newfile;
}
}
#endif
- if(! wxPathExists(file))
+ if(! wxDirExists(file))
return false;
mapFile << file << WXEXTHELP_SEPARATOR << WXEXTHELP_MAPFILE;
file << m_MapFile << WXEXTHELP_SEPARATOR << contents;
if(file.Contains(wxT('#')))
file = file.BeforeLast(wxT('#'));
- if(contents.Length() && wxFileExists(file))
+ if(contents.length() && wxFileExists(file))
rc = DisplaySection(CONTENTS_ID);
// if not found, open homemade toc:
#endif // wxUSE_HELP
-