2000-07-15 19:51:35 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: helpchm.h
|
|
|
|
// Purpose: Help system: MS HTML Help implementation
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 16/04/2000
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-08-27 18:59:37 +00:00
|
|
|
// Licence: wxWindows licence
|
2000-07-15 19:51:35 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_HELPCHM_H_
|
|
|
|
#define _WX_HELPCHM_H_
|
|
|
|
|
2002-03-09 21:55:39 +00:00
|
|
|
#if wxUSE_MS_HTML_HELP
|
2000-07-15 19:51:35 +00:00
|
|
|
|
|
|
|
#include "wx/helpbase.h"
|
|
|
|
|
2002-03-09 21:55:39 +00:00
|
|
|
class WXDLLEXPORT wxCHMHelpController : public wxHelpControllerBase
|
2000-07-15 19:51:35 +00:00
|
|
|
{
|
|
|
|
public:
|
2005-10-26 09:32:10 +00:00
|
|
|
wxCHMHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) { }
|
2002-03-09 21:55:39 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// Must call this to set the filename
|
|
|
|
virtual bool Initialize(const wxString& file);
|
2003-09-11 09:58:31 +00:00
|
|
|
virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); }
|
2002-03-09 21:55:39 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// If file is "", reloads file given in Initialize
|
|
|
|
virtual bool LoadFile(const wxString& file = wxEmptyString);
|
|
|
|
virtual bool DisplayContents();
|
|
|
|
virtual bool DisplaySection(int sectionNo);
|
|
|
|
virtual bool DisplaySection(const wxString& section);
|
|
|
|
virtual bool DisplayBlock(long blockNo);
|
2000-09-12 14:53:39 +00:00
|
|
|
virtual bool DisplayContextPopup(int contextId);
|
|
|
|
virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos);
|
2003-09-09 17:29:11 +00:00
|
|
|
virtual bool KeywordSearch(const wxString& k,
|
|
|
|
wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
|
2000-07-15 19:51:35 +00:00
|
|
|
virtual bool Quit();
|
|
|
|
|
2002-03-09 21:55:39 +00:00
|
|
|
wxString GetHelpFile() const { return m_helpFile; }
|
|
|
|
|
2006-06-14 17:46:51 +00:00
|
|
|
// helper of DisplayTextPopup(), also used in wxSimpleHelpProvider::ShowHelp
|
|
|
|
static bool ShowContextHelpPopup(const wxString& text,
|
|
|
|
const wxPoint& pos,
|
|
|
|
wxWindow *window);
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
protected:
|
|
|
|
// Append extension if necessary.
|
|
|
|
wxString GetValidFilename(const wxString& file) const;
|
2002-03-09 21:55:39 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
protected:
|
|
|
|
wxString m_helpFile;
|
2002-03-09 21:55:39 +00:00
|
|
|
|
|
|
|
DECLARE_CLASS(wxCHMHelpController)
|
2000-07-15 19:51:35 +00:00
|
|
|
};
|
|
|
|
|
2002-03-09 21:55:39 +00:00
|
|
|
#endif // wxUSE_MS_HTML_HELP
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
#endif
|
|
|
|
// _WX_HELPCHM_H_
|