Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathGDK.ToolsAPI.CustomEditor.pas
More file actions
Latest commit
104 lines (86 loc) · 2.73 KB
/
Copy pathGDK.ToolsAPI.CustomEditor.pas
File metadata and controls
104 lines (86 loc) · 2.73 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
unit GDK.ToolsAPI.CustomEditor;
interface
uses
ToolsAPI,
DesignIntf,
VCL.Forms,
Vcl.Graphics;
type
{$IF CompilerVersion >= 35.0}
TCustomEditorView = class(TInterfacedObject, INTACustomEditorView, INTACustomEditorView150, INTACustomEditorView280)
{$ELSEIF CompilerVersion >= 22.0}
TCustomEditorView = class(TInterfacedObject, INTACustomEditorView, INTACustomEditorView150)
{$ELSE}
TCustomEditorView = class(TInterfacedObject, INTACustomEditorView)
{$ENDIF}
strict protected
functionGetCaption: string; virtual; abstract;
functionGetEditorWindowCaption: string; virtual; abstract;
functionGetViewIdentifier: string; virtual; abstract;
functionGetFrameClass: TCustomFrameClass; virtual; abstract;
procedureFrameCreated(AFrame: TCustomFrame); virtual; abstract;
{$IF CompilerVersion >= 22.0}
functionGetImageIndex: Integer; virtual; abstract;
functionGetTabHintText: string; virtual; abstract;
procedureClose(var Allowed: Boolean); virtual;
{$ENDIF}
functionGetCanCloneView: Boolean; virtual;
functionCloneEditorView: INTACustomEditorView; virtual;
functionGetEditState: TEditState; virtual;
functionEditAction(Action: TEditAction): Boolean; virtual;
procedureCloseAllCalled(var ShouldClose: Boolean); virtual;
procedureSelectView; virtual;
procedureDeselectView; virtual;
{$IF CompilerVersion >= 35.0}
functionGetTabColor: TColor; virtual;
{$ENDIF}
public
property CanCloneView: Boolean read GetCanCloneView;
property Caption: string read GetCaption;
property EditorWindowCaption: string read GetEditorWindowCaption;
property FrameClass: TCustomFrameClass read GetFrameClass;
property ViewIdentifier: string read GetViewIdentifier;
end;
implementation
{ TCustomEditorView }
functionTCustomEditorView.GetCanCloneView: Boolean;
begin
Result := False;
end;
functionTCustomEditorView.CloneEditorView: INTACustomEditorView;
begin
Result := nil;
end;
functionTCustomEditorView.GetEditState: TEditState;
begin
Result := [TEditStates.esCanCut, TEditStates.esCanCopy, TEditStates.esCanPaste, TEditStates.esCanDelete];
end;
functionTCustomEditorView.EditAction(Action: TEditAction): Boolean;
begin
Result := False;
end;
procedureTCustomEditorView.CloseAllCalled(var ShouldClose: Boolean);
begin
ShouldClose := True
end;
procedureTCustomEditorView.SelectView;
begin
// No default implementation
end;
procedureTCustomEditorView.DeselectView;
begin
// No default implementation
end;
{$IF CompilerVersion >= 22.0}
procedureTCustomEditorView.Close(var Allowed: Boolean);
begin
Allowed := True;
end;
{$ENDIF}
{$IF CompilerVersion >= 35.0}
functionTCustomEditorView.GetTabColor: TColor;
begin
Result := clNone;
end;
{$ENDIF}
end.