-
Notifications
You must be signed in to change notification settings - Fork 0
/
uPSI_ComCtrls.pas
840 lines (721 loc) · 38.1 KB
/
uPSI_ComCtrls.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
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
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
unit uPSI_ComCtrls;
{$I PascalScript.inc}
{
This file has been generated by UnitParser v0.7, written by M. Knight
and updated by NP. v/d Spek and George Birbilis.
Source Code from Carlo Kok has been used to implement various sections of
UnitParser. Components of ROPS are used in the construction of UnitParser,
code implementing the class wrapper is taken from Carlo Kok's conv utility
}
interface
uses
SysUtils
,Classes
,uPSComponent
,uPSRuntime
,uPSCompiler
;
{ compile-time registration functions }
procedure SIRegister_TTabControl(CL: TPSPascalCompiler);
procedure SIRegister_TCustomTabControl(CL: TPSPascalCompiler);
procedure SIRegister_TTabControlNoteBookStrings(CL: TPSPascalCompiler);
procedure SIRegister_TTabControlStrings(CL: TPSPascalCompiler);
procedure SIRegister_TPageControl(CL: TPSPascalCompiler);
procedure SIRegister_TTabSheet(CL: TPSPascalCompiler);
procedure SIRegister_TStatusBar(CL: TPSPascalCompiler);
procedure SIRegister_TStatusPanels(CL: TPSPascalCompiler);
procedure SIRegister_TStatusPanel(CL: TPSPascalCompiler);
procedure SIRegister_ComCtrls(CL: TPSPascalCompiler);
{ run-time registration functions }
procedure RIRegister_ComCtrls_Routines(S: TPSExec);
procedure RIRegister_TTabControl(CL: TPSRuntimeClassImporter);
procedure RIRegister_TCustomTabControl(CL: TPSRuntimeClassImporter);
procedure RIRegister_TTabControlNoteBookStrings(CL: TPSRuntimeClassImporter);
procedure RIRegister_TTabControlStrings(CL: TPSRuntimeClassImporter);
procedure RIRegister_TPageControl(CL: TPSRuntimeClassImporter);
procedure RIRegister_TTabSheet(CL: TPSRuntimeClassImporter);
procedure RIRegister_TStatusBar(CL: TPSRuntimeClassImporter);
procedure RIRegister_TStatusPanels(CL: TPSRuntimeClassImporter);
procedure RIRegister_TStatusPanel(CL: TPSRuntimeClassImporter);
procedure RIRegister_ComCtrls(CL: TPSRuntimeClassImporter);
implementation
uses
LResources
,LCLIntf
,LCLType
,FileUtil
,LCLProc
,AvgLvlTree
,ImgList
,ActnList
,GraphType
,Graphics
,Menus
,Controls
,Forms
,ExtCtrls
,Buttons
,Themes
,CheckLst
,StdCtrls
,ComCtrls;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TTabControl(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomTabControl', 'TTabControl') do
with CL.AddClassN(CL.FindClass('TCustomTabControl'),'TTabControl') do
begin
RegisterMethod('Function IndexOfTabAt( X, Y : Integer) : Integer');
RegisterMethod('Function GetHitTestInfoAt( X, Y : Integer) : THitTests');
RegisterMethod('Function IndexOfTabWithCaption( const TabCaption : string) : Integer');
RegisterMethod('Function TabRect( Index : Integer) : TRect');
RegisterMethod('Function RowCount : Integer');
RegisterMethod('Procedure ScrollTabs( Delta : Integer)');
RegisterMethod('Procedure BeginUpdate');
RegisterMethod('Procedure EndUpdate');
RegisterMethod('Function IsUpdating : boolean');
RegisterProperty('TabIndex', 'Integer', iptrw);
RegisterProperty('Tabs', 'TStrings', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TCustomTabControl(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomControl', 'TCustomTabControl') do
with CL.AddClassN(CL.FindClass('TCustomControl'),'TCustomTabControl') do
begin
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TTabControlNoteBookStrings(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TTabControlStrings', 'TTabControlNoteBookStrings') do
with CL.AddClassN(CL.FindClass('TTabControlStrings'),'TTabControlNoteBookStrings') do
begin
RegisterProperty('NoteBook', 'TCustomTabControl', iptr);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TTabControlStrings(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TStrings', 'TTabControlStrings') do
with CL.AddClassN(CL.FindClass('TStrings'),'TTabControlStrings') do
begin
RegisterMethod('Constructor Create( TheTabControl : TCustomTabControl)');
RegisterMethod('Function GetHitTestInfoAt( X, Y : Integer) : THitTests');
RegisterMethod('Function GetSize : integer');
RegisterMethod('Function IndexOfTabAt( X, Y : Integer) : Integer');
RegisterMethod('Function RowCount : Integer');
RegisterMethod('Function TabRect( Index : Integer) : TRect');
RegisterMethod('Procedure ImageListChange( Sender : TObject)');
RegisterMethod('Procedure ScrollTabs( Delta : Integer)');
RegisterMethod('Procedure TabControlBoundsChange');
RegisterMethod('Procedure UpdateTabImages');
RegisterMethod('Procedure BeginUpdate');
RegisterMethod('Procedure EndUpdate');
RegisterMethod('Function IsUpdating : boolean');
RegisterProperty('TabControl', 'TCustomTabControl', iptr);
RegisterProperty('TabIndex', 'integer', iptrw);
RegisterProperty('HotTrack', 'Boolean', iptrw);
RegisterProperty('Images', 'TCustomImageList', iptrw);
RegisterProperty('MultiLine', 'Boolean', iptrw);
RegisterProperty('MultiSelect', 'Boolean', iptrw);
RegisterProperty('OwnerDraw', 'Boolean', iptrw);
RegisterProperty('RaggedRight', 'Boolean', iptrw);
RegisterProperty('ScrollOpposite', 'Boolean', iptrw);
RegisterProperty('TabHeight', 'Smallint', iptrw);
RegisterProperty('TabWidth', 'Smallint', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TPageControl(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomNotebook', 'TPageControl') do
with CL.AddClassN(CL.FindClass('TNoteBook'),'TPageControl') do
begin
RegisterMethod('Function FindNextPage( CurPage : TTabSheet; GoForward, CheckTabVisible : Boolean) : TTabSheet');
RegisterMethod('Procedure SelectNextPage( GoForward : Boolean)');
RegisterMethod('Procedure SelectNextPage( GoForward : Boolean; CheckTabVisible : Boolean)');
RegisterProperty('ActivePageIndex', 'Integer', iptrw);
RegisterProperty('Pages', 'TTabSheet Integer', iptr);
RegisterProperty('ActivePage', 'TTabSheet', iptrw);
RegisterProperty('TabIndex', 'Integer', iptrw);
RegisterProperty('OnChange', 'TNotifyEvent', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TTabSheet(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomPage', 'TTabSheet') do
with CL.AddClassN(CL.FindClass('TPage'),'TTabSheet') do
begin
RegisterProperty('PageControl', 'TPageControl', iptrw);
RegisterProperty('TabIndex', 'Integer', iptr);
RegisterProperty('OnMouseDown','TMouseEvent',iptrw);
RegisterProperty('OnMouseMove','TMouseMoveEvent',iptrw);
RegisterProperty('OnMouseUp','TMouseEvent',iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TStatusBar(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TWinControl', 'TStatusBar') do
with CL.AddClassN(CL.FindClass('TWinControl'),'TStatusBar') do
begin
RegisterMethod('Procedure InvalidatePanel( PanelIndex : integer; PanelParts : TPanelParts)');
RegisterMethod('Procedure BeginUpdate');
RegisterMethod('Procedure EndUpdate');
RegisterMethod('Function GetPanelIndexAt( X, Y : Integer) : Integer');
RegisterMethod('Function SizeGripEnabled : Boolean');
RegisterMethod('Function UpdatingStatusBar : boolean');
RegisterProperty('Canvas', 'TCanvas', iptr);
RegisterProperty('AutoHint', 'Boolean', iptrw);
RegisterProperty('Panels', 'TStatusPanels', iptrw);
RegisterProperty('SimpleText', 'String', iptrw);
RegisterProperty('SimplePanel', 'Boolean', iptrw);
RegisterProperty('SizeGrip', 'Boolean', iptrw);
RegisterProperty('OnDrawPanel', 'TDrawPanelEvent', iptrw);
RegisterProperty('OnHint', 'TNotifyEvent', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TStatusPanels(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCollection', 'TStatusPanels') do
with CL.AddClassN(CL.FindClass('TCollection'),'TStatusPanels') do
begin
RegisterMethod('Constructor Create( AStatusBar : TStatusBar)');
RegisterMethod('Function Add : TStatusPanel');
RegisterProperty('Items', 'TStatusPanel Integer', iptrw);
SetDefaultPropery('Items');
RegisterProperty('StatusBar', 'TStatusBar', iptr);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TStatusPanel(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCollectionItem', 'TStatusPanel') do
with CL.AddClassN(CL.FindClass('TCollectionItem'),'TStatusPanel') do
begin
RegisterMethod('Function StatusBar : TStatusBar');
RegisterProperty('Alignment', 'TAlignment', iptrw);
RegisterProperty('Bevel', 'TStatusPanelBevel', iptrw);
RegisterProperty('Style', 'TStatusPanelStyle', iptrw);
RegisterProperty('Text', 'string', iptrw);
RegisterProperty('Width', 'Integer', iptrw);
end;
end;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TCheckListBox(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomCheckListBox', 'TCheckListBox') do
with CL.AddClassN(CL.FindClass('TCustomCheckListBox'),'TCheckListBox') do
begin
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TCustomCheckListBox(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCustomListBox', 'TCustomCheckListBox') do
with CL.AddClassN(CL.FindClass('TCustomListBox'),'TCustomCheckListBox') do
begin
RegisterMethod('Procedure Toggle( AIndex : Integer)');
RegisterProperty('AllowGrayed', 'Boolean', iptrw);
RegisterProperty('Checked', 'Boolean Integer', iptrw);
RegisterProperty('ItemEnabled', 'Boolean Integer', iptrw);
RegisterProperty('State', 'TCheckBoxState Integer', iptrw);
RegisterProperty('Count', 'integer', iptr);
RegisterProperty('OnClickCheck', 'TNotifyEvent', iptrw);
RegisterProperty('OnItemClick', 'TCheckListClicked', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_CheckLst(CL: TPSPascalCompiler);
begin
CL.AddTypeS('TCheckListClicked', 'Procedure ( Sender : TObject; Index : integ'
+'er)');
SIRegister_TCustomCheckListBox(CL);
SIRegister_TCheckListBox(CL);
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_ComCtrls(CL: TPSPascalCompiler);
begin
CL.AddTypeS('THitTest', '( htAbove, htBelow, htNowhere, htOnItem, htOnButton,'
+' htOnIcon, htOnIndent, htOnLabel, htOnRight, htOnStateIcon, htToLeft, htTo'
+'Right )');
CL.AddTypeS('THitTests', 'set of THitTest');
CL.AddTypeS('TStatusPanelStyle', '( psText, psOwnerDraw )');
CL.AddTypeS('TStatusPanelBevel', '( pbNone, pbLowered, pbRaised )');
CL.AddClassN(CL.FindClass('TOBJECT'),'TStatusBar');
CL.AddTypeS('TPanelPart', '( ppText, ppBorder, ppWidth )');
CL.AddTypeS('TPanelParts', 'set of TPanelPart');
//CL.AddTypeS('TStatusPanelClass', 'class of TStatusPanel');
SIRegister_TStatusPanel(CL);
SIRegister_TStatusPanels(CL);
CL.AddTypeS('TDrawPanelEvent', 'Procedure ( StatusBar : TStatusBar; Panel : T'
+'StatusPanel; const Rect : TRect)');
SIRegister_TStatusBar(CL);
CL.AddClassN(CL.FindClass('TOBJECT'),'TPageControl');
CL.AddTypeS('TTabStyle', '( tsTabs, tsButtons, tsFlatButtons )');
SIRegister_TTabSheet(CL);
SIRegister_TPageControl(CL);
CL.AddClassN(CL.FindClass('TOBJECT'),'TCustomTabControl');
SIRegister_TTabControlStrings(CL);
SIRegister_TTabControlNoteBookStrings(CL);
CL.AddTypeS('TDrawTabEvent', 'Procedure ( Control : TCustomTabControl; TabInd'
+'ex : Integer; const Rect : TRect; Active : Boolean)');
SIRegister_TCustomTabControl(CL);
SIRegister_TTabControl(CL);
SIRegister_CheckLst(CL);
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TTabControlTabs_W(Self: TTabControl; const T: TStrings);
begin Self.Tabs := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlTabs_R(Self: TTabControl; var T: TStrings);
begin T := Self.Tabs; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlTabIndex_W(Self: TTabControl; const T: Integer);
begin Self.TabIndex := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlTabIndex_R(Self: TTabControl; var T: Integer);
begin T := Self.TabIndex; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlNoteBookStringsNoteBook_R(Self: TTabControlNoteBookStrings; var T: TCustomTabControl);
begin T := Self.NoteBook; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabWidth_W(Self: TTabControlStrings; const T: Smallint);
begin Self.TabWidth := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabWidth_R(Self: TTabControlStrings; var T: Smallint);
begin T := Self.TabWidth; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabHeight_W(Self: TTabControlStrings; const T: Smallint);
begin Self.TabHeight := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabHeight_R(Self: TTabControlStrings; var T: Smallint);
begin T := Self.TabHeight; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsScrollOpposite_W(Self: TTabControlStrings; const T: Boolean);
begin Self.ScrollOpposite := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsScrollOpposite_R(Self: TTabControlStrings; var T: Boolean);
begin T := Self.ScrollOpposite; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsRaggedRight_W(Self: TTabControlStrings; const T: Boolean);
begin Self.RaggedRight := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsRaggedRight_R(Self: TTabControlStrings; var T: Boolean);
begin T := Self.RaggedRight; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsOwnerDraw_W(Self: TTabControlStrings; const T: Boolean);
begin Self.OwnerDraw := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsOwnerDraw_R(Self: TTabControlStrings; var T: Boolean);
begin T := Self.OwnerDraw; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsMultiSelect_W(Self: TTabControlStrings; const T: Boolean);
begin Self.MultiSelect := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsMultiSelect_R(Self: TTabControlStrings; var T: Boolean);
begin T := Self.MultiSelect; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsMultiLine_W(Self: TTabControlStrings; const T: Boolean);
begin Self.MultiLine := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsMultiLine_R(Self: TTabControlStrings; var T: Boolean);
begin T := Self.MultiLine; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsImages_W(Self: TTabControlStrings; const T: TCustomImageList);
begin Self.Images := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsImages_R(Self: TTabControlStrings; var T: TCustomImageList);
begin T := Self.Images; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsHotTrack_W(Self: TTabControlStrings; const T: Boolean);
begin Self.HotTrack := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsHotTrack_R(Self: TTabControlStrings; var T: Boolean);
begin T := Self.HotTrack; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabIndex_W(Self: TTabControlStrings; const T: integer);
begin Self.TabIndex := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabIndex_R(Self: TTabControlStrings; var T: integer);
begin T := Self.TabIndex; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabControl_R(Self: TTabControlStrings; var T: TCustomTabControl);
begin T := Self.TabControl; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlOnChange_W(Self: TPageControl; const T: TNotifyEvent);
begin Self.OnChange := T; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlOnChange_R(Self: TPageControl; var T: TNotifyEvent);
begin T := Self.OnChange; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlTabIndex_W(Self: TPageControl; const T: Integer);
begin Self.TabIndex := T; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlTabIndex_R(Self: TPageControl; var T: Integer);
begin T := Self.TabIndex; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlActivePage_W(Self: TPageControl; const T: TTabSheet);
begin Self.ActivePage := T; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlActivePage_R(Self: TPageControl; var T: TTabSheet);
begin T := Self.ActivePage; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlPages_R(Self: TPageControl; var T: TTabSheet; const t1: Integer);
begin T := Self.Pages[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlActivePageIndex_W(Self: TPageControl; const T: Integer);
begin Self.ActivePageIndex := T; end;
(*----------------------------------------------------------------------------*)
procedure TPageControlActivePageIndex_R(Self: TPageControl; var T: Integer);
begin T := Self.ActivePageIndex; end;
(*----------------------------------------------------------------------------*)
{$IFNDEF FPC}
procedure TTabSheetTabIndex_W(Self: TTabSheet; const T: Integer);
begin Self.TabIndex := T; end;
{$ENDIF}
(*----------------------------------------------------------------------------*)
procedure TTabSheetTabIndex_R(Self: TTabSheet; var T: Integer);
begin T := Self.TabIndex; end;
(*----------------------------------------------------------------------------*)
procedure TTabSheetPageControl_W(Self: TTabSheet; const T: TPageControl);
begin Self.PageControl := T; end;
(*----------------------------------------------------------------------------*)
procedure TTabSheetPageControl_R(Self: TTabSheet; var T: TPageControl);
begin T := Self.PageControl; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarOnHint_W(Self: TStatusBar; const T: TNotifyEvent);
begin Self.OnHint := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarOnHint_R(Self: TStatusBar; var T: TNotifyEvent);
begin T := Self.OnHint; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarOnDrawPanel_W(Self: TStatusBar; const T: TDrawPanelEvent);
begin Self.OnDrawPanel := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarOnDrawPanel_R(Self: TStatusBar; var T: TDrawPanelEvent);
begin T := Self.OnDrawPanel; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarOnCreatePanelClass_W(Self: TStatusBar; const T: TSBCreatePanelClassEvent);
begin Self.OnCreatePanelClass := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarOnCreatePanelClass_R(Self: TStatusBar; var T: TSBCreatePanelClassEvent);
begin T := Self.OnCreatePanelClass; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarSizeGrip_W(Self: TStatusBar; const T: Boolean);
begin Self.SizeGrip := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarSizeGrip_R(Self: TStatusBar; var T: Boolean);
begin T := Self.SizeGrip; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarSimplePanel_W(Self: TStatusBar; const T: Boolean);
begin Self.SimplePanel := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarSimplePanel_R(Self: TStatusBar; var T: Boolean);
begin T := Self.SimplePanel; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarSimpleText_W(Self: TStatusBar; const T: String);
begin Self.SimpleText := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarSimpleText_R(Self: TStatusBar; var T: String);
begin T := Self.SimpleText; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarPanels_W(Self: TStatusBar; const T: TStatusPanels);
begin Self.Panels := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarPanels_R(Self: TStatusBar; var T: TStatusPanels);
begin T := Self.Panels; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarAutoHint_W(Self: TStatusBar; const T: Boolean);
begin Self.AutoHint := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarAutoHint_R(Self: TStatusBar; var T: Boolean);
begin T := Self.AutoHint; end;
(*----------------------------------------------------------------------------*)
procedure TStatusBarCanvas_R(Self: TStatusBar; var T: TCanvas);
begin T := Self.Canvas; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelsStatusBar_R(Self: TStatusPanels; var T: TStatusBar);
begin T := Self.StatusBar; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelsItems_W(Self: TStatusPanels; const T: TStatusPanel; const t1: Integer);
begin Self.Items[t1] := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelsItems_R(Self: TStatusPanels; var T: TStatusPanel; const t1: Integer);
begin T := Self.Items[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelWidth_W(Self: TStatusPanel; const T: Integer);
begin Self.Width := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelWidth_R(Self: TStatusPanel; var T: Integer);
begin T := Self.Width; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelText_W(Self: TStatusPanel; const T: string);
begin Self.Text := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelText_R(Self: TStatusPanel; var T: string);
begin T := Self.Text; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelStyle_W(Self: TStatusPanel; const T: TStatusPanelStyle);
begin Self.Style := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelStyle_R(Self: TStatusPanel; var T: TStatusPanelStyle);
begin T := Self.Style; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelBevel_W(Self: TStatusPanel; const T: TStatusPanelBevel);
begin Self.Bevel := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelBevel_R(Self: TStatusPanel; var T: TStatusPanelBevel);
begin T := Self.Bevel; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelAlignment_W(Self: TStatusPanel; const T: TAlignment);
begin Self.Alignment := T; end;
(*----------------------------------------------------------------------------*)
procedure TStatusPanelAlignment_R(Self: TStatusPanel; var T: TAlignment);
begin T := Self.Alignment; end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_ComCtrls_Routines(S: TPSExec);
begin
S.RegisterDelphiFunction(@CompareExpandedNodes, 'CompareExpandedNodes', cdRegister);
S.RegisterDelphiFunction(@CompareTextWithExpandedNode, 'CompareTextWithExpandedNode', cdRegister);
S.RegisterDelphiFunction(@Register, 'Register', cdRegister);
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TTabControl(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TTabControl) do
begin
RegisterMethod(@TTabControl.IndexOfTabAt, 'IndexOfTabAt');
RegisterMethod(@TTabControl.GetHitTestInfoAt, 'GetHitTestInfoAt');
RegisterMethod(@TTabControl.IndexOfTabWithCaption, 'IndexOfTabWithCaption');
RegisterMethod(@TTabControl.TabRect, 'TabRect');
RegisterMethod(@TTabControl.RowCount, 'RowCount');
RegisterMethod(@TTabControl.ScrollTabs, 'ScrollTabs');
RegisterMethod(@TTabControl.BeginUpdate, 'BeginUpdate');
RegisterMethod(@TTabControl.EndUpdate, 'EndUpdate');
RegisterMethod(@TTabControl.IsUpdating, 'IsUpdating');
RegisterPropertyHelper(@TTabControlTabIndex_R,@TTabControlTabIndex_W,'TabIndex');
RegisterPropertyHelper(@TTabControlTabs_R,@TTabControlTabs_W,'Tabs');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TCustomTabControl(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TCustomTabControl) do
begin
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TTabControlNoteBookStrings(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TTabControlNoteBookStrings) do
begin
RegisterPropertyHelper(@TTabControlNoteBookStringsNoteBook_R,nil,'NoteBook');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TTabControlStrings(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TTabControlStrings) do
begin
RegisterVirtualConstructor(@TTabControlStrings.Create, 'Create');
RegisterVirtualMethod(@TTabControlStrings.GetHitTestInfoAt, 'GetHitTestInfoAt');
RegisterVirtualMethod(@TTabControlStrings.IndexOfTabAt, 'IndexOfTabAt');
RegisterVirtualMethod(@TTabControlStrings.RowCount, 'RowCount');
RegisterVirtualMethod(@TTabControlStrings.TabRect, 'TabRect');
RegisterVirtualMethod(@TTabControlStrings.ImageListChange, 'ImageListChange');
RegisterVirtualMethod(@TTabControlStrings.ScrollTabs, 'ScrollTabs');
RegisterVirtualMethod(@TTabControlStrings.TabControlBoundsChange, 'TabControlBoundsChange');
RegisterVirtualMethod(@TTabControlStrings.UpdateTabImages, 'UpdateTabImages');
RegisterVirtualMethod(@TTabControlStrings.BeginUpdate, 'BeginUpdate');
RegisterVirtualMethod(@TTabControlStrings.EndUpdate, 'EndUpdate');
RegisterVirtualMethod(@TTabControlStrings.IsUpdating, 'IsUpdating');
RegisterPropertyHelper(@TTabControlStringsTabControl_R,nil,'TabControl');
RegisterPropertyHelper(@TTabControlStringsTabIndex_R,@TTabControlStringsTabIndex_W,'TabIndex');
RegisterPropertyHelper(@TTabControlStringsHotTrack_R,@TTabControlStringsHotTrack_W,'HotTrack');
RegisterPropertyHelper(@TTabControlStringsImages_R,@TTabControlStringsImages_W,'Images');
RegisterPropertyHelper(@TTabControlStringsMultiLine_R,@TTabControlStringsMultiLine_W,'MultiLine');
RegisterPropertyHelper(@TTabControlStringsMultiSelect_R,@TTabControlStringsMultiSelect_W,'MultiSelect');
RegisterPropertyHelper(@TTabControlStringsOwnerDraw_R,@TTabControlStringsOwnerDraw_W,'OwnerDraw');
RegisterPropertyHelper(@TTabControlStringsRaggedRight_R,@TTabControlStringsRaggedRight_W,'RaggedRight');
RegisterPropertyHelper(@TTabControlStringsScrollOpposite_R,@TTabControlStringsScrollOpposite_W,'ScrollOpposite');
RegisterPropertyHelper(@TTabControlStringsTabHeight_R,@TTabControlStringsTabHeight_W,'TabHeight');
RegisterPropertyHelper(@TTabControlStringsTabWidth_R,@TTabControlStringsTabWidth_W,'TabWidth');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TPageControl(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TPageControl) do
begin
RegisterMethod(@TPageControl.FindNextPage, 'FindNextPage');
RegisterMethod(@TPageControl.SelectNextPage, 'SelectNextPage');
RegisterMethod(@TPageControl.SelectNextPage, 'SelectNextPage');
RegisterPropertyHelper(@TPageControlActivePageIndex_R,@TPageControlActivePageIndex_W,'ActivePageIndex');
RegisterPropertyHelper(@TPageControlPages_R,nil,'Pages');
RegisterPropertyHelper(@TPageControlActivePage_R,@TPageControlActivePage_W,'ActivePage');
RegisterPropertyHelper(@TPageControlTabIndex_R,@TPageControlTabIndex_W,'TabIndex');
RegisterPropertyHelper(@TPageControlOnChange_R,@TPageControlOnChange_W,'OnChange');
end;
end;
procedure TControlOnMouseDown_W(Self: TTabsheet; T: TMouseEvent); begin Self.OnMouseDown := T; end;
procedure TControlOnMouseDown_R(Self: TTabsheet; var T: TMouseEvent); begin T := Self.OnMouseDown; end;
procedure TControlOnMouseMove_W(Self: TTabsheet; T: TMouseMoveEvent); begin Self.OnMouseMove := T; end;
procedure TControlOnMouseMove_R(Self: TTabsheet; var T: TMouseMoveEvent); begin T := Self.OnMouseMove; end;
procedure TControlOnMouseUp_W(Self: TTabsheet; T: TMouseEvent); begin Self.OnMouseUp := T; end;
procedure TControlOnMouseUp_R(Self: TTabsheet; var T: TMouseEvent); begin T := Self.OnMouseUp; end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TTabSheet(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TTabSheet) do
begin
RegisterPropertyHelper(@TTabSheetPageControl_R,@TTabSheetPageControl_W,'PageControl');
RegisterPropertyHelper(@TTabSheetTabIndex_R,nil,'TabIndex');
RegisterEventPropertyHelper(@TControlOnMouseDown_R,@TControlOnMouseDown_W,'OnMouseDown');
RegisterEventPropertyHelper(@TControlOnMouseMove_R,@TControlOnMouseMove_W,'OnMouseMove');
RegisterEventPropertyHelper(@TControlOnMouseUp_R,@TControlOnMouseUp_W,'OnMouseUp');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TStatusBar(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TStatusBar) do
begin
RegisterVirtualMethod(@TStatusBar.InvalidatePanel, 'InvalidatePanel');
RegisterMethod(@TStatusBar.BeginUpdate, 'BeginUpdate');
RegisterMethod(@TStatusBar.EndUpdate, 'EndUpdate');
RegisterMethod(@TStatusBar.GetPanelIndexAt, 'GetPanelIndexAt');
RegisterMethod(@TStatusBar.SizeGripEnabled, 'SizeGripEnabled');
RegisterMethod(@TStatusBar.UpdatingStatusBar, 'UpdatingStatusBar');
RegisterPropertyHelper(@TStatusBarCanvas_R,nil,'Canvas');
RegisterPropertyHelper(@TStatusBarAutoHint_R,@TStatusBarAutoHint_W,'AutoHint');
RegisterPropertyHelper(@TStatusBarPanels_R,@TStatusBarPanels_W,'Panels');
RegisterPropertyHelper(@TStatusBarSimpleText_R,@TStatusBarSimpleText_W,'SimpleText');
RegisterPropertyHelper(@TStatusBarSimplePanel_R,@TStatusBarSimplePanel_W,'SimplePanel');
RegisterPropertyHelper(@TStatusBarSizeGrip_R,@TStatusBarSizeGrip_W,'SizeGrip');
RegisterPropertyHelper(@TStatusBarOnDrawPanel_R,@TStatusBarOnDrawPanel_W,'OnDrawPanel');
RegisterPropertyHelper(@TStatusBarOnHint_R,@TStatusBarOnHint_W,'OnHint');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TStatusPanels(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TStatusPanels) do
begin
RegisterConstructor(@TStatusPanels.Create, 'Create');
RegisterMethod(@TStatusPanels.Add, 'Add');
RegisterPropertyHelper(@TStatusPanelsItems_R,@TStatusPanelsItems_W,'Items');
RegisterPropertyHelper(@TStatusPanelsStatusBar_R,nil,'StatusBar');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TStatusPanel(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TStatusPanel) do
begin
RegisterMethod(@TStatusPanel.StatusBar, 'StatusBar');
RegisterPropertyHelper(@TStatusPanelAlignment_R,@TStatusPanelAlignment_W,'Alignment');
RegisterPropertyHelper(@TStatusPanelBevel_R,@TStatusPanelBevel_W,'Bevel');
RegisterPropertyHelper(@TStatusPanelStyle_R,@TStatusPanelStyle_W,'Style');
RegisterPropertyHelper(@TStatusPanelText_R,@TStatusPanelText_W,'Text');
RegisterPropertyHelper(@TStatusPanelWidth_R,@TStatusPanelWidth_W,'Width');
end;
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxOnItemClick_W(Self: TCustomCheckListBox; const T: TCheckListClicked);
begin Self.OnItemClick := T; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxOnItemClick_R(Self: TCustomCheckListBox; var T: TCheckListClicked);
begin T := Self.OnItemClick; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxOnClickCheck_W(Self: TCustomCheckListBox; const T: TNotifyEvent);
begin Self.OnClickCheck := T; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxOnClickCheck_R(Self: TCustomCheckListBox; var T: TNotifyEvent);
begin T := Self.OnClickCheck; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxCount_R(Self: TCustomCheckListBox; var T: integer);
begin T := Self.Count; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxState_W(Self: TCustomCheckListBox; const T: TCheckBoxState; const t1: Integer);
begin Self.State[t1] := T; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxState_R(Self: TCustomCheckListBox; var T: TCheckBoxState; const t1: Integer);
begin T := Self.State[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxItemEnabled_W(Self: TCustomCheckListBox; const T: Boolean; const t1: Integer);
begin Self.ItemEnabled[t1] := T; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxItemEnabled_R(Self: TCustomCheckListBox; var T: Boolean; const t1: Integer);
begin T := Self.ItemEnabled[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxChecked_W(Self: TCustomCheckListBox; const T: Boolean; const t1: Integer);
begin Self.Checked[t1] := T; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxChecked_R(Self: TCustomCheckListBox; var T: Boolean; const t1: Integer);
begin T := Self.Checked[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxAllowGrayed_W(Self: TCustomCheckListBox; const T: Boolean);
begin Self.AllowGrayed := T; end;
(*----------------------------------------------------------------------------*)
procedure TCustomCheckListBoxAllowGrayed_R(Self: TCustomCheckListBox; var T: Boolean);
begin T := Self.AllowGrayed; end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_CheckLst_Routines(S: TPSExec);
begin
S.RegisterDelphiFunction(@Register, 'Register', cdRegister);
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TCheckListBox(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TCheckListBox) do
begin
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TCustomCheckListBox(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TCustomCheckListBox) do
begin
RegisterMethod(@TCustomCheckListBox.Toggle, 'Toggle');
RegisterPropertyHelper(@TCustomCheckListBoxAllowGrayed_R,@TCustomCheckListBoxAllowGrayed_W,'AllowGrayed');
RegisterPropertyHelper(@TCustomCheckListBoxChecked_R,@TCustomCheckListBoxChecked_W,'Checked');
RegisterPropertyHelper(@TCustomCheckListBoxItemEnabled_R,@TCustomCheckListBoxItemEnabled_W,'ItemEnabled');
RegisterPropertyHelper(@TCustomCheckListBoxState_R,@TCustomCheckListBoxState_W,'State');
RegisterPropertyHelper(@TCustomCheckListBoxCount_R,nil,'Count');
RegisterPropertyHelper(@TCustomCheckListBoxOnClickCheck_R,@TCustomCheckListBoxOnClickCheck_W,'OnClickCheck');
RegisterPropertyHelper(@TCustomCheckListBoxOnItemClick_R,@TCustomCheckListBoxOnItemClick_W,'OnItemClick');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_CheckLst(CL: TPSRuntimeClassImporter);
begin
RIRegister_TCustomCheckListBox(CL);
RIRegister_TCheckListBox(CL);
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_ComCtrls(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TStatusBar) do;
RIRegister_TStatusPanel(CL);
RIRegister_TStatusPanels(CL);
RIRegister_TStatusBar(CL);
with CL.Add(TPageControl) do;
RIRegister_TTabSheet(CL);
RIRegister_TPageControl(CL);
with CL.Add(TCustomTabControl) do;
RIRegister_TTabControlStrings(CL);
RIRegister_TTabControlNoteBookStrings(CL);
RIRegister_TCustomTabControl(CL);
RIRegister_TTabControl(CL);
RIRegister_CheckLst(CL);
end;
end.