1 
2 {*****************************************}
3 {                                         }
4 {             FastReport v2.3             }
5 {              Picture editor             }
6 {                                         }
7 {  Copyright (c) 1998-99 by Tzyganenko A. }
8 {                                         }
9 {*****************************************}
10 
11 unit LR_GEdit;
12 
13 interface
14 
15 {$I LR_Vers.inc}
16 
17 uses
18   Classes, SysUtils, LResources,
19   Forms, Controls, Graphics, Dialogs,
20   ExtCtrls, Buttons, StdCtrls, ExtDlgs,
21 
22   LR_Const;
23 
24 type
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 
49 var
50   frGEditorForm: TfrGEditorForm;
51 
52 implementation
53 
54 {$R *.lfm}
55 
56 uses LR_Class, LR_Desgn;
57 
58 procedure TfrGEditorForm.BitBtn1Click(Sender: TObject);
59 begin
60   if OpenDlg.Execute then
61     Image1.Picture.LoadFromFile(OpenDlg.FileName);
62 end;
63 
64 procedure TfrGEditorForm.CB1Click(Sender: TObject);
65 begin
66   Image1.Stretch := CB1.Checked;
67 end;
68 
69 procedure TfrGEditorForm.Button4Click(Sender: TObject);
70 begin
71   Image1.Picture.Assign(nil);
72 end;
73 
74 procedure TfrGEditorForm.FormCreate(Sender: TObject);
75 begin
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;
83 end;
84 
85 procedure TfrGEditorForm.Button5Click(Sender: TObject);
86 begin
87   TfrDesignerForm(frDesigner).ShowMemoEditor;
88 end;
89 
90 end.
91 
92