forked from bgrabitmap/bgracontrols
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbcmaterialspinedit.pas
204 lines (174 loc) · 5.32 KB
/
bcmaterialspinedit.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
unit BCMaterialSpinEdit;
{$mode objfpc}{$H+}
interface
uses
BCMaterialEdit, Classes, Controls, Dialogs, ExtCtrls, Forms, Graphics,
{$IFDEF FPC} LCLType, LResources, {$ENDIF} Menus, Spin, StdCtrls, SysUtils;
type
{ TBCMaterialSpinEdit }
TBCMaterialSpinEdit = class(specialize TBCMaterialEditBase<TSpinEdit>)
private
function GetEditEditorEnabled: boolean;
function GetEditIncrement: double;
function GetEditMinValue: double;
function GetEditMaxValue: double;
function GetEditValue: double;
procedure SetEditEditorEnabled(AValue: boolean);
procedure SetEditIncrement(AValue: double);
procedure SetEditMinValue(AValue: double);
procedure SetEditMaxValue(AValue: double);
procedure SetEditValue(AValue: double);
function GetOnEditMouseWheelHorz: TMouseWheelEvent;
function GetOnEditMouseWheelLeft: TMouseWheelUpDownEvent;
function GetOnEditMouseWheelRight: TMouseWheelUpDownEvent;
procedure SetOnEditMouseWheelHorz(AValue: TMouseWheelEvent);
procedure SetOnEditMouseWheelLeft(AValue: TMouseWheelUpDownEvent);
procedure SetOnEditMouseWheelRight(AValue: TMouseWheelUpDownEvent);
published
property Align;
property Alignment;
property Anchors;
property AutoSelect;
property AutoSize;
//property BiDiMode;
property BorderSpacing;
property Caption;
//property CharCase;
property Color;
property Constraints;
property Cursor;
property DisabledColor;
//property DoubleBuffered;
//property EchoMode;
property Edit: TSpinEdit read FEdit;
property EditorEnabled: boolean read GetEditEditorEnabled write SetEditEditorEnabled default True;
property EditLabel;
property Enabled;
property Font;
property Height;
//property HideSelection;
property Hint;
property Increment: double read GetEditIncrement write SetEditIncrement;
property Left;
property MinValue: double read GetEditMinValue write SetEditMinValue;
//property MaxLength;
property MaxValue: double read GetEditMaxValue write SetEditMaxValue;
property LabelSpacing;
property Name;
//property ParentBiDiMode;
property ParentColor;
property ParentFont;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Tag;
//property Text;
//property TextHint;
property Top;
property Value: double read GetEditValue write SetEditValue;
property Visible;
property Width;
property OnChange;
property OnChangeBounds;
property OnClick;
//property OnContextPopup;
//property OnDragDrop;
//property OnDragOver;
property OnEditingDone;
//property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseMove;
property OnMouseUp;
property OnMouseWheel;
property OnMouseWheelDown;
property OnMouseWheelUp;
property OnMouseWheelHorz: TMouseWheelEvent read GetOnEditMouseWheelHorz write SetOnEditMouseWheelHorz;
property OnMouseWheelLeft: TMouseWheelUpDownEvent read GetOnEditMouseWheelLeft write SetOnEditMouseWheelLeft;
property OnMouseWheelRight: TMouseWheelUpDownEvent read GetOnEditMouseWheelRight write SetOnEditMouseWheelRight;
property OnResize;
//property OnStartDrag;
property OnUTF8KeyPress;
end;
procedure Register;
implementation
procedure Register;
begin
{$IFDEF FPC}
{$I icons\bcmaterialspinedit_icon.lrs}
{$ENDIF}
RegisterComponents('BGRA Controls', [TBCMaterialSpinEdit]);
end;
function TBCMaterialSpinEdit.GetEditEditorEnabled: boolean;
begin
result := FEdit.EditorEnabled;
end;
function TBCMaterialSpinEdit.GetEditIncrement: double;
begin
result := FEdit.Increment;
end;
function TBCMaterialSpinEdit.GetEditMinValue: double;
begin
result := FEdit.MinValue;
end;
function TBCMaterialSpinEdit.GetEditMaxValue: double;
begin
result := FEdit.MaxValue;
end;
function TBCMaterialSpinEdit.GetEditValue: double;
begin
result := FEdit.Value;
end;
procedure TBCMaterialSpinEdit.SetEditEditorEnabled(AValue: boolean);
begin
FEdit.EditorEnabled := AValue;
end;
procedure TBCMaterialSpinEdit.SetEditIncrement(AValue: double);
begin
FEdit.Increment := AValue;
end;
procedure TBCMaterialSpinEdit.SetEditMinValue(AValue: double);
begin
FEdit.MinValue := AValue;
end;
procedure TBCMaterialSpinEdit.SetEditMaxValue(AValue: double);
begin
FEdit.MaxValue := AValue;
end;
procedure TBCMaterialSpinEdit.SetEditValue(AValue: double);
begin
FEdit.Value := AValue;
end;
function TBCMaterialSpinEdit.GetOnEditMouseWheelHorz: TMouseWheelEvent;
begin
result := FEdit.OnMouseWheelHorz;
end;
function TBCMaterialSpinEdit.GetOnEditMouseWheelLeft: TMouseWheelUpDownEvent;
begin
result := FEdit.OnMouseWheelLeft;
end;
function TBCMaterialSpinEdit.GetOnEditMouseWheelRight: TMouseWheelUpDownEvent;
begin
result := FEdit.OnMouseWheelRight;
end;
procedure TBCMaterialSpinEdit.SetOnEditMouseWheelHorz(AValue: TMouseWheelEvent);
begin
FEdit.OnMouseWheelHorz := AValue;
end;
procedure TBCMaterialSpinEdit. SetOnEditMouseWheelLeft(AValue: TMouseWheelUpDownEvent);
begin
FEdit.OnMouseWheelLeft := AValue;
end;
procedure TBCMaterialSpinEdit.SetOnEditMouseWheelRight(AValue: TMouseWheelUpDownEvent);
begin
FEdit.OnMouseWheelRight := AValue;
end;
end.