PageRenderTime 12ms CodeModel.GetById 10ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/components/lazreport/source/lr_gedit.pas

http://github.com/graemeg/lazarus
Pascal | 91 lines | 58 code | 20 blank | 13 comment | 1 complexity | 038ca5a1db3d3542be47068d8f264dd3 MD5 | raw file
 1
 2{*****************************************}
 3{                                         }
 4{             FastReport v2.3             }
 5{              Picture editor             }
 6{                                         }
 7{  Copyright (c) 1998-99 by Tzyganenko A. }
 8{                                         }
 9{*****************************************}
10
11unit LR_GEdit;
12
13interface
14
15{$I LR_Vers.inc}
16
17uses
18  Classes, SysUtils, LResources,
19  Forms, Controls, Graphics, Dialogs,
20  ExtCtrls, Buttons, StdCtrls, ExtDlgs,
21
22  LR_Const;
23
24type
25
26  { TfrGEditorForm }
27
28  TfrGEditorForm = class(TForm)
29    Image1: TImage;
30    Bevel1: TBevel;
31    CB1: TCheckBox;
32    Button1: TButton;
33    Button2: TButton;
34    Button3: TButton;
35    Button4: TButton;
36    Button5: TButton;
37    OpenDlg: TOpenPictureDialog;
38    procedure BitBtn1Click(Sender: TObject);
39    procedure CB1Click(Sender: TObject);
40    procedure Button4Click(Sender: TObject);
41    procedure FormCreate(Sender: TObject);
42    procedure Button5Click(Sender: TObject);
43  private
44    { Private declarations }
45  public
46    { Public declarations }
47  end;
48
49var
50  frGEditorForm: TfrGEditorForm;
51
52implementation
53
54{$R *.lfm}
55
56uses LR_Class, LR_Desgn;
57
58procedure TfrGEditorForm.BitBtn1Click(Sender: TObject);
59begin
60  if OpenDlg.Execute then
61    Image1.Picture.LoadFromFile(OpenDlg.FileName);
62end;
63
64procedure TfrGEditorForm.CB1Click(Sender: TObject);
65begin
66  Image1.Stretch := CB1.Checked;
67end;
68
69procedure TfrGEditorForm.Button4Click(Sender: TObject);
70begin
71  Image1.Picture.Assign(nil);
72end;
73
74procedure TfrGEditorForm.FormCreate(Sender: TObject);
75begin
76  Caption := sGEditorFormCapt;
77  CB1.Caption := sGEditorFormStretch;
78  Button3.Caption := sGEditorFormLoad;
79  Button4.Caption := sGEditorFormClear;
80  Button5.Caption := sGEditorFormMemo;
81  Button1.Caption := sOk;
82  Button2.Caption := sCancel;
83end;
84
85procedure TfrGEditorForm.Button5Click(Sender: TObject);
86begin
87  TfrDesignerForm(frDesigner).ShowMemoEditor;
88end;
89
90end.
91