Help System Interfaces

From RAD Studio
Jump to: navigation, search

Go Up to Enabling Help in Applications

The Help system allows communication between your application and Help viewers through a series of interfaces defined in the System.HelpIntfs unit. HelpIntfs also provides the implementation of the Help Manager. The most important are the following interfaces:

  • System.HelpIntfs.ICustomHelpViewer provides support for displaying Help topics specified with string type keywords and for displaying a table of contents listing all Help topics available in a particular Help viewer.
Attention! The HelpIntfs unit does not provide implementations for the System.HelpIntfs.ICustomHelpViewer, System.HelpIntfs.IExtendedHelpViewer, and System.HelpIntfs.ISpecialWinHelpViewer interfaces. To use methods of these interfaces, you can insert in the uses clause of your application the Vcl.HtmlHelpViewer unit. The Vcl.HtmlHelpViewer unit provides a Delphi interface to the HTMLHelp Windows native Help handling function. For C++, you need to include the Vcl.HtmlHelpViewer.hpp header file. You can also provide your own implementation for ICustomHelpViewer and other interfaces. This implementation should provide a Delphi (or C++) wrapper to some external Help viewer to use.
  • System.HelpIntfs.IExtendedHelpViewer provides support for displaying Help topics specified by numeric context identifiers and by topic names. In most Help systems, topic names can work as high-level keywords (for example, "IntToStr" might be a keyword in the Help system, but "String manipulation routines" could be the name of a topic).
  • System.HelpIntfs.ISpecialWinHelpViewer provides support for responding to specialized HTMLHelp commands that an application running under Windows may receive and that are not easily generalizable. In general, only applications operating in the Windows environment need to implement this interface, and even then it is only required for applications that make extensive use of non-standard HTMLHelp commands.
  • System.HelpIntfs.IHelpSystem provides a mechanism through which TApplication passes Help requests to the Help system. TApplication obtains an instance of an object that implements both IHelpSystem and IHelpManager at application load time and exports that instance as a property; this allows other code within the application to file Help requests directly when appropriate.
IHelpSelector should provide a mechanism through which the Help system can invoke the user interface to ask which Help viewer should be used in cases where more than one Help viewer is capable of handling a keyword-based Help request or to display a Table of Contents.
Note: We do not provide an implementation of the IHelpSelector interface. To use methods of this interface, you need to provide your own implementation.


See Also