helpwin.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/helpwin.h
  3. // Purpose: Help system: WinHelp implementation
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 04/01/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_HELPWIN_H_
  11. #define _WX_HELPWIN_H_
  12. #include "wx/wx.h"
  13. #if wxUSE_HELP
  14. #include "wx/helpbase.h"
  15. class WXDLLIMPEXP_CORE wxWinHelpController: public wxHelpControllerBase
  16. {
  17. DECLARE_DYNAMIC_CLASS(wxWinHelpController)
  18. public:
  19. wxWinHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {}
  20. virtual ~wxWinHelpController() {}
  21. // Must call this to set the filename
  22. virtual bool Initialize(const wxString& file);
  23. virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); }
  24. // If file is "", reloads file given in Initialize
  25. virtual bool LoadFile(const wxString& file = wxEmptyString);
  26. virtual bool DisplayContents();
  27. virtual bool DisplaySection(int sectionNo);
  28. virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); }
  29. virtual bool DisplayBlock(long blockNo);
  30. virtual bool DisplayContextPopup(int contextId);
  31. virtual bool KeywordSearch(const wxString& k,
  32. wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
  33. virtual bool Quit();
  34. inline wxString GetHelpFile() const { return m_helpFile; }
  35. protected:
  36. // Append extension if necessary.
  37. wxString GetValidFilename(const wxString& file) const;
  38. private:
  39. wxString m_helpFile;
  40. };
  41. #endif // wxUSE_HELP
  42. #endif
  43. // _WX_HELPWIN_H_