RAD Studio
ContentsIndex
PreviousUpNext
Implementing IHelpSelector

IHelpSelector is a companion to ICustomHelpViewer. When more than one registered viewer claims to provide support for a given keyword, context, or topic, or provides a table of contents, the Help Manager must choose between them. In the case of contexts or topics, the Help Manager always selects the first Help viewer that claims to provide support. In the case of keywords or the table of context, the Help Manager will, by default, select the first Help viewer. This behavior can be overridden by an application. 

To override the decision of the Help Manager in such cases, an application must register a class that provides an implementation of the IHelpSelector interface. IHelpSelector exports two functions: SelectKeyword, and TableOfContents. Both take as arguments a TStrings containing, one by one, either the possible keyword matches or the names of the viewers claiming to provide a table of contents. The implementor is required to return the index (in the TStringList) that represents the selected string; the TStringList is then freed by the Help Manager.

Note: The Help Manager may get confused if the strings are rearranged; it is recommended that implementors of IHelpSelector refrain from doing this. The Help system only supports one HelpSelector; when new selectors are registered, any previously existing selectors are disconnected.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!