Vcl.HtmlHelpViewer

From RAD Studio API Documentation
Jump to: navigation, search

Implements the wrapper for Windows HTMLHelp function API.

Package vcl270.bpl

Classes

IHtmlHelpTesterMethods of this interface help to maintain and analyze help files and lists of keywords, ALinks, context IDs, and help topics, which can be used in requests to the Windows HTMLHelp help API function.

Variables

HtmlHelpTesterThe HtmlHelpTester variable stores the created object of the type IHtmlHelpTester.
ViewerNameThe ViewerName variable stores a string that the Help Manager can use to identify this Viewer among registered Viewers.

Description

The HtmlHelpViewer unit implements an external Help Viewer providing the wrapper for the Windows HTMLHelp function API. The design goal for this unit is to be indistinguishable from other external help viewers as far as the VCL help manager can determine. Accordingly, it only wraps those features of the HTMLHelp API that are used by the help system implemented in the System.HelpIntfs unit.

HtmlHelpViewer wraps the HTMLHelp API features in the private THtmlHelpViewer class, declared in the implementation section. The THtmlHelpViewer class implements help interfaces declared in the System.HelpIntfs unit. System.HelpIntfs provides the series of interfaces that allow the help system to communicate between help requests in your application and an external help viewer like HTMLHelp.

To access methods of the private THtmlHelpViewer class from other units, the initialization section of this unit creates the HelpViewer object of this class and calls the global System.HelpIntfs.RegisterViewer function to register the Help Manager. The global System.HelpIntfs.GetHelpSystem function, from the System.HelpIntfs unit, can retrieve Help System objects of the registered HelpViewer. Then code in other units can access methods of the retrieved Help System objects.

To use the HTMLHelp help viewer in your application, include the HtmlHelpViewer unit in the uses section of the main unit (or into another proper unit) of your application.

initialization section

The initialization section of the HtmlHelpViewer unit provides the following initialization:

 HelpViewer := THtmlHelpViewer.Create;
 HelpIntfs.RegisterViewer(HelpViewerIntf, HelpViewer.FHelpManager);

Here:

  • The THtmlHelpViewer.Create constructor in the first line internally creates the Help Viewer object HelpViewerIntf of the THtmlHelpViewer class and stores it in the HelpViewer variable.
  • The second line calls the global System.HelpIntfs.RegisterViewer function that registers the created Help Viewer.

The global System.HelpIntfs.GetHelpSystem function can be called from other units to access methods of Help Systems from the registered Help Viewer.

See Also