Browse Source

+ Implement Topic Search

git-svn-id: trunk@5922 -
pierre 18 years ago
parent
commit
1724a37358
1 changed files with 20 additions and 0 deletions
  1. 20 0
      ide/fpmhelp.inc

+ 20 - 0
ide/fpmhelp.inc

@@ -32,9 +32,29 @@ begin
 end;
 
 procedure TIDEApp.HelpTopicSearch;
+var FileID: word;
+    Ctx   : THelpCtx;
+var Found: boolean;
+var
+    EditorWindow : PSourceWindow;
+    S : string;
 begin
+  EditorWindow:=FirstEditorWindow;
+  If assigned(EditorWindow) then
+    S:=LowerCaseStr(EditorWindow^.Editor^.GetCurrentWord)
+  else
+    S:='';
+  CheckHelpSystem;
+  Found:=false;
+  if S<>'' then
+    Found:=HelpFacility^.TopicSearch(S,FileID,Ctx);
+  if Found then
+     Help(FileID,Ctx,false)
+  else
+     HelpIndex('');
 end;
 
+
 procedure TIDEApp.HelpPrevTopic;
 begin
   if HelpWindow=nil then HelpContents else