-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUSelection.pas
More file actions
39 lines (31 loc) · 780 Bytes
/
USelection.pas
File metadata and controls
39 lines (31 loc) · 780 Bytes
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
unit USelection;
interface
uses
UInterfaceWrapper, GrymCore_TLB, UFeature, Graphics;
type
TSelection = class(TInterfaceWrapper<ISelection>)
public
procedure AddFeature(Feature: TFeature);
function GetColor: TColor;
procedure SetColor(Color: TColor);
end;
implementation
uses
SysUtils, ComObj, ActiveX;
{ TSelection }
procedure TSelection.AddFeature(Feature: TFeature);
begin
OleCheck(Self.GetInterface.AddFeature(Feature.GetInterface));
end;
function TSelection.GetColor: TColor;
var
Color: Cardinal;
begin
OleCheck(Self.GetInterface.Get_Color(Color));
Result := TColor(Color)
end;
procedure TSelection.SetColor(Color: TColor);
begin
OleCheck(Self.GetInterface.Set_Color(OLE_COLOR(Color)));
end;
end.