forked from bergsteiger/mindstream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msShapesProvider.mixin.pas
49 lines (32 loc) · 986 Bytes
/
msShapesProvider.mixin.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
{$IfNDef TmsShapesProvider_uses_intf}
// interface
{$Define TmsShapesProvider_uses_intf}
// uses
{$Else TmsShapesProvider_uses_intf}
{$IfNDef TmsShapesProvider_intf}
// http://programmingmindstream.blogspot.ru/2014/12/generic-2.html
{$Define TmsShapesProvider_intf}
TmsShapesProvider = class abstract(TmsShapesProviderParent{, ImsShapesProvider})
protected
procedure ShapesForToolbarToList(aList: TStrings);
end;//TmsShapesProvider
{$Else TmsShapesProvider_intf}
// implementation
{$IfNDef TmsShapesProvider_uses_impl}
// uses
{$Define TmsShapesProvider_uses_impl}
{$Else TmsShapesProvider_uses_impl}
// TmsShapesProvider
procedure TmsShapesProvider.ShapesForToolbarToList(aList: TStrings);
begin
aList.Clear;
TmsShapesForToolbar.Instance.IterateShapes(
procedure (const aShapeClass : MCmsShape)
begin
aList.Add(aShapeClass.Name);
end
);
end;
{$EndIf TmsShapesProvider_uses_impl}
{$EndIf TmsShapesProvider_intf}
{$EndIf TmsShapesProvider_uses_intf}