blob: 76d54de0f76c443a24344fdc585e2093dc0ac203 (
plain)
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
|
unit gfx_clipboard;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
TfpgClipboard = class(TObject)
private
FClipboardData: string;
function GetText: string;
procedure SetText(const AValue: string);
public
property Text: string read GetText write SetText;
end;
// singleton
function fpgClipboard: TfpgClipboard;
implementation
var
uClipboard: TfpgClipboard;
function fpgClipboard: TfpgClipboard;
begin
if not Assigned(uClipboard) then
uClipboard := TfpgClipboard.Create;
Result := uClipboard;
end;
{ TfpgClipboard }
function TfpgClipboard.GetText: string;
begin
// this is just temporary!!
Result := FClipboardData;
end;
procedure TfpgClipboard.SetText(const AValue: string);
begin
FClipboardData := AValue;
end;
initialization
uClipboard := nil;
finalization
uClipboard.Free;
end.
|