/////////////////////////////////////////////////////////////////////////////
-// Name: helpwin.cpp
+// Name: src/os2/helpwin.cpp
// Purpose: Help system: native implementation
// Author: David Webster
// Modified by:
// Created: 10/09/99
-// RCS-ID: $Id$
// Copyright: (c) David Webster
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_HELP
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif
#include "wx/os2/helpwin.h"
-#if wxUSE_HELP
#include <time.h>
-#include <wx/os2/private.h>
+#include "wx/os2/private.h"
#include <string.h>
bool wxWinHelpController::DisplayContents()
{
- if (m_helpFile == wxT(""))
+ if (m_helpFile.empty())
return false;
wxString str = m_helpFile;
- size_t len = str.Length();
+ size_t len = str.length();
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
str += wxT(".hlp");
// TODO : display the help
return true;
}
- return FALSE;
+ return false;
}
bool wxWinHelpController::DisplaySection(int WXUNUSED(section))
{
// Use context number
- if (m_helpFile == wxT(""))
+ if (m_helpFile.empty())
return false;
wxString str = m_helpFile;
- size_t len = str.Length();
+ size_t len = str.length();
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
str += wxT(".hlp");
bool wxWinHelpController::DisplayBlock(long WXUNUSED(block))
{
// Use context number -- a very rough equivalent to block id!
- if (m_helpFile == wxT(""))
+ if (m_helpFile.empty())
return false;
wxString str = m_helpFile;
- size_t len = str.Length();
+ size_t len = str.length();
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
str += wxT(".hlp");
bool wxWinHelpController::KeywordSearch(const wxString& WXUNUSED(k),
wxHelpSearchMode WXUNUSED(mode))
{
- if (m_helpFile == wxEmptyString) return FALSE;
+ if (m_helpFile == wxEmptyString) return false;
wxString str = m_helpFile;
- size_t len = str.Length();
+ size_t len = str.length();
if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
str += wxT(".hlp");
// WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k);
return true;
}
- return FALSE;
+ return false;
}
// Can't close the help window explicitly in WinHelp
void wxWinHelpController::OnQuit()
{
}
+
#endif // wxUSE_HELP