Repository navigation
Expand file tree
/
Copy pathSCInstrumentation.pas
More file actions
4810 lines (4000 loc) · 122 KB
/
Copy pathSCInstrumentation.pas
File metadata and controls
4810 lines (4000 loc) · 122 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
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
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{*******************************************************}
{ }
{ CA SweetControls Component Library }
{ }
{ Copyright (c) 1996,2004 CodeAccelerate Corporation }
{ }
{*******************************************************}
unit SCInstrumentation;
{$I SweetControls.inc}
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
SCCommon, SCConsts, SCControl;
type
TSCMeterStyle = (scmsClassic, scmsGradient, scmsMetal, scmsRaised, scmsXP);
TSCCustomMeter = class;
TSCMeterSegment = class(TCollectionItem)
private
FActiveColor: TColor;
FColor: TColor;
FCount: Integer;
procedure SetActiveColor(Value: TColor);
procedure SetColor(Value: TColor);
procedure SetCount(Value: Integer);
protected
function GetDisplayName: string; override;
public
constructor Create(Collection: TCollection); override;
procedure Assign(Source: TPersistent); override;
published
property ActiveColor: TColor read FActiveColor write SetActiveColor default clLime;
property Color: TColor read FColor write SetColor default clGreen;
property Count: Integer read FCount write SetCount default 2;
end;
TSCMeterSegments = class(TCollection)
private
FOwner: TSCCustomMeter;
function GetItem(Index: Integer): TSCMeterSegment;
procedure SetItem(Index: Integer; Value: TSCMeterSegment);
protected
function GetOwner: TPersistent; override;
procedure Update(Item: TCollectionItem); override;
public
constructor Create(AOwner: TSCCustomMeter);
function Add: TSCMeterSegment;
{$IFDEF SC_DELPHI5_AND_EARLY}
property Owner: TSCCustomMeter read FOwner;
{$ENDIF}
property Items[Index: Integer]: TSCMeterSegment read GetItem write SetItem; default;
end;
TSCMeterBorderProps = class(TSCControlBorderProps)
public
constructor Create(AOwner: TSCCustomControl); override;
published
property Border default sccbLowered;
property Color;
property ExDraw;
property FlatColor;
property FlatInnerColor;
property InnerBorder;
property Width;
end;
TSCCustomMeter = class(TSCCustomControl)
private
FMin: Integer;
FMax: Integer;
FOrientation: TSCOrientation;
FPosition: Integer;
FSegments: TSCMeterSegments;
FStyle: TSCMeterStyle;
FSegmentPos: Integer;
FSegmentCount: Integer;
FSegmentSize: Integer;
FShowInactive: Boolean;
FSegmentBuffer: TList;
FSingleActive: Boolean;
procedure SetOrientation(Value: TSCOrientation);
procedure SetMin(Value: Integer);
procedure SetMax(Value: Integer);
procedure SetPosition(Value: Integer);
procedure SetSegments(Value: TSCMeterSegments);
procedure SetShowInactive(Value: Boolean);
procedure SetSingleActive(Value: Boolean);
procedure SetStyle(Value: TSCMeterStyle);
procedure ClearSegmentBuffer;
procedure PrepareSegmentBuffer(UpdateAll: Boolean);
function GetSegmentBitmap(C: TColor): TBitmap;
procedure SegmentChanged(Item: TCollectionItem);
function UpdateSegmentValues(Full: Boolean = True): Boolean;
procedure CalculateSegments(Full: Boolean = True);
procedure DrawSegment(Canvas: TCanvas; R: TRect; C: TColor);
protected
procedure CreateWnd; override;
procedure Loaded; override;
procedure Paint; override;
procedure Resize; override;
procedure SetIndent(Value: Integer); override;
procedure SpacingChanged; override;
procedure IndentChanged; override;
function GetBorderPropsClass: TSCControlBorderPropsClass; override;
function GetBlendValue: Word; override;
property Color default clBlack;
property ParentColor default False;
property Indent default 2;
property Orientation: TSCOrientation read FOrientation write SetOrientation default scoHorizontal;
property Min: Integer read FMin write SetMin default 0;
property Max: Integer read FMax write SetMax default 100;
property Position: Integer read FPosition write SetPosition default 0;
property Segments: TSCMeterSegments read FSegments write SetSegments;
property ShowInactive: Boolean read FShowInactive write SetShowInactive default True;
property SingleActive: Boolean read FSingleActive write SetSingleActive default False;
property Spacing default 2;
property Style: TSCMeterStyle read FStyle write SetStyle default scmsClassic;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
end;
TSCMeter = class(TSCCustomMeter)
published
property Align;
property Anchors;
property BorderProps;
property Color;
property Constraints;
property Cursor;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Indent;
property Max;
property Min;
property Orientation;
property ParentColor;
property ParentShowHint;
property Picture;
property PictureProps;
property PopupMenu;
property Position;
property Segments;
property ShowHint;
property ShowInactive;
property SingleActive;
property Spacing;
property Style;
property TabOrder;
property TabStop;
property Tag;
property Transparent;
property Visible;
property OnCanResize;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
TSCMatrixBorderProps = class(TSCControlBorderProps)
public
constructor Create(AOwner: TSCCustomControl); override;
published
property Border default sccbLowered;
property Color;
property ExDraw;
property FlatColor;
property FlatInnerColor;
property InnerBorder;
property Width;
end;
TSCMatrixScrollType = (scstLeftToRight, scstRightToLeft);
TSCCustomMarixDisplay = class(TSCCustomControl)
private
FColorOn: TColor;
FColorOff: TColor;
FCellSize: Integer;
FTopIndent: Integer;
FOffsetX: Integer;
FScrollTimer: Integer;
FScrollDelay: Integer;
FScrollEnabled: Boolean;
FScrollType: TSCMatrixScrollType;
FScrolling: Boolean;
FPauseScroll: Integer;
procedure SetColorOn(Value: TColor);
procedure SetColorOff(Value: TColor);
procedure SetScrollDelay(Value: Integer);
procedure SetScrollEnabled(Value: Boolean);
procedure SetScrollType(Value: TSCMatrixScrollType);
procedure UpdateCellSize;
procedure StopScrolling;
procedure StartScrolling(Offset: Integer);
procedure DrawCells;
procedure PaintRow(X, Y: Integer; S: String);
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
procedure WMTimer(var Message: TWMTimer); message WM_TIMER;
protected
procedure CreateWnd; override;
procedure Loaded; override;
procedure Paint; override;
procedure Resize; override;
function GetBorderPropsClass: TSCControlBorderPropsClass; override;
function GetBlendValue: Word; override;
property Color default clBlack;
property ParentColor default False;
property ColorOn: TColor read FColorOn write SetColorOn default clLime;
property ColorOff: TColor read FColorOff write SetColorOff default $00004000;
property ScrollDelay: Integer read FScrollDelay write SetScrollDelay default 50;
property ScrollEnabled: Boolean read FScrollEnabled write SetScrollEnabled default False;
property ScrollType: TSCMatrixScrollType read FScrollType write SetScrollType default scstRightToLeft;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
end;
TSCMarixDisplay = class(TSCCustomMarixDisplay)
published
property Align;
property Anchors;
property BorderProps;
property Caption;
property Color;
property ColorOff;
property ColorOn;
property Constraints;
property Cursor;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property ParentColor;
property ParentShowHint;
property Picture;
property PictureProps;
property PopupMenu;
property ScrollDelay;
property ScrollEnabled;
property ScrollType;
property ShowHint;
property TabOrder;
property TabStop;
property Tag;
property Transparent;
property Visible;
property OnCanResize;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
TSCSegmentBorderProps = class(TSCControlBorderProps)
public
constructor Create(AOwner: TSCCustomControl); override;
published
property Border default sccbLowered;
property Color;
property ExDraw;
property FlatColor;
property FlatInnerColor;
property InnerBorder;
property Width;
end;
TSCCustomSevenSegment = class(TSCCustomControl)
private
FAlignment: TLeftRight;
FDigitCount: Integer;
FColorOff: TColor;
FColorOn: TColor;
FSegmentSpacing: Integer;
FSegmentThickness: Integer;
FDigitHeight: Integer;
FDigitWidth: Integer;
FTopIndent: Integer;
FC: array[0..5] of TPoint;
FT, FLT, FLB, FB, FRT, FRB: array[0..3] of TPoint;
procedure SetAlignment(Value: TLeftRight);
procedure SetDigitCount(Value: Integer);
procedure SetColorOff(Value: TColor);
procedure SetColorOn(Value: TColor);
procedure SetSegmentSpacing(Value: Integer);
procedure SetSegmentThickness(Value: Integer);
function GetCharWidth(Ch: Char): Integer;
procedure CalculatePolygons;
procedure CalculateSize;
procedure DrawSegment(Ch: Char; R: TRect);
procedure DrawSegments;
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
protected
procedure CreateWnd; override;
procedure Loaded; override;
procedure Paint; override;
procedure Resize; override;
procedure SetIndent(Value: Integer); override;
procedure SpacingChanged; override;
procedure IndentChanged; override;
function GetBorderPropsClass: TSCControlBorderPropsClass; override;
function GetBlendValue: Word; override;
property Color default clBlack;
property ParentColor default False;
property Indent default 2;
property Spacing default 4;
property Alignment: TLeftRight read FAlignment write SetAlignment default taRightJustify;
property DigitCount: Integer read FDigitCount write SetDigitCount default 0;
property ColorOff: TColor read FColorOff write SetColorOff default $001E401E;
property ColorOn: TColor read FColorOn write SetColorOn default clLime;
property SegmentSpacing: Integer read FSegmentSpacing write SetSegmentSpacing default 1;
property SegmentThickness: Integer read FSegmentThickness write SetSegmentThickness default 3;
public
constructor Create(AOwner: TComponent); override;
procedure Assign(Source: TPersistent); override;
end;
TSCSevenSegment = class(TSCCustomSevenSegment)
published
property Align;
property Alignment;
property Anchors;
property BorderProps;
property Caption;
property Color;
property ColorOff;
property ColorOn;
property Constraints;
property Cursor;
property DigitCount;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Indent;
property ParentColor;
property ParentShowHint;
property Picture;
property PictureProps;
property PopupMenu;
property SegmentSpacing;
property SegmentThickness;
property ShowHint;
property Spacing;
property TabOrder;
property TabStop;
property Tag;
property Transparent;
property Visible;
property OnCanResize;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
TSCHistGraphBorderProps = class(TSCControlBorderProps)
public
constructor Create(AOwner: TSCCustomControl); override;
published
property Border default sccb3DLowered;
property Color;
property ExDraw;
property FlatColor;
property FlatInnerColor;
property InnerBorder;
property Width;
end;
TSCCustomHistoryGraph = class(TSCCustomControl)
private
FList: TList;
FCacheSize: Integer;
FGridColor: TColor;
FGridStep: Integer;
FLineColor: TColor;
FMax: Integer;
FMin: Integer;
FScrollGrid: Boolean;
FShowGrid: Boolean;
FStepSize: Integer;
procedure SetGridColor(Value: TColor);
procedure SetGridStep(Value: Integer);
procedure SetLineColor(Value: TColor);
procedure SetMax(Value: Integer);
procedure SetMin(Value: Integer);
procedure SetShowGrid(Value: Boolean);
procedure SetScrollGrid(Value: Boolean);
procedure SetStepSize(Value: Integer);
function GetCount: Integer;
function GetItem(Index: Integer): Integer;
function TrimList: Boolean;
procedure UpdateCacheSize;
procedure DrawGrid;
procedure DrawGraph;
protected
procedure CreateWnd; override;
procedure Loaded; override;
procedure Paint; override;
procedure Resize; override;
function GetBorderPropsClass: TSCControlBorderPropsClass; override;
function GetBlendValue: Word; override;
property Color default clBlack;
property ParentColor default False;
property Count: Integer read GetCount;
property GridColor: TColor read FGridColor write SetGridColor default $00004000;
property GridStep: Integer read FGridStep write SetGridStep default 6;
property Items[Index: Integer]: Integer read GetItem;
property LineColor: TColor read FLineColor write SetLineColor default clLime;
property Max: Integer read FMax write SetMax default 100;
property Min: Integer read FMin write SetMin default 0;
property ScrollGrid: Boolean read FScrollGrid write SetScrollGrid default True;
property ShowGrid: Boolean read FShowGrid write SetShowGrid default True;
property StepSize: Integer read FStepSize write SetStepSize default 2;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
procedure Clear;
procedure Add(Value: Integer);
end;
TSCHistoryGraph = class(TSCCustomHistoryGraph)
public
property Count;
property Items;
published
property Align;
property Anchors;
property BorderProps;
property Caption;
property Color;
property Constraints;
property Cursor;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property GridColor;
property GridStep;
property LineColor;
property Max;
property Min;
property ParentColor;
property ParentShowHint;
property Picture;
property PictureProps;
property PopupMenu;
property ScrollGrid;
property ShowGrid;
property ShowHint;
property StepSize;
property TabOrder;
property TabStop;
property Tag;
property Transparent;
property Visible;
property OnCanResize;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
TSCSwitchBorderProps = class(TSCControlBorderProps)
public
constructor Create(AOwner: TSCCustomControl); override;
published
property Border default sccb3DLowered;
property Color;
property ExDraw;
property FlatColor;
property FlatInnerColor;
property InnerBorder;
property Width;
end;
TSCCustomSwitch = class(TSCCustomControl)
private
FButtonColor: TColor;
FColorOn: TColor;
FColorOff: TColor;
FLightIndent: Integer;
FMax: Integer;
FMin: Integer;
FOrientation: TSCOrientation;
FShowLights: Boolean;
FShowLines: Boolean;
FValue: Integer;
FLeftClicked: Boolean;
FSliderClicked: Boolean;
FSliderIsHot: Boolean;
procedure SetButtonColor(Value: TColor);
procedure SetColorOn(Value: TColor);
procedure SetColorOff(Value: TColor);
procedure SetLightIndent(Value: Integer);
procedure SetMax(Value: Integer);
procedure SetMin(Value: Integer);
procedure SetOrientation(Value: TSCOrientation);
procedure SetShowLights(Value: Boolean);
procedure SetShowLines(Value: Boolean);
procedure SetValue(Value: Integer);
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE;
procedure WMMouseWheel(var Message: TWMMouseWheel); message WM_MOUSEWHEEL;
protected
procedure Paint; override;
procedure SetIndent(Value: Integer); override;
procedure StopTracking; override;
function NormalizeValue(Value: Integer): Integer;
function CanSetValue(var Value: Integer): Boolean; virtual;
function CanSetUserValue(var Value: LongInt): Boolean; virtual;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure ProcessTrackKey(Key: Word);
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyPress(var Key: Char); override;
function GetBorderPropsClass: TSCControlBorderPropsClass; override;
function GetBlendValue: Word; override;
property Color default clBlack;
property ParentColor default False;
property Indent default 1;
property ButtonColor: TColor read FButtonColor write SetButtonColor default clBtnFace;
property ColorOn: TColor read FColorOn write SetColorOn default clLime;
property ColorOff: TColor read FColorOff write SetColorOff default $00004000;
property LightIndent: Integer read FLightIndent write SetLightIndent default 0;
property Orientation: TSCOrientation read FOrientation write SetOrientation default scoVertical;
property Min: Integer read FMin write SetMin default 0;
property Max: Integer read FMax write SetMax default 1;
property Value: Integer read FValue write SetValue default 0;
property Spacing default 1;
property ShowLines: Boolean read FShowLines write SetShowLines default True;
property ShowLights: Boolean read FShowLights write SetShowLights default True;
public
constructor Create(AOwner: TComponent); override;
procedure Assign(Source: TPersistent); override;
function PtOnSlider(P: TPoint): Boolean;
function ValueAtPos(X, Y: Integer): Integer;
end;
TSCSwitch = class(TSCCustomSwitch)
published
property Align;
property Anchors;
property BorderProps;
property ButtonColor;
property Color;
property ColorOn;
property ColorOff;
property Constraints;
property Cursor;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Indent;
property LightIndent;
property Max;
property Min;
property Orientation;
property ParentColor;
property ParentShowHint;
property Picture;
property PictureProps;
property PopupMenu;
property ShowHint;
property ShowLights;
property ShowLines;
property Spacing;
property TabOrder;
property TabStop;
property Tag;
property Transparent;
property Value;
property Visible;
property OnCanResize;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
TSCRunningLedsStyle = (scrl3D, scrlClassic, scrlGradient3D, scrlMetal,
scrlRaised, scrlSliced, scrlXP);
TSCRunningLedsBorderProps = class(TSCControlBorderProps)
public
constructor Create(AOwner: TSCCustomControl); override;
published
property Border default sccbLowered;
property Color;
property ExDraw;
property FlatColor;
property FlatInnerColor;
property InnerBorder;
property Width;
end;
TSCCustomRunningLeds = class(TSCCustomControl)
private
FForeColor: TColor;
FInterval: Integer;
FPercentage: Integer;
FRunning: Boolean;
FRunningTimer: Integer;
FRunningEnabled: Boolean;
FStyle: TSCRunningLedsStyle;
FSlice: Integer;
FStep: Integer;
FOffsetX: Integer;
procedure SetForeColor(Value: TColor);
procedure SetInterval(Value: Integer);
procedure SetPercentage(Value: Integer);
procedure SetRunningEnabled(Value: Boolean);
procedure SetStep(Value: Integer);
procedure SetSlice(Value: Integer);
procedure SetStyle(Value: TSCRunningLedsStyle);
procedure StopRun;
procedure StartRun(Offset: Integer);
procedure ResetInterval;
procedure WMTimer(var Message: TWMTimer); message WM_TIMER;
protected
procedure CreateWnd; override;
procedure Loaded; override;
procedure Paint; override;
function GetBorderPropsClass: TSCControlBorderPropsClass; override;
function GetBlendValue: Word; override;
property Color default clWindow;
property ParentColor default False;
property ForeColor: TColor read FForeColor write SetForeColor default clGreen;
property Interval: Integer read FInterval write SetInterval default 100;
property Percentage: Integer read FPercentage write SetPercentage default 30;
property RunningEnabled: Boolean read FRunningEnabled write SetRunningEnabled default False;
property Slice: Integer read FSlice write SetSlice default 10;
property Step: Integer read FStep write SetStep default 8;
property Style: TSCRunningLedsStyle read FStyle write SetStyle default scrlMetal;
public
constructor Create(AOwner: TComponent); override;
procedure Assign(Source: TPersistent); override;
end;
TSCRunningLeds = class(TSCCustomRunningLeds)
published
property Align;
property Anchors;
property BorderProps;
property Color;
property Constraints;
property Cursor;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property ForeColor;
property Interval;
property ParentColor;
property ParentShowHint;
property Percentage;
property Picture;
property PictureProps;
property PopupMenu;
property RunningEnabled;
property ShowHint;
property Slice;
property Step;
property Style;
property TabOrder;
property TabStop;
property Tag;
property Transparent;
property Visible;
property OnCanResize;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
implementation
type
TSegmentRec = record
Color: TColor;
Bitmap: TBitmap;
end;
PSegmentRec = ^TSegmentRec;
TSCMatrixRow = record
Ch: Char;
Row0: String;
Row1: String;
Row2: String;
Row3: String;
Row4: String;
Row5: String;
Row6: String;
Row7: String;
Row8: String;
Row9: String;
end;
TSCSevenRec = record
Ch: Char;
Pattern: String;
end;
const
SC_MATRIX_TIMERID = 5544;
SC_RUNNING_TIMERID = 5545;
SCMatrixChars: array[0..95] of TSCMatrixRow = (
(Ch: ' '; Row0: '00000'; Row1: '00000'; Row2: '00000'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '!'; Row0: '00100'; Row1: '00100'; Row2: '00100'; Row3: '00100'; Row4: '00100'; Row5: '00000'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '"'; Row0: '01010'; Row1: '01010'; Row2: '00000'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '#'; Row0: '00000'; Row1: '01010'; Row2: '11111'; Row3: '01010'; Row4: '11111'; Row5: '01010'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '$'; Row0: '00100'; Row1: '01111'; Row2: '10100'; Row3: '01110'; Row4: '00101'; Row5: '11110'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '%'; Row0: '00000'; Row1: '11001'; Row2: '11010'; Row3: '00100'; Row4: '01011'; Row5: '10011'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '&'; Row0: '01100'; Row1: '10010'; Row2: '10100'; Row3: '01000'; Row4: '10101'; Row5: '10010'; Row6: '01101'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ''''; Row0: '00100'; Row1: '00100'; Row2: '00000'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '('; Row0: '00100'; Row1: '01000'; Row2: '01000'; Row3: '01000'; Row4: '01000'; Row5: '01000'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ')'; Row0: '00100'; Row1: '00010'; Row2: '00010'; Row3: '00010'; Row4: '00010'; Row5: '00010'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '*'; Row0: '00100'; Row1: '10101'; Row2: '01110'; Row3: '11111'; Row4: '01110'; Row5: '10101'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '+'; Row0: '00000'; Row1: '00100'; Row2: '00100'; Row3: '11111'; Row4: '00100'; Row5: '00100'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ','; Row0: '00000'; Row1: '00000'; Row2: '00000'; Row3: '00000'; Row4: '00000'; Row5: '00100'; Row6: '01000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '-'; Row0: '00000'; Row1: '00000'; Row2: '00000'; Row3: '11111'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '.'; Row0: '00000'; Row1: '00000'; Row2: '00000'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '/'; Row0: '00000'; Row1: '00001'; Row2: '00010'; Row3: '00100'; Row4: '01000'; Row5: '10000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '0'; Row0: '01110'; Row1: '10001'; Row2: '10011'; Row3: '10101'; Row4: '11001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '1'; Row0: '00100'; Row1: '01100'; Row2: '00100'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '2'; Row0: '01110'; Row1: '10001'; Row2: '00001'; Row3: '00110'; Row4: '01000'; Row5: '10000'; Row6: '11111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '3'; Row0: '01110'; Row1: '10001'; Row2: '00001'; Row3: '01110'; Row4: '00001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '4'; Row0: '00010'; Row1: '00110'; Row2: '01010'; Row3: '10010'; Row4: '11111'; Row5: '00010'; Row6: '00010'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '5'; Row0: '11111'; Row1: '10000'; Row2: '11110'; Row3: '00001'; Row4: '00001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '6'; Row0: '01110'; Row1: '10000'; Row2: '11110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '7'; Row0: '11111'; Row1: '10001'; Row2: '00001'; Row3: '00010'; Row4: '00100'; Row5: '00100'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '8'; Row0: '01110'; Row1: '10001'; Row2: '10001'; Row3: '01110'; Row4: '10001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '9'; Row0: '01110'; Row1: '10001'; Row2: '10001'; Row3: '01111'; Row4: '00001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ':'; Row0: '00000'; Row1: '00000'; Row2: '00100'; Row3: '00000'; Row4: '00000'; Row5: '00100'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ';'; Row0: '00000'; Row1: '00000'; Row2: '00100'; Row3: '00000'; Row4: '00000'; Row5: '00100'; Row6: '01000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '<'; Row0: '00010'; Row1: '00100'; Row2: '01000'; Row3: '10000'; Row4: '01000'; Row5: '00100'; Row6: '00010'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '='; Row0: '00000'; Row1: '00000'; Row2: '11111'; Row3: '00000'; Row4: '11111'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '>'; Row0: '01000'; Row1: '00100'; Row2: '00010'; Row3: '00001'; Row4: '00010'; Row5: '00100'; Row6: '01000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '?'; Row0: '01110'; Row1: '10001'; Row2: '00001'; Row3: '00110'; Row4: '00100'; Row5: '00000'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '@'; Row0: '01110'; Row1: '10001'; Row2: '10111'; Row3: '11011'; Row4: '10110'; Row5: '10000'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'A'; Row0: '01110'; Row1: '10001'; Row2: '10001'; Row3: '11111'; Row4: '10001'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'B'; Row0: '11110'; Row1: '10001'; Row2: '10001'; Row3: '11110'; Row4: '10001'; Row5: '10001'; Row6: '11110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'C'; Row0: '01110'; Row1: '10001'; Row2: '10000'; Row3: '10000'; Row4: '10000'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'D'; Row0: '11110'; Row1: '10001'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '11110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'E'; Row0: '11111'; Row1: '10000'; Row2: '10000'; Row3: '11110'; Row4: '10000'; Row5: '10000'; Row6: '11111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'F'; Row0: '11111'; Row1: '10000'; Row2: '10000'; Row3: '11110'; Row4: '10000'; Row5: '10000'; Row6: '10000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'G'; Row0: '01110'; Row1: '10001'; Row2: '10000'; Row3: '10111'; Row4: '10001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'H'; Row0: '10001'; Row1: '10001'; Row2: '10001'; Row3: '11111'; Row4: '10001'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'I'; Row0: '01110'; Row1: '00100'; Row2: '00100'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'J'; Row0: '00111'; Row1: '00010'; Row2: '00010'; Row3: '00010'; Row4: '00010'; Row5: '10010'; Row6: '01100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'K'; Row0: '10001'; Row1: '10010'; Row2: '10100'; Row3: '11000'; Row4: '10100'; Row5: '10010'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'L'; Row0: '10000'; Row1: '10000'; Row2: '10000'; Row3: '10000'; Row4: '10000'; Row5: '10000'; Row6: '11111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'M'; Row0: '10001'; Row1: '11011'; Row2: '10101'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'N'; Row0: '10001'; Row1: '10001'; Row2: '11001'; Row3: '10101'; Row4: '10011'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'O'; Row0: '01110'; Row1: '10001'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'P'; Row0: '11110'; Row1: '10001'; Row2: '10001'; Row3: '11110'; Row4: '10000'; Row5: '10000'; Row6: '10000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'Q'; Row0: '01110'; Row1: '10001'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '10011'; Row6: '01111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'R'; Row0: '11110'; Row1: '10001'; Row2: '10001'; Row3: '11110'; Row4: '10001'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'S'; Row0: '01110'; Row1: '10001'; Row2: '10000'; Row3: '01110'; Row4: '00001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'T'; Row0: '11111'; Row1: '00100'; Row2: '00100'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'U'; Row0: '10001'; Row1: '10001'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'V'; Row0: '10001'; Row1: '10001'; Row2: '10001'; Row3: '01010'; Row4: '01010'; Row5: '00100'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'W'; Row0: '10001'; Row1: '10001'; Row2: '10001'; Row3: '10001'; Row4: '10101'; Row5: '10101'; Row6: '01010'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'X'; Row0: '10001'; Row1: '10001'; Row2: '01010'; Row3: '00100'; Row4: '01010'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'Y'; Row0: '10001'; Row1: '10001'; Row2: '01010'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'Z'; Row0: '11111'; Row1: '00001'; Row2: '00010'; Row3: '00100'; Row4: '01000'; Row5: '10000'; Row6: '11111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '['; Row0: '01110'; Row1: '01000'; Row2: '01000'; Row3: '01000'; Row4: '01000'; Row5: '01000'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '\'; Row0: '00000'; Row1: '10000'; Row2: '01000'; Row3: '00100'; Row4: '00010'; Row5: '00001'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ']'; Row0: '01110'; Row1: '00010'; Row2: '00010'; Row3: '00010'; Row4: '00010'; Row5: '00010'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '^'; Row0: '00100'; Row1: '01010'; Row2: '10001'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '_'; Row0: '00000'; Row1: '00000'; Row2: '00000'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '11111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '`'; Row0: '01000'; Row1: '01000'; Row2: '00100'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'a'; Row0: '00000'; Row1: '00000'; Row2: '01110'; Row3: '00001'; Row4: '01111'; Row5: '10001'; Row6: '01111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'b'; Row0: '10000'; Row1: '10000'; Row2: '11110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '11110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'c'; Row0: '00000'; Row1: '00000'; Row2: '01110'; Row3: '10001'; Row4: '10000'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'd'; Row0: '00001'; Row1: '00001'; Row2: '01111'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'e'; Row0: '00000'; Row1: '00000'; Row2: '01110'; Row3: '10001'; Row4: '11111'; Row5: '10000'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'f'; Row0: '00110'; Row1: '01001'; Row2: '01000'; Row3: '11110'; Row4: '01000'; Row5: '01000'; Row6: '01000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'g'; Row0: '00000'; Row1: '00000'; Row2: '01110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01111'; Row7: '00001'; Row8: '00001'; Row9: '01110'),
(Ch: 'h'; Row0: '10000'; Row1: '10000'; Row2: '11110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'i'; Row0: '00100'; Row1: '00000'; Row2: '01100'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'j'; Row0: '00100'; Row1: '00000'; Row2: '01110'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '00100'; Row7: '00100'; Row8: '11000'; Row9: '00000'),
(Ch: 'k'; Row0: '10000'; Row1: '10000'; Row2: '10001'; Row3: '10010'; Row4: '11100'; Row5: '10010'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'l'; Row0: '01100'; Row1: '00100'; Row2: '00100'; Row3: '00100'; Row4: '00100'; Row5: '00100'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'm'; Row0: '00000'; Row1: '00000'; Row2: '11110'; Row3: '10101'; Row4: '10101'; Row5: '10101'; Row6: '10101'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'n'; Row0: '00000'; Row1: '00000'; Row2: '11110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'o'; Row0: '00000'; Row1: '00000'; Row2: '01110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'p'; Row0: '00000'; Row1: '00000'; Row2: '11110'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '11110'; Row7: '10000'; Row8: '10000'; Row9: '10000'),
(Ch: 'q'; Row0: '00000'; Row1: '00000'; Row2: '01111'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01111'; Row7: '00001'; Row8: '00001'; Row9: '00001'),
(Ch: 'r'; Row0: '00000'; Row1: '00000'; Row2: '11110'; Row3: '10001'; Row4: '10000'; Row5: '10000'; Row6: '10000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 's'; Row0: '00000'; Row1: '00000'; Row2: '01111'; Row3: '10000'; Row4: '01110'; Row5: '00001'; Row6: '11110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 't'; Row0: '01000'; Row1: '01000'; Row2: '11110'; Row3: '01000'; Row4: '01000'; Row5: '01000'; Row6: '00110'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'u'; Row0: '00000'; Row1: '00000'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'v'; Row0: '00000'; Row1: '00000'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '01010'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'w'; Row0: '00000'; Row1: '00000'; Row2: '10001'; Row3: '10001'; Row4: '10101'; Row5: '10101'; Row6: '01010'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'x'; Row0: '00000'; Row1: '00000'; Row2: '10001'; Row3: '01010'; Row4: '00100'; Row5: '01010'; Row6: '10001'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: 'y'; Row0: '00000'; Row1: '00000'; Row2: '10001'; Row3: '10001'; Row4: '10001'; Row5: '10001'; Row6: '01111'; Row7: '00001'; Row8: '00001'; Row9: '01110'),
(Ch: 'z'; Row0: '00000'; Row1: '00000'; Row2: '11111'; Row3: '00010'; Row4: '00100'; Row5: '01000'; Row6: '11111'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '{'; Row0: '00010'; Row1: '00100'; Row2: '00100'; Row3: '01000'; Row4: '00100'; Row5: '00100'; Row6: '00010'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '|'; Row0: '00100'; Row1: '00100'; Row2: '00100'; Row3: '00000'; Row4: '00100'; Row5: '00100'; Row6: '00100'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '}'; Row0: '01000'; Row1: '00100'; Row2: '00100'; Row3: '00010'; Row4: '00100'; Row5: '00100'; Row6: '01000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: '~'; Row0: '01000'; Row1: '10101'; Row2: '00010'; Row3: '00000'; Row4: '00000'; Row5: '00000'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000'),
(Ch: ''; Row0: '00000'; Row1: '01110'; Row2: '01110'; Row3: '01110'; Row4: '01110'; Row5: '01110'; Row6: '00000'; Row7: '00000'; Row8: '00000'; Row9: '00000')
);
SCSevenSegChars: array[0..15] of TSCSevenRec = (
(Ch: '0'; Pattern: '1110111'),
(Ch: '1'; Pattern: '0000110'),
(Ch: '2'; Pattern: '1011101'),
(Ch: '3'; Pattern: '1001111'),
(Ch: '4'; Pattern: '0101110'),
(Ch: '5'; Pattern: '1101011'),
(Ch: '6'; Pattern: '1111011'),
(Ch: '7'; Pattern: '1000110'),
(Ch: '8'; Pattern: '1111111'),
(Ch: '9'; Pattern: '1101111'),
(Ch: 'A'; Pattern: '1111110'),
(Ch: 'B'; Pattern: '1111111'),
(Ch: 'C'; Pattern: '1110001'),
(Ch: 'D'; Pattern: '1110111'),
(Ch: 'E'; Pattern: '1111001'),
(Ch: 'F'; Pattern: '1111000')
);
{ TSCMeterSegment }
procedure TSCMeterSegment.Assign(Source: TPersistent);
begin
if Source is TSCMeterSegment then
begin
with TSCMeterSegment(Source) do
begin
Self.FActiveColor := ActiveColor;
Self.FColor := Color;
Self.FCount := Count;
end;
end else
inherited Assign(Source);
end;
constructor TSCMeterSegment.Create(Collection: TCollection);
begin
inherited Create(Collection);
FActiveColor := clLime;
FColor := clGreen;
FCount := 2;