?? 列表8.7.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 + -