⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 列表8.7.txt

📁 klinux书籍的配套光盘。可以学习学习。
💻 TXT
字号:
【列表8.7】改变目录内容和主题的格式。
{  
The HelpManager calls UnderstandsKeywords to ask if the Viewer suppo
  a particular keyword. The Viewer responds with the number of topics
  that match the keyword. A return value of 0 indicates that the
  viewer doesn't support that keyword.
}
function  TSimpleHelpViewer. UnderstandsKeyword
  (const HelpString: String): Integer;
/ar
  lstLine: TStringList;
  i : Integer;
begin
  LoadHelpFile;
  lstLine := TStringList. Create;
  try
     FHelpStrings.Clear;
     for i := 0 to FlstHelpFile. Count-1 do
     begin
        lstLine. CommaText := FlstHelpFile[i];
        if lstLine. Count >= 3 then
           if SameText (lstLine[0], HelpString) then
              FHelpStrings.Add (tstLine[1]);
     end;
  finally
     lstLine. Free;
  end;
  Result := FHelpStrings.Count;
end;
{  The HelpManager calls this function to ask if the Viewer can display
  a table of contents. If the viewer can display the TOC, it should
  return True.
}
function  TSimpleHelpViewer. CanShowTableOfContents : Boolean;
begin
  Result := True;
end;
t
   The HelpManager calls this procedure when it wants the Viewer to
   display the table of contents. The HelpManager should only call
   this function if CanShowTableOfContents returns True.
}
procedure TSimpleHelpViewer. ShowTableOfContents;
begin
   LoadHelpFile;
   ShowTOC (GetHelpFileName, FlstHelpFile);
end;
{
   The HelpManager calls this procedure when it wants the Viewer to
   display help for a particular topic.
}
procedure TSimpleHelpViewer. ShowHelp(const HelpString: String);
var
   lstLine: TStringList;
   i: Integer;
begin
   LoadHelpFile;
   lstLine := TStringList. Create;
  try
      { Locate the first occurrence of HelpString in the file }
     for i := 0 to FlstHelpFile. Count-1 do
     begin
        lstLine. CommaText := FlstHelpFile[i];
        if SameText (lstLine[0], HelpString) then
        begin
           frmHelpTopic. ShowTopic (lstLine[1], lstLine[2]);
           exit;
        end;
     end;
  finally
     lstLine. Free;
   end;
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -