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