-
Notifications
You must be signed in to change notification settings - Fork 3
/
macosextreg.pas
51 lines (35 loc) · 977 Bytes
/
macosextreg.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
unit macosextreg;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, macOSFormProp, PropEdits;
procedure Register;
implementation
type
{ TAppearancePropEditor }
TAppearancePropEditor = class(TStringPropertyEditor)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValues({%H-}Proc: TGetStrProc); override;
end;
procedure Register;
begin
RegisterComponents('macOS',[TMacOSFormProp]);
RegisterPropertyEditor( TypeInfo(String), TMacOSFormProp,
'Appearance', TAppearancePropEditor);
end;
{ TAppearancePropEditor }
function TAppearancePropEditor.GetAttributes: TPropertyAttributes;
begin
Result:=inherited GetAttributes;
Result := Result + [paValueList];
end;
procedure TAppearancePropEditor.GetValues(Proc: TGetStrProc);
begin
Proc(macOSNSAppearanceNameAqua);
Proc(macOSNSAppearanceNameVibrantDark);
Proc(macOSNSAppearanceNameVibrantLight);
end;
initialization
{$i macosextres.lrs}
end.