X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/afcaf277afb7a5f9f31cfd6c425dd9c3a68dd2ba..bc55104d9ab0b0b835644f17a152b4fbbfa8c7b9:/include/wx/generic/helphtml.h?ds=sidebyside diff --git a/include/wx/generic/helphtml.h b/include/wx/generic/helphtml.h index 05bfbd947f..2386ee1c28 100644 --- a/include/wx/generic/helphtml.h +++ b/include/wx/generic/helphtml.h @@ -5,8 +5,9 @@ * * * $Id$ *******************************************************************/ -#ifndef WXXHELPHTML_H -#define WXXHELPHTML_H + +#ifndef __WX_HELPHTML_H_ +#define __WX_HELPHTML_H_ #if wxUSE_HELP @@ -15,17 +16,18 @@ #endif #include "wx/helpbase.h" +#include "wx/frame.h" -/// Name for map file. -#define WXEXTHELP_MAPFILE "wxhelp.map" /// Path separator. -#define WXEXTHELP_SEPARATOR '/' -/// Maximum line length in map file. -#define WXEXTHELP_BUFLEN 512 -/// Character introducing comments/documentation field in map file. -#define WXEXTHELP_COMMENTCHAR ';' +#ifdef __WXMSW__ +#define WXEXTHELP_SEPARATOR _T('\\') +#elif defined(__WXMAC__) +#define WXEXTHELP_SEPARATOR _T(':') +#else +#define WXEXTHELP_SEPARATOR _T('/') +#endif -class wxExtHelpMapList; +class WXDLLEXPORT wxExtHelpMapList; /** @@ -47,8 +49,8 @@ class wxExtHelpMapList; Lines starting with ';' will be ignored. */ -class wxHTMLHelpControllerBase : public wxHelpControllerBase -{ +class WXDLLEXPORT wxHTMLHelpControllerBase : public wxHelpControllerBase +{ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) public: wxHTMLHelpControllerBase(void); @@ -67,7 +69,7 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) */ virtual bool Initialize(const wxString& dir, int WXUNUSED(server)) { return Initialize(dir); } - + /** This must be called to tell the controller where to find the documentation. If a locale is set, look in file/localename, i.e. @@ -79,7 +81,7 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) @return true on success */ virtual bool Initialize(const wxString& dir); - + /** If file is "", reloads file given in Initialize. @file Name of help directory. @return true on success @@ -97,6 +99,10 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) /** Display help for id sectionNo -- identical with DisplaySection(). @return true on success */ + virtual bool DisplaySection(const wxString& section); + /** Display help for URL (using DisplayHelp) or keyword (using KeywordSearch) + @return true on success + */ virtual bool DisplayBlock(long blockNo); /** Search comment/documentation fields in map file and present a list to chose from. @@ -111,7 +117,24 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) virtual void OnQuit(void); /// Call the browser using a relative URL. - virtual bool DisplayHelp(wxString const &) = 0; + virtual bool DisplayHelp(const wxString &) = 0; + + /// Allows one to override the default settings for the help frame. + virtual void SetFrameParameters(const wxString& WXUNUSED(title), + const wxSize& WXUNUSED(size), + const wxPoint& WXUNUSED(pos) = wxDefaultPosition, + bool WXUNUSED(newFrameEachTime) = FALSE) + { + // does nothing by default + } + /// Obtains the latest settings used by the help frame and the help + /// frame. + virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL, + wxPoint *WXUNUSED(pos) = NULL, + bool *WXUNUSED(newFrameEachTime) = NULL) + { + return (wxFrame*) NULL;// does nothing by default + } protected: /// Filename of currently active map file. @@ -124,5 +147,6 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase) void DeleteList(void); }; -#endif -#endif +#endif // wxUSE_HELP + +#endif // __WX_HELPHTML_H_