-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
ChatGPT.Overlay.pas
59 lines (45 loc) · 1.09 KB
/
ChatGPT.Overlay.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
unit ChatGPT.Overlay;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
ChatGPT.Classes, FMX.Objects, System.Generics.Collections;
type
TFrameOveraly = class(TFrame)
RectangleBG: TRectangle;
private
FMode: TWindowMode;
protected
procedure SetMode(const Value: TWindowMode); virtual;
public
property Mode: TWindowMode read FMode write SetMode;
procedure Cancel; virtual; abstract;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
var
Overlays: TList<TFrameOveraly>;
implementation
{$R *.fmx}
{ TFrameOveraly }
constructor TFrameOveraly.Create(AOwner: TComponent);
begin
inherited;
Overlays.Add(Self);
Name := '';
SetFocus;
end;
destructor TFrameOveraly.Destroy;
begin
Overlays.Remove(Self);
inherited;
end;
procedure TFrameOveraly.SetMode(const Value: TWindowMode);
begin
FMode := Value;
end;
initialization
Overlays := TList<TFrameOveraly>.Create;
finalization
Overlays.Free;
end.