git-svn-id: trunk@9422 -
This commit is contained in:
mattias 2006-06-12 19:06:18 +00:00
parent 436dd7b560
commit 8bf46b037a
2 changed files with 8 additions and 13 deletions

View File

@ -46,10 +46,8 @@ type
procedure HelpButtonClick(Sender: TObject); procedure HelpButtonClick(Sender: TObject);
private private
{ private declarations } { private declarations }
public public
{ public declarations } { public declarations }
end; end;
var var
@ -65,16 +63,12 @@ begin
ShowHelpOrErrorForKeyword('','HTML/index.html'); // HTML is case sensitive ShowHelpOrErrorForKeyword('','HTML/index.html'); // HTML is case sensitive
end; end;
procedure TForm1.FormCreate(Sender: TObject); procedure TForm1.FormCreate(Sender: TObject);
begin begin
HtmlHelp2Viewer.RegisterHelpViewer; // This registers the help viewer HtmlHelp2Viewer.RegisterHelpViewer; // This registers the help viewer
// using the iPro viewer // using the iPro viewer
end; end;
initialization initialization
{$I htmlhelp2unit1.lrs} {$I htmlhelp2unit1.lrs}

View File

@ -35,8 +35,9 @@ unit HtmlHelp2Viewer;
interface interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls, LCLProc, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
IpHtml, Buttons, helpintfs, lazhelpintf, ComCtrls, ipfilebroker, iputils; LCLProc, IpHtml, Buttons, helpintfs, lazhelpintf, ComCtrls, ipfilebroker,
iputils;
type type
@ -69,6 +70,9 @@ procedure RegisterHelpViewer;
implementation implementation
type type
{ THTMLHelpViewer }
THTMLHelpViewer = class(THelpViewer) THTMLHelpViewer = class(THelpViewer)
private private
public public
@ -122,20 +126,17 @@ begin
IHP.GoBack; IHP.GoBack;
end; end;
procedure THelpViewerForm.ForwardButtonClick(Sender: TObject); procedure THelpViewerForm.ForwardButtonClick(Sender: TObject);
begin begin
IHP.GoForward; IHP.GoForward;
end; end;
procedure THelpViewerForm.IHPDocumentOpen(Sender: TObject); procedure THelpViewerForm.IHPDocumentOpen(Sender: TObject);
begin begin
BackButton.Enabled := IHP.canGoBack; BackButton.Enabled := IHP.canGoBack;
ForwardButton.Enabled := IHP.canGoForward; ForwardButton.Enabled := IHP.canGoForward;
end; end;
procedure THelpViewerForm.showURL(URL : String); procedure THelpViewerForm.showURL(URL : String);
begin begin
Show; Show;