This keyword is not expanded by Git which means it's not replaced with the correct revision value in the releases made using git-based scripts and it's confusing to have lines with unexpanded "$Id$" in the released files. As expanding them with Git is not that simple (it could be done with git archive and export-subst attribute) and there are not many benefits in having them in the first place, just remove all these lines. If nothing else, this will make an eventual transition to Git simpler. Closes #14487. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
154 lines
3.8 KiB
C++
154 lines
3.8 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/os2/helpwin.cpp
|
|
// Purpose: Help system: native implementation
|
|
// Author: David Webster
|
|
// Modified by:
|
|
// Created: 10/09/99
|
|
// 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
|
|
#endif
|
|
|
|
#include "wx/os2/helpwin.h"
|
|
|
|
#include <time.h>
|
|
|
|
#include "wx/os2/private.h"
|
|
|
|
#include <string.h>
|
|
|
|
// MAX path length
|
|
#define _MAXPATHLEN 500
|
|
|
|
// MAX length of Help descriptor
|
|
#define _MAX_HELP_LEN 500
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS(wxWinHelpController, wxHelpControllerBase)
|
|
|
|
wxWinHelpController::wxWinHelpController()
|
|
{
|
|
m_helpFile = wxEmptyString;
|
|
}
|
|
|
|
wxWinHelpController::~wxWinHelpController()
|
|
{
|
|
}
|
|
|
|
bool wxWinHelpController::Initialize(const wxString& filename)
|
|
{
|
|
m_helpFile = filename;
|
|
// TODO any other inits
|
|
return true;
|
|
}
|
|
|
|
bool wxWinHelpController::LoadFile(const wxString& file)
|
|
{
|
|
m_helpFile = file;
|
|
// TODO
|
|
return true;
|
|
}
|
|
|
|
bool wxWinHelpController::DisplayContents()
|
|
{
|
|
if (m_helpFile.empty())
|
|
return false;
|
|
|
|
wxString str = m_helpFile;
|
|
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");
|
|
|
|
if (wxTheApp->GetTopWindow())
|
|
{
|
|
// TODO : display the help
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool wxWinHelpController::DisplaySection(int WXUNUSED(section))
|
|
{
|
|
// Use context number
|
|
if (m_helpFile.empty())
|
|
return false;
|
|
|
|
wxString str = m_helpFile;
|
|
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");
|
|
|
|
if (wxTheApp->GetTopWindow())
|
|
{
|
|
// TODO ::
|
|
// WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)section);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool wxWinHelpController::DisplayBlock(long WXUNUSED(block))
|
|
{
|
|
// Use context number -- a very rough equivalent to block id!
|
|
if (m_helpFile.empty())
|
|
return false;
|
|
|
|
wxString str = m_helpFile;
|
|
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");
|
|
|
|
if (wxTheApp->GetTopWindow())
|
|
{
|
|
// TODO:
|
|
// WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_CONTEXT, (DWORD)block);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool wxWinHelpController::KeywordSearch(const wxString& WXUNUSED(k),
|
|
wxHelpSearchMode WXUNUSED(mode))
|
|
{
|
|
if (m_helpFile == wxEmptyString) return false;
|
|
|
|
wxString str = m_helpFile;
|
|
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");
|
|
|
|
if (wxTheApp->GetTopWindow())
|
|
{
|
|
// TODO:
|
|
// WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// Can't close the help window explicitly in WinHelp
|
|
bool wxWinHelpController::Quit()
|
|
{
|
|
if (wxTheApp->GetTopWindow())
|
|
{
|
|
// TODO:
|
|
// WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), 0, HELP_QUIT, 0L);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void wxWinHelpController::OnQuit()
|
|
{
|
|
}
|
|
|
|
#endif // wxUSE_HELP
|