unit ucabecalho;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls;

type
  TOKCabecalhoDlg = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    Bevel1: TBevel;
    Label1: TLabel;
    e_cabec: TEdit;
    Label3: TLabel;
    e_autor: TEdit;
    Label4: TLabel;
    e_email: TEdit;
    Label5: TLabel;
    e_logotipo: TEdit;
    e_titulo: TEdit;
    Label2: TLabel;
    Label6: TLabel;
    e_modelo: TEdit;
    procedure OKBtnClick(Sender: TObject);
    procedure CancelBtnClick(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
     ok: boolean;
    { Public declarations }
  end;

var
  OKCabecalhoDlg: TOKCabecalhoDlg;

implementation
uses uvars;

{$R *.dfm}

procedure TOKCabecalhoDlg.OKBtnClick(Sender: TObject);
begin
  ok := true;
end;

procedure TOKCabecalhoDlg.CancelBtnClick(Sender: TObject);
begin
  ok := false;
end;

procedure TOKCabecalhoDlg.FormActivate(Sender: TObject);
begin
    if e_autor.text    = '' then     e_autor.Text := nomeAutor;
    if e_email.text    = '' then     e_email.Text := emailAutor;
    if e_logotipo.text = '' then     e_logotipo.Text := logotipoPadrao;
    if e_modelo.text   = '' then     e_modelo.Text := nomeModeloDefault;
end;

end.
