1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: helpwin.h
|
|
|
|
// Purpose: Help system: WinHelp implementation
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-08-27 18:59:37 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 23:52:45 +00:00
|
|
|
#ifndef _WX_HELPWIN_H_
|
|
|
|
#define _WX_HELPWIN_H_
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
#include "wx/wx.h"
|
|
|
|
|
1998-09-25 13:28:52 +00:00
|
|
|
#if wxUSE_HELP
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
#include "wx/helpbase.h"
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxWinHelpController: public wxHelpControllerBase
|
1998-05-20 14:12:05 +00:00
|
|
|
{
|
2000-07-15 19:51:35 +00:00
|
|
|
DECLARE_CLASS(wxWinHelpController)
|
2004-08-27 18:59:37 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
public:
|
2005-10-26 09:32:10 +00:00
|
|
|
wxWinHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {}
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxWinHelpController() {}
|
1998-05-20 14:12:05 +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 ); }
|
1998-05-20 14:12:05 +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);
|
2003-09-11 09:58:31 +00:00
|
|
|
virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); }
|
2000-07-15 19:51:35 +00:00
|
|
|
virtual bool DisplayBlock(long blockNo);
|
2000-09-12 14:53:39 +00:00
|
|
|
virtual bool DisplayContextPopup(int contextId);
|
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();
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
inline wxString GetHelpFile() const { return m_helpFile; }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
protected:
|
2000-07-15 19:51:35 +00:00
|
|
|
// Append extension if necessary.
|
|
|
|
wxString GetValidFilename(const wxString& file) const;
|
2004-08-27 18:59:37 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
private:
|
|
|
|
wxString m_helpFile;
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
1998-09-25 13:28:52 +00:00
|
|
|
#endif // wxUSE_HELP
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
2000-07-15 19:51:35 +00:00
|
|
|
// _WX_HELPWIN_H_
|