unit WizTmpl;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls;

type
  TWizardTemplateForm = class(TForm)
    BackwardButton: TButton;
    ForwardButton: TButton;
    CancelButton: TButton;
    Panel: TPanel;
    ImgPanel: TPanel;
    Image: TImage;
    TextPanel: TPanel;
    procedure BackwardButtonClick(Sender: TObject);
    procedure ForwardButtonClick(Sender: TObject);
    procedure FormKeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
  public
    function  GoBackward:Boolean;virtual;abstract;
    function  GoForward:Boolean;virtual;abstract;
  end;

var
  WizardTemplateForm: TWizardTemplateForm;

implementation

{$R *.DFM}

procedure TWizardTemplateForm.BackwardButtonClick(Sender: TObject);
begin
  if(GoBackward) then
    ModalResult:=mrRetry;
end;

procedure TWizardTemplateForm.ForwardButtonClick(Sender: TObject);
begin
  if(GoForward) then
    ModalResult:=mrOk;
end;

procedure TWizardTemplateForm.FormKeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  case Key of
  188: // '<'
    if(ssCtrl in Shift) then
      BackwardButtonClick(Self);
  190: // '>'
    if(ssCtrl in Shift) then
      ForwardButtonClick(Self);
  end;
end;

end.
