unit Settings;

{
[Settings] [1.1]
Delphi 2005
April 2008


LICENSE

The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
"http://www.mozilla.org/MPL/"

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.

The Original Code is "[settings.pas] and [settings.dfm]".

The Initial Developer of the Original Code is Martin Holmes (Victoria,
BC, Canada, "http://www.mholmes.com/"). Copyright (C) 2005-8 Martin Holmes
and the University of Victoria Computing and Media Centre. The code was 
co-developed for university and personal projects, and rights are shared
by Martin Holmes and the University of Victoria. All Rights Reserved.
}

{
  Written by Martin Holmes, October 2005 - April 2008.

  This unit and associated form constitutes a Settings screen which allows
  the user to control aspects of the Web View output for the Image Markup Tool.
  
  Dependencies:

 FormState (to save and reload form state).

 TntUnicode libraries (Troy Wolbrink).
 mdhSpin (TmdhSpinEdit) (Martin Holmes)
}
interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TntForms, FormState, StdCtrls, Buttons, TntButtons, Spin, TntStdCtrls,
  mdhSpin;

type
  TufrmSettings = class(TTntForm)
    ubnSettingsOK: TTntBitBtn;
    ugbWebViewSettings: TTntGroupBox;
    ulbWVImageMaxWidth: TTntLabel;
    seWVMaxImageWidth: TMdhSpinEdit;
    ugbGeneral: TTntGroupBox;
    ucbCopySchemaWhenSaving: TTntCheckBox;
    procedure TntFormDestroy(Sender: TObject);
    procedure TntFormCreate(Sender: TObject);
    procedure ubnSettingsOKClick(Sender: TObject);
  private
    FFormStateSaver: TFormStateSaver;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ufrmSettings: TufrmSettings;

implementation

{$R *.dfm}

procedure TufrmSettings.ubnSettingsOKClick(Sender: TObject);
begin
  Hide;
end;

procedure TufrmSettings.TntFormCreate(Sender: TObject);
begin
  FFormStateSaver := TFormStateSaver.Create(Self, True, True, True, True, True,
                                            True, True, True, False);
end;

procedure TufrmSettings.TntFormDestroy(Sender: TObject);
begin
  FFormStateSaver.Free;
end;

end.
