| 1 | Unit InformationFormUnit;
|
|---|
| 2 |
|
|---|
| 3 | // NewView - a new OS/2 Help Viewer
|
|---|
| 4 | // Copyright 2003 Aaron Lawrence (aaronl at consultant dot com)
|
|---|
| 5 | // This software is released under the Gnu Public License - see readme.txt
|
|---|
| 6 |
|
|---|
| 7 | Interface
|
|---|
| 8 |
|
|---|
| 9 | Uses
|
|---|
| 10 | Classes,
|
|---|
| 11 | Forms,
|
|---|
| 12 | StdCtrls,
|
|---|
| 13 | Buttons,
|
|---|
| 14 | ACLLanguageUnit;
|
|---|
| 15 |
|
|---|
| 16 | Type
|
|---|
| 17 | TInformationForm = Class (TForm)
|
|---|
| 18 | InformationMemo: TMemo;
|
|---|
| 19 | OKButton: TButton;
|
|---|
| 20 | Procedure InformationFormOnSetupShow (Sender: TObject);
|
|---|
| 21 | Procedure InformationFormOnShow (Sender: TObject);
|
|---|
| 22 | Procedure InformationFormOnCreate (Sender: TObject);
|
|---|
| 23 | Private
|
|---|
| 24 | {Insert private declarations here}
|
|---|
| 25 | Public
|
|---|
| 26 | FText: pchar; // for messages with long lines
|
|---|
| 27 | Procedure OnLanguageEvent( Language: TLanguageFile;
|
|---|
| 28 | const Apply: boolean );
|
|---|
| 29 | End;
|
|---|
| 30 |
|
|---|
| 31 | Var
|
|---|
| 32 | InformationForm: TInformationForm;
|
|---|
| 33 |
|
|---|
| 34 | Implementation
|
|---|
| 35 |
|
|---|
| 36 | Uses
|
|---|
| 37 | ControlsUtility;
|
|---|
| 38 |
|
|---|
| 39 | Procedure TInformationForm.InformationFormOnSetupShow (Sender: TObject);
|
|---|
| 40 | Begin
|
|---|
| 41 | ScaleForm( self, 11, 16 );
|
|---|
| 42 |
|
|---|
| 43 | InformationMemo.XStretch := xsFrame;
|
|---|
| 44 | InformationMemo.YStretch := ysFrame;
|
|---|
| 45 | End;
|
|---|
| 46 |
|
|---|
| 47 | Procedure TInformationForm.InformationFormOnShow (Sender: TObject);
|
|---|
| 48 | Begin
|
|---|
| 49 | if FText <> nil then
|
|---|
| 50 | InformationMemo.Lines.SetText( FText );
|
|---|
| 51 | FText := nil;
|
|---|
| 52 | End;
|
|---|
| 53 |
|
|---|
| 54 | Procedure TInformationForm.InformationFormOnCreate (Sender: TObject);
|
|---|
| 55 | Begin
|
|---|
| 56 | RegisterForLanguages( OnLanguageEvent );
|
|---|
| 57 | End;
|
|---|
| 58 |
|
|---|
| 59 | Procedure TInformationForm.OnLanguageEvent( Language: TLanguageFile;
|
|---|
| 60 | const Apply: boolean );
|
|---|
| 61 | begin
|
|---|
| 62 | Language.LoadComponentLanguage( self, Apply );
|
|---|
| 63 | end;
|
|---|
| 64 |
|
|---|
| 65 | Initialization
|
|---|
| 66 | RegisterClasses ([TInformationForm, TMemo, TButton]);
|
|---|
| 67 | End.
|
|---|