wbhelpviewer.pas
来自「wbs43open-src.zip 数字隐藏工具」· PAS 代码 · 共 121 行
PAS
121 行
unit wbHelpViewer;interfaceuses SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs, QComCtrls, HelpIntfs;type THelpForm = class(TForm,ICustomHelpViewer,IExtendedHelpViewer) TextBrowser1: TTextBrowser; private { Private declarations } myID: Integer; helpMgr: IHelpManager; public procedure InitHelp(ihm: IHelpManager); function CanShowTableOfContents: Boolean; function GetHelpStrings(const HelpString: String): TStringList; function GetViewerName: String; procedure NotifyID(const ViewerID: Integer); procedure ShowHelp(const HelpString: String); procedure ShowTableOfContents; procedure ShutDown; procedure SoftShutDown; function UnderstandsKeyword(const HelpString: String): Integer; function UnderstandsTopic(const Topic: String): Boolean; function UnderstandsContext(const ContextID: Integer; const HelpFileName: String): Boolean; procedure DisplayTopic(const Topic: String); procedure DisplayHelpByContext(const ContextID: Integer; const HelpFileName: String);
destructor Destroy; virtual;end;var HelpForm: THelpForm;implementation{$R *.xfm}procedure THelpForm.InitHelp(ihm: IHelpManager);begin helpMgr:=ihm;end;function THelpForm.CanShowTableOfContents: Boolean;begin CanShowTableOfContents := true;end;function THelpForm.GetHelpStrings(const HelpString: String): TStringList;var stringList: TStringList;begin stringList.Add(HelpString); GetHelpStrings:=stringList;end;function THelpForm.GetViewerName: String;begin GetViewerName := 'wbHelpViewer';end;procedure THelpForm.NotifyID(const ViewerID: Integer);begin myID := ViewerID;end;procedure THelpForm.ShowHelp(const HelpString: String);begin Show;end;procedure THelpForm.ShowTableOfContents;begin Show;end;procedure THelpForm.ShutDown;beginend;procedure THelpForm.SoftShutDown;beginend;function THelpForm.UnderstandsKeyword(const HelpString: String): Integer;begin UnderstandsKeyword := 1;end;function THelpForm.UnderstandsTopic(const Topic: String): Boolean;begin UnderstandsTopic := true;end;function THelpForm.UnderstandsContext(const ContextID: Integer; const HelpFileName: String): Boolean;begin UnderstandsContext := true;end;procedure THelpForm.DisplayTopic(const Topic: String);begin // go to correct topic Show;end;procedure THelpForm.DisplayHelpByContext(const ContextID: Integer; const HelpFileName: String);begin TextBrowser1.FileName:=HelpFileName+'#'+InttoStr(ContextID); Show;end;destructor THelpForm.Destroy;beginend;end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?