Displaying Keyword-based Help
Go Up to Help System Interfaces
Help requests typically come through to the Help viewer as either keyword-based Help, in which case the viewer is asked to provide help based upon a particular string, or as context-based Help, in which case the viewer is asked to provide help based upon a particular numeric identifier.
Note: Numeric Help contexts are the default form of Help requests in applications using the HTMLHelp viewer under Windows.
An implementation of the System.HelpIntfs.ICustomHelpViewer interface is required to provide support for keyword-based Help requests, while an implementation of HelpIntfs.IExtendedHelpViewer is required to support context-based Help requests.
ICustomHelpViewer provides 3 methods for handling keyword-based Help:
UnderstandsKeyword(const HelpString: String): Integer
int UnderstandsKeyword(const UnicodeString HelpString)
- UnderstandsKeyword is the first of the 3 methods called by the Help Manager. UnderstandsKeyword calls each registered Help viewer with the same HelpString string to ask whether the viewer provides help for this HelpString. UnderstandsKeyword is expected to respond with an integer indicating how many different help pages Help viewers can display in response to this Help request.
ICustomHelpViewer.GetHelpStrings(const HelpString: String): TStringList
Classes::TStringList*__fastcall ICustomHelpViewer::GetHelpStrings(const UnicodeString HelpString)
- GetHelpStrings is called by the Help Manager if more than one Help viewer can provide Help on the specified HelpString keyword. The viewer is expected to return a TStringList, which is freed by the Help Manager. The strings in the returned list should map to the Help topics available for the HelpString keyword, but the characteristics of that mapping can be determined by the Help viewer. In the case of the HTMLHelp viewer on Windows, the string list always contains exactly one entry.
ShowHelp(const HelpString: String)
void__fastcall ShowHelp(const UnicodeString HelpString)
- ShowHelp is called by the Help Manager if it needs the Help viewer to display help for a particular HelpString keyword. This is the last method call in the operation; it is guaranteed to never be called unless the UnderstandsKeyword method is invoked first.