[Lazarus] Confused by help
Marco van de Voort
marcov at stack.nl
Sun Mar 23 22:22:21 CET 2014
On Sun, Mar 23, 2014 at 08:50:14PM +0100, Mattias Gaertner wrote:
> >[...lots of words, maybe helpful for someone having Kylix 3...]
>
> I will try to rephrase my question:
> Please describe where the event should be added, what the parameters
> and result do, what the default implementation does, for those people
> not having Kylix.
It is not really Kylix, but probably anything D6+. The old definition
THelpEvent = function(Command: Word; Data: PtrInt; var CallHelp:
Boolean): Boolean of object
requires an integer for a topic, like .hlp, and is not very suitable for
helptypes that lookup topics by string (like also CHM). CHM also can call
topics by integer, but that is the "legacy" way.
The newer definition is for CHM, but some attempt was made to make it
multiple helptypes compatible (since they also had to support .hlp)
THelpEvent = function (HelpType: THelpType; HelpContext: Integer;
HelpKeyword: string; HelpFile: string; var Handled: Boolean): Boolean of
object;
The first param is probably some enum that denotes the helptype. The second
and fourth parameter is the key (file+context id) for .hlp like helpsystems.
The third and fourth are the key (file+ textual context) for helpsystems
that have a string as context.
Since the generic helpsystems polls various plugged helphandlers
(enumerates over the THelpType enums, and if registers calls it), probably
the handled boolean is to signal that the current handling found a result.
More information about the Lazarus
mailing list