- // Note: these DisplaySection calls use ids that are specific to wxExtHelpController
- // (on Unix). For WinHelp, we'd need to use different context ids.
-
- case HelpDemo_Help_Classes:
- m_help.DisplaySection(1);
- break;
- case HelpDemo_Help_Functions:
- m_help.DisplaySection(4);
- break;
- case HelpDemo_Help_Help:
- m_help.DisplaySection(5);
- break;
-
- // These three calls are only used by wxExtHelpController
-
- case HelpDemo_Help_KDE:
- m_help.SetViewer("kdehelp");
- break;
- case HelpDemo_Help_GNOME:
- m_help.SetViewer("gnome-help-browser");
- break;
- case HelpDemo_Help_Netscape:
- m_help.SetViewer("netscape", wxHELP_NETSCAPE);
- break;
-
- case HelpDemo_Help_Search:
+#if wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__)
+void MyFrame::OnBestHelp(wxCommandEvent& event)
+{
+ ShowHelp(event.GetId(), m_bestHelp);
+}
+#endif
+
+#if USE_HTML_HELP
+void MyFrame::OnModalHtmlHelp(wxCommandEvent& WXUNUSED(event))
+{
+ wxHtmlModalHelp modalHelp(this, wxT("doc.zip"), wxT("Introduction"));
+}
+#endif
+
+/*
+ Notes: ShowHelp uses section ids for displaying particular topics,
+ but you might want to use a unique keyword to display a topic, instead.
+
+ Section ids are specified as follows for the different formats.
+
+ WinHelp
+
+ The [MAP] section specifies the topic to integer id mapping, e.g.
+
+ [MAP]
+ #define intro 100
+ #define functions 1
+ #define classes 2
+ #define about 3
+
+ The identifier name corresponds to the label used for that topic.
+ You could also put these in a .h file and #include it in both the MAP
+ section and your C++ source.
+
+ Note that Tex2RTF doesn't currently generate the MAP section automatically.
+
+ MS HTML Help
+
+ The [MAP] section specifies the HTML filename root to integer id mapping, e.g.
+
+ [MAP]
+ #define doc1 100
+ #define doc3 1
+ #define doc2 2
+ #define doc4 3
+
+ The identifier name corresponds to the HTML filename used for that topic.
+ You could also put these in a .h file and #include it in both the MAP
+ section and your C++ source.
+
+ Note that Tex2RTF doesn't currently generate the MAP section automatically.
+
+ Simple wxHTML Help and External HTML Help
+
+ A wxhelp.map file is used, for example:
+
+ 0 wx.htm ; wxWidgets: Help index; additional keywords like overview
+ 1 wx204.htm ; wxWidgets Function Reference
+ 2 wx34.htm ; wxWidgets Class Reference
+
+ Note that Tex2RTF doesn't currently generate the MAP section automatically.
+
+ Advanced HTML Help
+
+ An extension to the .hhc file format is used, specifying a new parameter
+ with name="ID":
+
+ <OBJECT type="text/sitemap">
+ <param name="Local" value="doc2.htm#classes">
+ <param name="Name" value="Classes">
+ <param name="ID" value=2>
+ </OBJECT>
+
+ Again, this is not generated automatically by Tex2RTF, though it could
+ be added quite easily.
+
+ Unfortunately adding the ID parameters appears to interfere with MS HTML Help,
+ so you should not try to compile a .chm file from a .hhc file with
+ this extension, or the contents will be messed up.
+ */
+
+void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController)
+{
+ switch(commandId)