/
shape.go
502 lines (377 loc) · 10.7 KB
/
shape.go
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
//----------------------------------------
// 代码由GenlibVcl工具自动生成。
// Copyright © ying32. All Rights Reserved.
//
//----------------------------------------
package vcl
import (
. "github.com/ying32/govcl/vcl/api"
. "github.com/ying32/govcl/vcl/types"
)
type TShape struct {
IControl
instance uintptr
}
func NewShape(owner IComponent) *TShape {
s := new(TShape)
s.instance = Shape_Create(CheckPtr(owner))
return s
}
func ShapeFromInst(inst uintptr) *TShape {
s := new(TShape)
s.instance = inst
return s
}
func ShapeFromObj(obj IObject) *TShape {
s := new(TShape)
s.instance = CheckPtr(obj)
return s
}
func (s *TShape) Free() {
if s.instance != 0 {
Shape_Free(s.instance)
s.instance = 0
}
}
func (s *TShape) Instance() uintptr {
return s.instance
}
func (s *TShape) IsValid() bool {
return s.instance != 0
}
func TShapeClass() TClass {
return Shape_StaticClassType()
}
func (s *TShape) BringToFront() {
Shape_BringToFront(s.instance)
}
func (s *TShape) ClientToScreen(Point TPoint) TPoint {
return Shape_ClientToScreen(s.instance, Point)
}
func (s *TShape) ClientToParent(Point TPoint, AParent IWinControl) TPoint {
return Shape_ClientToParent(s.instance, Point , CheckPtr(AParent))
}
func (s *TShape) Dragging() bool {
return Shape_Dragging(s.instance)
}
func (s *TShape) HasParent() bool {
return Shape_HasParent(s.instance)
}
func (s *TShape) Hide() {
Shape_Hide(s.instance)
}
func (s *TShape) Invalidate() {
Shape_Invalidate(s.instance)
}
func (s *TShape) Perform(Msg uint32, WParam uintptr, LParam int) int {
return Shape_Perform(s.instance, Msg , WParam , LParam)
}
func (s *TShape) Refresh() {
Shape_Refresh(s.instance)
}
func (s *TShape) Repaint() {
Shape_Repaint(s.instance)
}
func (s *TShape) ScreenToClient(Point TPoint) TPoint {
return Shape_ScreenToClient(s.instance, Point)
}
func (s *TShape) ParentToClient(Point TPoint, AParent IWinControl) TPoint {
return Shape_ParentToClient(s.instance, Point , CheckPtr(AParent))
}
func (s *TShape) SendToBack() {
Shape_SendToBack(s.instance)
}
func (s *TShape) SetBounds(ALeft int32, ATop int32, AWidth int32, AHeight int32) {
Shape_SetBounds(s.instance, ALeft , ATop , AWidth , AHeight)
}
func (s *TShape) Show() {
Shape_Show(s.instance)
}
func (s *TShape) Update() {
Shape_Update(s.instance)
}
func (s *TShape) GetTextBuf(Buffer string, BufSize int32) int32 {
return Shape_GetTextBuf(s.instance, Buffer , BufSize)
}
func (s *TShape) GetTextLen() int32 {
return Shape_GetTextLen(s.instance)
}
func (s *TShape) FindComponent(AName string) *TComponent {
return ComponentFromInst(Shape_FindComponent(s.instance, AName))
}
func (s *TShape) GetNamePath() string {
return Shape_GetNamePath(s.instance)
}
func (s *TShape) Assign(Source IObject) {
Shape_Assign(s.instance, CheckPtr(Source))
}
func (s *TShape) DisposeOf() {
Shape_DisposeOf(s.instance)
}
func (s *TShape) ClassType() TClass {
return Shape_ClassType(s.instance)
}
func (s *TShape) ClassName() string {
return Shape_ClassName(s.instance)
}
func (s *TShape) InstanceSize() int32 {
return Shape_InstanceSize(s.instance)
}
func (s *TShape) InheritsFrom(AClass TClass) bool {
return Shape_InheritsFrom(s.instance, AClass)
}
func (s *TShape) Equals(Obj IObject) bool {
return Shape_Equals(s.instance, CheckPtr(Obj))
}
func (s *TShape) GetHashCode() int32 {
return Shape_GetHashCode(s.instance)
}
func (s *TShape) ToString() string {
return Shape_ToString(s.instance)
}
func (s *TShape) Align() TAlign {
return Shape_GetAlign(s.instance)
}
func (s *TShape) SetAlign(value TAlign) {
Shape_SetAlign(s.instance, value)
}
func (s *TShape) Anchors() TAnchors {
return Shape_GetAnchors(s.instance)
}
func (s *TShape) SetAnchors(value TAnchors) {
Shape_SetAnchors(s.instance, value)
}
func (s *TShape) Brush() *TBrush {
return BrushFromInst(Shape_GetBrush(s.instance))
}
func (s *TShape) SetBrush(value *TBrush) {
Shape_SetBrush(s.instance, CheckPtr(value))
}
func (s *TShape) DragCursor() TCursor {
return Shape_GetDragCursor(s.instance)
}
func (s *TShape) SetDragCursor(value TCursor) {
Shape_SetDragCursor(s.instance, value)
}
func (s *TShape) DragKind() TDragKind {
return Shape_GetDragKind(s.instance)
}
func (s *TShape) SetDragKind(value TDragKind) {
Shape_SetDragKind(s.instance, value)
}
func (s *TShape) DragMode() TDragMode {
return Shape_GetDragMode(s.instance)
}
func (s *TShape) SetDragMode(value TDragMode) {
Shape_SetDragMode(s.instance, value)
}
func (s *TShape) Enabled() bool {
return Shape_GetEnabled(s.instance)
}
func (s *TShape) SetEnabled(value bool) {
Shape_SetEnabled(s.instance, value)
}
func (s *TShape) ParentShowHint() bool {
return Shape_GetParentShowHint(s.instance)
}
func (s *TShape) SetParentShowHint(value bool) {
Shape_SetParentShowHint(s.instance, value)
}
func (s *TShape) Pen() *TPen {
return PenFromInst(Shape_GetPen(s.instance))
}
func (s *TShape) SetPen(value *TPen) {
Shape_SetPen(s.instance, CheckPtr(value))
}
func (s *TShape) Shape() TShapeType {
return Shape_GetShape(s.instance)
}
func (s *TShape) SetShape(value TShapeType) {
Shape_SetShape(s.instance, value)
}
func (s *TShape) ShowHint() bool {
return Shape_GetShowHint(s.instance)
}
func (s *TShape) SetShowHint(value bool) {
Shape_SetShowHint(s.instance, value)
}
func (s *TShape) Visible() bool {
return Shape_GetVisible(s.instance)
}
func (s *TShape) SetVisible(value bool) {
Shape_SetVisible(s.instance, value)
}
func (s *TShape) SetOnContextPopup(fn TContextPopupEvent) {
Shape_SetOnContextPopup(s.instance, fn)
}
func (s *TShape) SetOnDragDrop(fn TDragDropEvent) {
Shape_SetOnDragDrop(s.instance, fn)
}
func (s *TShape) SetOnDragOver(fn TDragOverEvent) {
Shape_SetOnDragOver(s.instance, fn)
}
func (s *TShape) SetOnEndDock(fn TEndDragEvent) {
Shape_SetOnEndDock(s.instance, fn)
}
func (s *TShape) SetOnEndDrag(fn TEndDragEvent) {
Shape_SetOnEndDrag(s.instance, fn)
}
func (s *TShape) SetOnMouseDown(fn TMouseEvent) {
Shape_SetOnMouseDown(s.instance, fn)
}
func (s *TShape) SetOnMouseEnter(fn TNotifyEvent) {
Shape_SetOnMouseEnter(s.instance, fn)
}
func (s *TShape) SetOnMouseLeave(fn TNotifyEvent) {
Shape_SetOnMouseLeave(s.instance, fn)
}
func (s *TShape) SetOnMouseMove(fn TMouseMoveEvent) {
Shape_SetOnMouseMove(s.instance, fn)
}
func (s *TShape) SetOnMouseUp(fn TMouseEvent) {
Shape_SetOnMouseUp(s.instance, fn)
}
func (s *TShape) SetOnStartDock(fn TStartDockEvent) {
Shape_SetOnStartDock(s.instance, fn)
}
func (s *TShape) Action() *TAction {
return ActionFromInst(Shape_GetAction(s.instance))
}
func (s *TShape) SetAction(value IComponent) {
Shape_SetAction(s.instance, CheckPtr(value))
}
func (s *TShape) BiDiMode() TBiDiMode {
return Shape_GetBiDiMode(s.instance)
}
func (s *TShape) SetBiDiMode(value TBiDiMode) {
Shape_SetBiDiMode(s.instance, value)
}
func (s *TShape) BoundsRect() TRect {
return Shape_GetBoundsRect(s.instance)
}
func (s *TShape) SetBoundsRect(value TRect) {
Shape_SetBoundsRect(s.instance, value)
}
func (s *TShape) ClientHeight() int32 {
return Shape_GetClientHeight(s.instance)
}
func (s *TShape) SetClientHeight(value int32) {
Shape_SetClientHeight(s.instance, value)
}
func (s *TShape) ClientRect() TRect {
return Shape_GetClientRect(s.instance)
}
func (s *TShape) ClientWidth() int32 {
return Shape_GetClientWidth(s.instance)
}
func (s *TShape) SetClientWidth(value int32) {
Shape_SetClientWidth(s.instance, value)
}
func (s *TShape) ExplicitLeft() int32 {
return Shape_GetExplicitLeft(s.instance)
}
func (s *TShape) ExplicitTop() int32 {
return Shape_GetExplicitTop(s.instance)
}
func (s *TShape) ExplicitWidth() int32 {
return Shape_GetExplicitWidth(s.instance)
}
func (s *TShape) ExplicitHeight() int32 {
return Shape_GetExplicitHeight(s.instance)
}
func (s *TShape) Floating() bool {
return Shape_GetFloating(s.instance)
}
func (s *TShape) Parent() *TWinControl {
return WinControlFromInst(Shape_GetParent(s.instance))
}
func (s *TShape) SetParent(value IWinControl) {
Shape_SetParent(s.instance, CheckPtr(value))
}
func (s *TShape) StyleElements() TStyleElements {
return Shape_GetStyleElements(s.instance)
}
func (s *TShape) SetStyleElements(value TStyleElements) {
Shape_SetStyleElements(s.instance, value)
}
func (s *TShape) AlignWithMargins() bool {
return Shape_GetAlignWithMargins(s.instance)
}
func (s *TShape) SetAlignWithMargins(value bool) {
Shape_SetAlignWithMargins(s.instance, value)
}
func (s *TShape) Left() int32 {
return Shape_GetLeft(s.instance)
}
func (s *TShape) SetLeft(value int32) {
Shape_SetLeft(s.instance, value)
}
func (s *TShape) Top() int32 {
return Shape_GetTop(s.instance)
}
func (s *TShape) SetTop(value int32) {
Shape_SetTop(s.instance, value)
}
func (s *TShape) Width() int32 {
return Shape_GetWidth(s.instance)
}
func (s *TShape) SetWidth(value int32) {
Shape_SetWidth(s.instance, value)
}
func (s *TShape) Height() int32 {
return Shape_GetHeight(s.instance)
}
func (s *TShape) SetHeight(value int32) {
Shape_SetHeight(s.instance, value)
}
func (s *TShape) Cursor() TCursor {
return Shape_GetCursor(s.instance)
}
func (s *TShape) SetCursor(value TCursor) {
Shape_SetCursor(s.instance, value)
}
func (s *TShape) Hint() string {
return Shape_GetHint(s.instance)
}
func (s *TShape) SetHint(value string) {
Shape_SetHint(s.instance, value)
}
func (s *TShape) Margins() *TMargins {
return MarginsFromInst(Shape_GetMargins(s.instance))
}
func (s *TShape) SetMargins(value *TMargins) {
Shape_SetMargins(s.instance, CheckPtr(value))
}
func (s *TShape) CustomHint() *TCustomHint {
return CustomHintFromInst(Shape_GetCustomHint(s.instance))
}
func (s *TShape) SetCustomHint(value IComponent) {
Shape_SetCustomHint(s.instance, CheckPtr(value))
}
func (s *TShape) ComponentCount() int32 {
return Shape_GetComponentCount(s.instance)
}
func (s *TShape) ComponentIndex() int32 {
return Shape_GetComponentIndex(s.instance)
}
func (s *TShape) SetComponentIndex(value int32) {
Shape_SetComponentIndex(s.instance, value)
}
func (s *TShape) Owner() *TComponent {
return ComponentFromInst(Shape_GetOwner(s.instance))
}
func (s *TShape) Name() string {
return Shape_GetName(s.instance)
}
func (s *TShape) SetName(value string) {
Shape_SetName(s.instance, value)
}
func (s *TShape) Tag() int {
return Shape_GetTag(s.instance)
}
func (s *TShape) SetTag(value int) {
Shape_SetTag(s.instance, value)
}
func (s *TShape) Components(AIndex int32) *TComponent {
return ComponentFromInst(Shape_GetComponents(s.instance, AIndex))
}