mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 09:59:10 +02:00
IDE: Extending IDE context help search to lazutils.chm, issue #32022 from zbyna
git-svn-id: branches/fixes_1_8@55352 -
This commit is contained in:
parent
5ce7b893d7
commit
e4db52e558
@ -472,6 +472,10 @@ begin
|
||||
begin
|
||||
BaseURL.BaseURL := 'lcl.chm://';
|
||||
DB.OnFindViewer:=@DBFindViewer;
|
||||
end else if (DB.ID = 'LazUtilsUnits') and (BaseURL.BaseURL = '') then
|
||||
begin
|
||||
BaseURL.BaseURL := 'lazutils.chm://';
|
||||
DB.OnFindViewer:=@DBFindViewer;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -189,6 +189,8 @@ type
|
||||
FMainHelpDBPath: THelpBasePathObject;
|
||||
FRTLHelpDB: THelpDatabase;
|
||||
FRTLHelpDBPath: THelpBaseURLObject;
|
||||
FLazUtilsHelpDB: THelpDatabase;
|
||||
FLazUtilsHelpDBPath: THelpBaseURLObject;
|
||||
// Used by CreateHint
|
||||
FHtmlHelpProvider: TAbstractIDEHTMLProvider;
|
||||
FHintWindow: THintWindow;
|
||||
@ -235,6 +237,8 @@ type
|
||||
property LCLHelpDBPath: THelpBaseURLObject read FLCLHelpDBPath;
|
||||
property RTLHelpDB: THelpDatabase read FRTLHelpDB;
|
||||
property RTLHelpDBPath: THelpBaseURLObject read FRTLHelpDBPath;
|
||||
property LazUtilsHelpDB: THelpDatabase read FLazUtilsHelpDB;
|
||||
property LazUtilsHelpDBPath: THelpBaseURLObject read FLazUtilsHelpDBPath;
|
||||
end;
|
||||
|
||||
{ TIDEHintWindowManager }
|
||||
@ -273,6 +277,8 @@ const
|
||||
lihcRTLUnits = 'RTLUnits';
|
||||
lihcFCLUnits = 'FCLUnits';
|
||||
lihcLCLUnits = 'LCLUnits';
|
||||
lihcLazUtilsUnits = 'LazUtilsUnits';
|
||||
|
||||
|
||||
lihBaseUrl = 'http://lazarus-ccr.sourceforge.net/docs/';
|
||||
|
||||
@ -280,6 +286,9 @@ const
|
||||
lihFCLURL = lihBaseUrl+'fcl/';
|
||||
lihLCLURL = lihBaseUrl+'lcl/';
|
||||
|
||||
lihLazUtilsURL = 'lazutils.chm://';
|
||||
// not important see: ../components/chmhelp/packages/idehelp/lazchmhelp.pas
|
||||
|
||||
var
|
||||
HelpBoss: TBaseHelpManager = nil;
|
||||
|
||||
@ -1316,6 +1325,30 @@ procedure TIDEHelpManager.RegisterIDEHelpDatabases;
|
||||
HTMLHelp.RegisterItem(DirItem);
|
||||
end;
|
||||
|
||||
procedure CreateLazUtilsHelpDB;
|
||||
var
|
||||
HTMLHelp: TFPDocHTMLHelpDatabase;
|
||||
FPDocNode: THelpNode;
|
||||
DirItem: THelpDBISourceDirectory;
|
||||
begin
|
||||
FLazUtilsHelpDB:=HelpDatabases.CreateHelpDatabase(lihcLazUtilsUnits,
|
||||
TFPDocHTMLHelpDatabase,true);
|
||||
HTMLHelp:=FLazUtilsHelpDB as TFPDocHTMLHelpDatabase;
|
||||
HTMLHelp.DefaultBaseURL:=lihLazUtilsURL;
|
||||
FLazUtilsHelpDBPath:=THelpBaseURLObject.Create;
|
||||
HTMLHelp.BasePathObject:=FLazUtilsHelpDBPath;
|
||||
|
||||
// FPDoc nodes for units in the LazUtils
|
||||
FPDocNode:=THelpNode.CreateURL(HTMLHelp,
|
||||
'LazUtils - Lazarus Utilities Library Units',
|
||||
'file://index.html');
|
||||
HTMLHelp.TOCNode:=THelpNode.Create(HTMLHelp,FPDocNode);// once as TOC
|
||||
DirItem:=THelpDBISourceDirectory.Create(FPDocNode,
|
||||
'$(LazarusDir)/components/lazutils',
|
||||
'*.pp;*.pas',true);// and once as normal page
|
||||
HTMLHelp.RegisterItem(DirItem);
|
||||
end;
|
||||
|
||||
procedure CreateFPCKeywordsHelpDB;
|
||||
begin
|
||||
{$IFDEF EnableSimpleFPCKeyWordHelpDB}
|
||||
@ -1331,6 +1364,7 @@ begin
|
||||
CreateLCLHelpDB;
|
||||
CreateFPCMessagesHelpDB;
|
||||
CreateFPCKeywordsHelpDB;
|
||||
CreateLazUtilsHelpDB;
|
||||
end;
|
||||
|
||||
procedure TIDEHelpManager.RegisterDefaultIDEHelpViewers;
|
||||
|
Loading…
Reference in New Issue
Block a user