On 2014-03-23 18:57, Mattias Gaertner wrote: > On Sun, 23 Mar 2014 18:06:16 +0000 > Graeme Geldenhuys <[email protected]> wrote: > >> [...] >> type >> THelpEvent = function (HelpType: THelpType; HelpContext: Integer; >> HelpKeyword: string; HelpFile: string; var Handled: Boolean): Boolean of >> object; > > Please explain, what it should do.
The current OnHelp event signature is define as follows: THelpEvent = function(Command: Word; Data: PtrInt; var CallHelp: Boolean): Boolean of object As you can see Command is of Word type, Data is of PtrInt etc. Pretty meaningless parameters to a developer. The will have to go hunt down the Win32 documentation to see what they mean. Yet everywhere else in LCL's help context, the help is define by a help file, a THelpType, a HelpKeyword or a HelpContext number. Nowhere else is PtrData or Word types used? So why must OnHelp be such a old (and Windows specific) signature that was designed for a very old Windows help viewer. Using the Kylix 3 style THelpEvent signature means it makes it MUCH easier to use for the developer - knowing exactly what each parameter means and contains. It is also then very easy for the developer to implement new help systems into their LCL applications - be that a custom viewer (eg: built into the application), MAN style help viewer, PDF lookup, DocView etc. The Kylix 3 style signature also makes it much more cross-platform friendly... one of the goals of CLX and LCL. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
