[Lazarus] Building help files: the nitty-gritty

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jul 19 09:12:34 CEST 2012


Graeme Geldenhuys <graemeg.lists at gmail.com> hat am 18. Juli 2012 um 19:53
geschrieben:

> Hi,
>
>
> > I think Reinier and I are saying that the need in the current case is how to
> > intercept F1 and recover an associated keyword, and how to pass that keyword
> > to lhelp.
>
> Surely the "capturing of the F1 key press" functionality already
> exists in LCL? I also see TControl.HelpType, TControl.HelpContext,
> TControl.HelpKeyword and Application.HelpFile properties... Are they
> just for show (not functional yet)?


They do work.
See here an example with HTML pages:
http://wiki.lazarus.freepascal.org/Add_Help_to_Your_Application


>
> Another problem I spotted was with the Application.HelpCommand()
> signature. It's got the signature designed by Borland Delphi v1
> (somewhere around then) for the use with the very old WinHelp help
> viewer and the long discontinued .HLP files.


There are:

function HelpCommand(Command: Word; Data: PtrInt): Boolean;
function HelpContext(Context: THelpContext): Boolean;
function HelpKeyword(const Keyword: String): Boolean;


The Keyword can be an arbitrary string. In the HTML viewer it is the path behind
the BaseURL.



> I've already raised this> issue some years back, but received my usual answer
> that it will not
> be changed - go figure. Anyway, a more sane signature for
> Application.HelpCommand() would be like Delphi & Kylix defined it for
> the CLX framework. As a matter of fact, the help system for CLX was
> designed to be cross-platform and uses Interfaces to be very flexible.
> It is probably the cleanest help system design I have ever seen, and
> it supports multiple help viewers too. Kylix even came with two
> reference implementations - a Man Page viewer and a HyperHelp viewer.


The current help system knows viewers and databases (= sources). It's not clx
compatible though.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120719/7ef4c7c7/attachment-0003.html>


More information about the Lazarus mailing list