IDE: register HTML help for LCL

git-svn-id: trunk@40244 -
This commit is contained in:
mattias 2013-02-10 12:57:01 +00:00
parent ac8852935f
commit 4d6489da76

View File

@ -178,13 +178,15 @@ type
// messages
procedure mnuEditMessageHelpClick(Sender: TObject);
private
FFCLHelpDB: THelpDatabase;
FFCLHelpDBPath: THelpBaseURLObject;
FHTMLProviders: TLIHProviders;
FLCLHelpDB: THelpDatabase;
FLCLHelpDBPath: THelpBaseURLObject;
FMainHelpDB: THelpDatabase;
FMainHelpDBPath: THelpBasePathObject;
FRTLHelpDB: THelpDatabase;
FFCLHelpDB: THelpDatabase;
FRTLHelpDBPath: THelpBaseURLObject;
FHTMLProviders: TLIHProviders;
procedure RegisterIDEHelpDatabases;
procedure RegisterDefaultIDEHelpViewers;
procedure FindDefaultBrowser(var DefaultBrowser, Params: string);
@ -226,6 +228,8 @@ type
property FCLHelpDBPath: THelpBaseURLObject read FFCLHelpDBPath;
property MainHelpDB: THelpDatabase read FMainHelpDB;
property MainHelpDBPath: THelpBasePathObject read FMainHelpDBPath;
property LCLHelpDB: THelpDatabase read FLCLHelpDB;
property LCLHelpDBPath: THelpBaseURLObject read FLCLHelpDBPath;
property RTLHelpDB: THelpDatabase read FRTLHelpDB;
property RTLHelpDBPath: THelpBaseURLObject read FRTLHelpDBPath;
end;
@ -1218,6 +1222,29 @@ procedure TIDEHelpManager.RegisterIDEHelpDatabases;
HTMLHelp.RegisterItem(DirItem);
end;
procedure CreateLCLHelpDB;
var
HTMLHelp: TFPDocHTMLHelpDatabase;
FPDocNode: THelpNode;
DirItem: THelpDBISourceDirectory;
begin
FLCLHelpDB:=HelpDatabases.CreateHelpDatabase(lihcLCLUnits,
TFPDocHTMLHelpDatabase,true);
HTMLHelp:=FRTLHelpDB as TFPDocHTMLHelpDatabase;
HTMLHelp.DefaultBaseURL:=lihLCLURL;
FLCLHelpDBPath:=THelpBaseURLObject.Create;
HTMLHelp.BasePathObject:=FLCLHelpDBPath;
// FPDoc nodes for units in the RTL
FPDocNode:=THelpNode.CreateURL(HTMLHelp,
'LCL - Lazarus Component Library Units',
'file://index.html');
HTMLHelp.TOCNode:=THelpNode.Create(HTMLHelp,FPDocNode);// once as TOC
DirItem:=THelpDBISourceDirectory.Create(FPDocNode,'$(LazarusDir)/lcl',
'*.pp;*.pas',true);// and once as normal page
HTMLHelp.RegisterItem(DirItem);
end;
procedure CreateFPCKeywordsHelpDB;
begin
{$IFDEF EnableSimpleFPCKeyWordHelpDB}
@ -1230,6 +1257,7 @@ begin
CreateMainIDEHelpDB;
CreateRTLHelpDB;
CreateFCLHelpDB;
CreateLCLHelpDB;
CreateFPCMessagesHelpDB;
CreateFPCKeywordsHelpDB;
end;
@ -1285,6 +1313,7 @@ begin
FreeThenNil(FMainHelpDBPath);
FreeThenNil(FRTLHelpDBPath);
FreeThenNil(FFCLHelpDBPath);
FreeThenNil(FLCLHelpDBPath);
HelpBoss:=nil;
LazarusHelp:=nil;
inherited Destroy;