mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-02 19:47:02 +01:00
Industrial components package: improvements from Jurassic Pork.
git-svn-id: trunk@41376 -
This commit is contained in:
parent
e1c3aed986
commit
fe5e2e2849
8
.gitattributes
vendored
8
.gitattributes
vendored
@ -36,6 +36,7 @@ components/IndustrialStuff/resources/stop_green.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/stop_red.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/stop_unknown.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/stop_yellow.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/tadvled.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/tanalogsensor.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/tgrarrow.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/tindadvled.png -text svneol=unset#image/png
|
||||
@ -43,15 +44,20 @@ components/IndustrialStuff/resources/tindgnoumeter.png -text svneol=unset#image/
|
||||
components/IndustrialStuff/resources/tindled.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/tlednumber.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/resources/tstoplightsensor.png -text svneol=unset#image/png
|
||||
components/IndustrialStuff/source/AdvLed.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/AllIndustrialRegister.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/cyBaseLed.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/cyClasses.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/cyGraphics.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/cyTypes.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indadvled.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indcyBaseLed.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indcyClasses.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indcyGraphics.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indcyTypes.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indgnoumeter.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/indled.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/industrial_icons.lrs svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/ledbuttons.lrs svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/lednumber.pas svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/sensors.lrs svneol=native#text/pascal
|
||||
components/IndustrialStuff/source/sensors.pas svneol=native#text/pascal
|
||||
|
||||
@ -7,73 +7,6 @@ object Form1: TForm1
|
||||
ClientHeight = 166
|
||||
ClientWidth = 568
|
||||
LCLVersion = '1.1'
|
||||
object indAdvLed1: TindAdvLed
|
||||
Left = 144
|
||||
Height = 36
|
||||
Top = 32
|
||||
Width = 36
|
||||
AllowAllOff = True
|
||||
LedValue = True
|
||||
PictureOn.Data = {
|
||||
1754506F727461626C654E6574776F726B47726170686963F206000089504E47
|
||||
0D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000
|
||||
1974455874536F6674776172650041646F626520496D616765526561647971C9
|
||||
653C000006944944415478DA94575F845C5718FF921DC919865CB1E53EACBA65
|
||||
CA7D489987D02DA123842155FBB00FA37D4929DD5212A9B2512AAA64B5124A54
|
||||
5EAAD5684DB5641E1A96444CDE56A58CB6EA3E2CBD62CAA5639D65C851B3F4F7
|
||||
7DE73B77EE5477B3B96BF6DC7BFE7CDFEFFB7D7FCE3947DCD45178FABD3E39FC
|
||||
19FCF996CA2FAABC6BFB12DA6368F7D00EB97FA5DBA567798E2F1CA75AB5C3FD
|
||||
4745E825320DF49D43CF2A463A9871924A6065BBDBEBF5EEE1EB7BCCBDD7ED76
|
||||
770F03E2C8FE0CB06857C7FF77D1F711FA4ECC80A18DE212AAB576B6C2CFD9C5
|
||||
D706BE3E072B4F0E62600E002C2815E07915A2BE8190E759701447142FC6142F
|
||||
41714D67D5A87413394BF9A8203BB654147970D95F58FF1640DC3B140066401D
|
||||
F11E445EC7DB31569A365301405328AEA1778A69C179E15D5B06941705E5790E
|
||||
2005CFD8C3AA4B2BDD959B876040007C88059F30906429A1F474CB0B67C1932D
|
||||
08EF536E07A03D53D2F98929895A942CAE50BAD401C8480CC98699B0A271B401
|
||||
10579EC2406F15CD0FDCB37C7A99E238163E9CCB68B07D95F2F1A0B4DA05EB35
|
||||
4E4B3050DE6EAE53ABB90620CC464ED9A361889E3701E2BBFF0500FA9B50F52B
|
||||
A6D5D334A52489456831DEA4FEF61A94414403B69A046D44111405E82C8303B1
|
||||
B039D9C2BB288DDBD43DF3B5B0918F00E2F7214F45409A9701E2B700E0682505
|
||||
AF03619D834C94C3DF59D1A37E764194471C0B4B6D8A220000E5164A2C5BEE3C
|
||||
13C64418871B9A0945003ACC0774EBA70EE65909DC18EEC4AC3AF47C5175C351
|
||||
F5FD19287F9D580804B005C56400DAD7655212A7942EB6A49F15B2C541B158EF
|
||||
8C8C31A0083292660B400DE8CFA877FF92F8273D95823976833903579F9F0380
|
||||
1917D98331473AE732846E4139B711F29DADB6A2D967BBD35C1120530D0205C3
|
||||
CCF1789A241214C3AC4FC3D12600BB32A63070B10480DCAF03D579897A9D2091
|
||||
3EC92806E2346EC9E2A080DDC132CCD4A8FFA932A6ED846B841179DCD71F5C95
|
||||
0065005A5FCF22E69E1300507E164AEB6CA9D37CCEC63D69D9F2AA55FEF1D5CE
|
||||
33A085681AAA60C8100F32E2A20552B9306523094289258C2F70691700787945
|
||||
12842501B99DA088D82D0FA081C9CED73AEFF340B9065E60404198E93C18EFC2
|
||||
48C68719DC80800CC50A3A5BCA0035C52E5066514EA5C030FAC894D64A0A86FD
|
||||
B1E2F7595B29E03CD3A9AB580D00F02707A445941A43619F15BD28ACE684E0AD
|
||||
3929B5C5242F2DE3BC1615CC428D5468B05899912F009FFAF501860F5A2763CC
|
||||
96B5C50C9437E6A40030E20FA3B55CF7FD92EE42526B9E7A3753CE6E9856DD10
|
||||
A2C46F545C0F48C75DA89EB3FD7641D3D0EC1A15E605C65ED064A69034E725B6
|
||||
A63340072A675F1B5DC7735111C37CDDBA773408E9CFE05BF1BA8925C50A1B02
|
||||
0AF4D5BC4F5DC877AA581618933852E53E7C449E1DF9790917B2B069785B1E6B
|
||||
10BA5F04B5734A0EEA7CA32533EC5877F5B02E30E066EF66EA15F38FD4722ABF
|
||||
11D885079B262D8911C904EF829F0303382CB83D3BF10B380EE2A8E30367AC41
|
||||
56ABF870CE9FDA1A556AF427EF28C5DB5CD450801653FC121FC89312FF430180
|
||||
B3DB0E6C7CC07EE1346110E922361DEC7A8C5E136176429CCEE836C1CF656BF4
|
||||
DD0775BEE519EA2C5F90347748738D8187D0FBB8DC0BD0B1212AF86CA7142EA7
|
||||
5765844F5742A3820816562D96808302691B5EF9D67D5FBCD2B443AD74D9B368
|
||||
43E29A9B739B11CE6C0FD0DCE55CE6331D5B9080B2766BDD5B92F96062049C5A
|
||||
7C2E9014336A2D7E010C3336F8D1491B63175D7B6D5D26B25C66003387007127
|
||||
00A855CE0357B0FE5C61DD31D3B072E868F1F1AA6D6433C973386AC4F59D0593
|
||||
D478562E010CBF16182F461E2C3F2D587E61E592A072133EAC48F6FF033DEF80
|
||||
FEBDFD8EE56F40DCB73C3569621B363E9F8A714E9B8F6E493DA74ADE878A597D
|
||||
8FB17F74DA6BD45EEE685143206EE7A1ACBF0DE55F3EED587E0D13D78DEE5CF1
|
||||
923F23701D28C6056D01448EE8CA01CA59EB8FA4A03AC1CE999E6AC3F2B63203
|
||||
C56366250FC5F70694BFFFD463B916CACBE8FD94CB25EF6611388F1AFED463C2
|
||||
113C6C54D5EAAE55D0590FD60394DE2B88B38D67B99ADDC0B23FF0F5150E9B31
|
||||
FB2F5E4494232E0C58915535BFFD4AEA4DFDBAC216A572BDB0EC401A4EC2DDCD
|
||||
FD6E4773004CE53A8A078BDC8BE8BD8CAF0F8AB16B58A61D9525149A12B8F3C7
|
||||
B3CA7A2E6B37F0FE19944F0EBA1B1E7039154013BC7F8CD79BF83E8FDE558C9E
|
||||
C36E582744B69BBBA09A277C29457B07ED5DF8FBEFC35C4EF76560064246502D
|
||||
E9367A6FABC74F62F485CA551D1B1AED749FF17ACECFBF020C008B84F5EC1E85
|
||||
E8620000000049454E44AE426082
|
||||
}
|
||||
end
|
||||
object indLed1: TindLed
|
||||
Left = 200
|
||||
Height = 35
|
||||
@ -137,7 +70,7 @@ object Form1: TForm1
|
||||
Width = 153
|
||||
BorderWidth = 2
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'Test'
|
||||
Caption = 'level : '
|
||||
ClientHeight = 132
|
||||
ClientWidth = 149
|
||||
Font.Height = -16
|
||||
@ -188,4 +121,14 @@ object Form1: TForm1
|
||||
Constraints.MinHeight = 8
|
||||
Constraints.MinWidth = 8
|
||||
end
|
||||
object AdvLed1: TAdvLed
|
||||
Left = 152
|
||||
Height = 24
|
||||
Top = 40
|
||||
Width = 24
|
||||
Kind = lkYellowLight
|
||||
State = lsOn
|
||||
Blink = False
|
||||
AutoSize = True
|
||||
end
|
||||
end
|
||||
|
||||
@ -6,16 +6,16 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, IndAdvLed, IndLed, Sensors, LedNumber,
|
||||
IndGnouMeter, Forms, Controls, Graphics, Dialogs, Arrow;
|
||||
IndGnouMeter, AdvLed, Forms, Controls, Graphics, Dialogs, Arrow;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
AdvLed1: TAdvLed;
|
||||
AnalogSensor1: TAnalogSensor;
|
||||
Arrow1: TArrow;
|
||||
indAdvLed1: TindAdvLed;
|
||||
indGnouMeter1: TindGnouMeter;
|
||||
indLed1: TindLed;
|
||||
LEDNumber1: TLEDNumber;
|
||||
|
||||
@ -32,48 +32,48 @@
|
||||
</CompilerOptions>
|
||||
<License Value="MPL + GPL "/>
|
||||
<Version Minor="1"/>
|
||||
<Files Count="11">
|
||||
<Item2>
|
||||
<Filename Value="source\indadvled.pas"/>
|
||||
<UnitName Value="IndAdvLed"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Files Count="10">
|
||||
<Item1>
|
||||
<Filename Value="source\indled.pas"/>
|
||||
<UnitName Value="IndLed"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="source\sensors.pas"/>
|
||||
<UnitName Value="Sensors"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="source\AllIndustrialRegister.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="AllIndustrialRegister"/>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<Filename Value="source\cyBaseLed.pas"/>
|
||||
<UnitName Value="cyBaseLed"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="source\cyClasses.pas"/>
|
||||
<UnitName Value="cyClasses"/>
|
||||
</Item7>
|
||||
<Item8>
|
||||
<Filename Value="source\cyGraphics.pas"/>
|
||||
<UnitName Value="cyGraphics"/>
|
||||
</Item8>
|
||||
<Item9>
|
||||
<Filename Value="source\cyTypes.pas"/>
|
||||
<UnitName Value="cyTypes"/>
|
||||
</Item9>
|
||||
<Item10>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="source\lednumber.pas"/>
|
||||
<UnitName Value="LedNumber"/>
|
||||
</Item10>
|
||||
<Item11>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="source\indgnoumeter.pas"/>
|
||||
<UnitName Value="IndGnouMeter"/>
|
||||
</Item11>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<Filename Value="source\AdvLed.pas"/>
|
||||
<UnitName Value="AdvLed"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="source\indcyBaseLed.pas"/>
|
||||
<UnitName Value="indcyBaseLed"/>
|
||||
</Item7>
|
||||
<Item8>
|
||||
<Filename Value="source\indcyClasses.pas"/>
|
||||
<UnitName Value="indcyClasses"/>
|
||||
</Item8>
|
||||
<Item9>
|
||||
<Filename Value="source\indcyGraphics.pas"/>
|
||||
<UnitName Value="indcyGraphics"/>
|
||||
</Item9>
|
||||
<Item10>
|
||||
<Filename Value="source\indcyTypes.pas"/>
|
||||
<UnitName Value="indcyTypes"/>
|
||||
</Item10>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="1">
|
||||
|
||||
@ -7,8 +7,8 @@ unit industrial;
|
||||
interface
|
||||
|
||||
uses
|
||||
IndAdvLed, IndLed, Sensors, AllIndustrialRegister, cyBaseLed, cyClasses,
|
||||
cyGraphics, cyTypes, LedNumber, IndGnouMeter, LazarusPackageIntf;
|
||||
IndLed, Sensors, AllIndustrialRegister, LedNumber, indGnouMeter, AdvLed,
|
||||
indcyBaseLed, indcyClasses, indcyGraphics, indcyTypes, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
BIN
components/IndustrialStuff/resources/tadvled.png
Normal file
BIN
components/IndustrialStuff/resources/tadvled.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
355
components/IndustrialStuff/source/AdvLed.pas
Normal file
355
components/IndustrialStuff/source/AdvLed.pas
Normal file
@ -0,0 +1,355 @@
|
||||
(******************************************************
|
||||
* AdvLed by Jurassic Pork 2013 for Lazarus *
|
||||
* created from TComled of ComPort Library ver. 3.00 *
|
||||
* written by Dejan Crnila, 1998 - 2002 *
|
||||
* email: dejancrn@yahoo.com *
|
||||
****************************************************************************
|
||||
* *
|
||||
* This file is part of Lazarus which is distributed under the modified LGPL* *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
* Unit: AdvLed.pas *
|
||||
******************************************************)
|
||||
|
||||
unit AdvLed;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf, LCLType,LResources,Classes, Types, ExtCtrls,Controls,Graphics;
|
||||
|
||||
type
|
||||
|
||||
// property types
|
||||
TLedBitmap = Graphics.TPicture;
|
||||
// TLedKind = (lkRedLight, lkGreenLight, lkBlueLight, lkYellowLight,
|
||||
// lkPurpleLight, lkBulb, lkCustom);
|
||||
TLedKind = (lkRedLight, lkGreenLight,lkYellowLight, lkBulb, lkCustom);
|
||||
TLedState = (lsDisabled,lsOff, lsOn);
|
||||
TAdvLedGlyphs = array[TLedState] of TLedBitmap;
|
||||
TLedStateEvent = procedure(Sender: TObject; AState: TLedState) of object;
|
||||
|
||||
// led control that shows the state of serial signals
|
||||
TAdvLed = class(TCustomImage)
|
||||
private
|
||||
FKind: TLedKind;
|
||||
FState: TLedState;
|
||||
FBlink: Boolean;
|
||||
FOnChange: TLedStateEvent;
|
||||
FGlyphs: TAdvLedGlyphs;
|
||||
FBlinkTimer: TTimer;
|
||||
function GetGlyph(const Index: Integer): TLedBitmap;
|
||||
function GetBlinkDuration: Integer;
|
||||
procedure SetKind(const Value: TLedKind);
|
||||
procedure SetState(const Value: TLedState);
|
||||
procedure SetGlyph(const Index: Integer; const Value: TLedBitmap);
|
||||
procedure SetBlinkDuration(const Value: Integer);
|
||||
procedure SetBlink(const Value: Boolean);
|
||||
function StoredGlyph(const Index: Integer): Boolean;
|
||||
procedure SelectLedBitmap(const LedKind: TLedKind);
|
||||
procedure SetStateInternal(const Value: TLedState);
|
||||
function BitmapToDraw: TLedBitmap;
|
||||
procedure BitmapNeeded;
|
||||
procedure DoTimer(Sender: TObject);
|
||||
procedure GlyphChanged(Sender: TObject);
|
||||
|
||||
|
||||
protected
|
||||
FlipFLop : Boolean;
|
||||
{ procedure Paint; override; }
|
||||
procedure DoChange(AState: TLedState); dynamic;
|
||||
procedure Loaded; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
published
|
||||
// kind property must be published before GlyphOn, GlyphOff,GlyphDisable
|
||||
property Kind: TLedKind read FKind write SetKind ;
|
||||
property GlyphDisabled: TLedBitmap index 0 read GetGlyph
|
||||
write SetGlyph stored StoredGlyph;
|
||||
property GlyphOff: TLedBitmap index 1 read GetGlyph
|
||||
write SetGlyph stored StoredGlyph;
|
||||
property GlyphOn: TLedBitmap index 2 read GetGlyph
|
||||
write SetGlyph stored StoredGlyph;
|
||||
property State: TLedState read FState write SetState;
|
||||
property Blink: Boolean read FBlink write SetBlink;
|
||||
property BlinkDuration: Integer read GetBlinkDuration write SetBlinkDuration default 1000;
|
||||
property Align;
|
||||
property AutoSize;
|
||||
property Center;
|
||||
property Constraints;
|
||||
// property Picture;
|
||||
property Visible;
|
||||
property OnClick;
|
||||
property OnMouseDown;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property Stretch;
|
||||
property Showhint;
|
||||
property Transparent;
|
||||
property Proportional;
|
||||
property OnPictureChanged;
|
||||
property OnChange: TLedStateEvent read FOnChange write FOnChange;
|
||||
|
||||
{ property Align;
|
||||
property DragCursor;
|
||||
property DragMode;
|
||||
property Enabled;
|
||||
property ParentShowHint;
|
||||
property PopupMenu;
|
||||
property ShowHint;
|
||||
property Visible;
|
||||
property Anchors;
|
||||
property Constraints;
|
||||
property DragKind;
|
||||
property ParentBiDiMode;
|
||||
|
||||
property OnClick;
|
||||
property OnDblClick;
|
||||
property OnDragDrop;
|
||||
property OnDragOver;
|
||||
property OnEndDrag;
|
||||
property OnMouseDown;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property OnStartDrag;
|
||||
property OnEndDock;
|
||||
property OnResize;
|
||||
property OnStartDock;
|
||||
property OnContextPopup; }
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
(*****************************************
|
||||
* auxilary functions *
|
||||
*****************************************)
|
||||
|
||||
function Min(A, B: Integer): Integer;
|
||||
begin
|
||||
if A < B then
|
||||
Result := A
|
||||
else
|
||||
Result := B;
|
||||
end;
|
||||
|
||||
function Max(A, B: Integer): Integer;
|
||||
begin
|
||||
if A > B then
|
||||
Result := A
|
||||
else
|
||||
Result := B;
|
||||
end;
|
||||
(*****************************************
|
||||
* TAdvLed control *
|
||||
*****************************************)
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Industrial',[TAdvLed]);
|
||||
end;
|
||||
|
||||
|
||||
// create control
|
||||
constructor TAdvLed.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
ControlStyle := ControlStyle - [csSetCaption];
|
||||
Height := 25;
|
||||
Width := 25;
|
||||
AutoSize := True;
|
||||
FGlyphs[lsOn] := TLedBitmap.Create;
|
||||
FGlyphs[lsOff] := TLedBitmap.Create;
|
||||
FGlyphs[lsDisabled] := TLedBitmap.Create;
|
||||
FGlyphs[lsOn].OnChange:= @GlyphChanged;
|
||||
FGlyphs[lsOff].OnChange:= @GlyphChanged;
|
||||
FGlyphs[lsDisabled].OnChange:= @GlyphChanged;
|
||||
FBlinkTimer := TTimer.Create(nil);
|
||||
FBlinkTimer.OnTimer := @DoTimer;
|
||||
FBlinkTimer.Enabled := false;
|
||||
if (csDesigning in ComponentState) then BitmapNeeded;
|
||||
end;
|
||||
|
||||
|
||||
// destroy control
|
||||
destructor TAdvLed.Destroy;
|
||||
begin
|
||||
FBlinkTimer.Free;
|
||||
FGlyphs[lsOn].Free;
|
||||
FGlyphs[lsOff].Free;
|
||||
FGlyphs[lsDisabled].Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
// loaded
|
||||
procedure TAdvLed.Loaded;
|
||||
begin
|
||||
Try
|
||||
If (csDesigning in ComponentState) Then Exit ;
|
||||
|
||||
// Load Bitmap if necessary
|
||||
BitmapNeeded;
|
||||
Finally
|
||||
inherited Loaded;
|
||||
End;
|
||||
end;
|
||||
|
||||
// timer
|
||||
procedure TAdvLed.DoTimer(Sender: TObject);
|
||||
begin
|
||||
if FlipFlop then SetState(lsOn )
|
||||
else SetState(lsoff);
|
||||
FlipFlop := Not FlipFlop;
|
||||
end;
|
||||
// trigger OnChangeEvent
|
||||
procedure TAdvLed.DoChange(AState: TLedState);
|
||||
begin
|
||||
if Assigned(FOnChange) then
|
||||
FOnChange(Self, AState);
|
||||
invalidate;
|
||||
end;
|
||||
// if bitmap is empty, load it
|
||||
procedure TAdvLed.BitmapNeeded;
|
||||
begin
|
||||
if (FGlyphs[lsOn].Bitmap.Empty) or (FGlyphs[lsOff].Bitmap.Empty) or
|
||||
(FGlyphs[lsDisabled].Bitmap.Empty) then
|
||||
begin
|
||||
SelectLedBitmap(FKind);
|
||||
Picture.Assign(BitmapToDraw);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAdvLed.SelectLedBitmap(const LedKind: TLedKind);
|
||||
const
|
||||
{ OnBitmaps: array[TLedKind] of string = ('LEDREDON', 'LEDGREENON', 'LEDBLUEON',
|
||||
'LEDYELLOWON', 'LEDPURPLEON', 'LEDBULBON', '');
|
||||
OffBitmaps: array[TLedKind] of string = ('LEDREDOFF', 'LEDGREENOFF',
|
||||
'LEDBLUEOFF', 'LEDYELLOWOFF', 'LEDPURPLEOFF', 'LEDBULBOFF' ,'');
|
||||
DisabledBitmaps: array[TLedKind] of string = ('LEDREDOFF', 'LEDGREENOFF',
|
||||
'LEDBLUEOFF', 'LEDYELLOWOFF', 'LEDPURPLEOFF', 'LEDBULBOFF' ,''); }
|
||||
OnBitmaps: array[TLedKind] of string = ('RED', 'GREEN', 'YELLOW',
|
||||
'BULBON', '');
|
||||
OffBitmaps: array[TLedKind] of string = ('BLACK', 'BLACK',
|
||||
'BLACK','BULBOFF' ,'');
|
||||
DisabledBitmaps: array[TLedKind] of string = ('BLACK', 'BLACK',
|
||||
'BLACK','BULBOFF' ,'');
|
||||
begin
|
||||
if LedKind <> lkCustom then
|
||||
begin
|
||||
FGlyphs[lsOn].LoadFromLazarusResource(OnBitmaps[LedKind]);
|
||||
FGlyphs[lsOff].LoadFromLazarusResource(OffBitmaps[LedKind]);
|
||||
FGlyphs[lsDisabled].LoadFromLazarusResource(DisabledBitmaps[LedKind]);
|
||||
end;
|
||||
end;
|
||||
// set led state internal
|
||||
procedure TAdvLed.SetStateInternal(const Value: TLedState);
|
||||
begin
|
||||
FState := Value;
|
||||
if not (csLoading in ComponentState) then
|
||||
DoChange(FState);
|
||||
Picture.Assign(BitmapToDraw);
|
||||
end;
|
||||
|
||||
// set led kind
|
||||
procedure TAdvLed.SetKind(const Value: TLedKind);
|
||||
begin
|
||||
if FKind <> Value then
|
||||
begin
|
||||
FKind := Value;
|
||||
SelectLedBitmap(FKind);
|
||||
Picture.Assign(BitmapToDraw);
|
||||
end;
|
||||
end;
|
||||
|
||||
// set led state
|
||||
procedure TAdvLed.SetState(const Value: TLedState);
|
||||
begin
|
||||
SetStateInternal(Value);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function TAdvLed.GetGlyph(const Index: Integer): TLedBitmap;
|
||||
begin
|
||||
case Index of
|
||||
0: Result := FGlyphs[lsDisabled];
|
||||
1: Result := FGlyphs[lsOff];
|
||||
2: Result := FGlyphs[lsOn];
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
end;
|
||||
procedure TAdvLed.GlyphChanged(Sender: TObject );
|
||||
begin
|
||||
// if (csDesigning in ComponentState) then Picture.Assign(Sender as TPicture);
|
||||
if (csDesigning in ComponentState) then
|
||||
begin
|
||||
if Sender = FGlyphs[lsDisabled] then FState := lsDisabled;
|
||||
if Sender = FGlyphs[lsOff] then FState := lsOff;
|
||||
if Sender = FGlyphs[lsOn] then FState := lsOn;
|
||||
Picture.Assign(Sender as TPicture);
|
||||
end;
|
||||
end;
|
||||
|
||||
// set custom bitmap
|
||||
procedure TAdvLed.SetGlyph(const Index: Integer; const Value: TLedBitmap);
|
||||
begin
|
||||
if FKind = lkCustom then
|
||||
begin
|
||||
case Index of
|
||||
0: FGlyphs[lsDisabled].Assign(Value);
|
||||
1: FGlyphs[lsOff].Assign(Value);
|
||||
2: FGlyphs[lsOn].Assign(Value);
|
||||
end;
|
||||
end;
|
||||
Picture.Assign(BitmapToDraw);
|
||||
end;
|
||||
|
||||
function TAdvLed.StoredGlyph(const Index: Integer): Boolean;
|
||||
begin
|
||||
Result := FKind = lkCustom;
|
||||
end;
|
||||
|
||||
// get bitmap for drawing
|
||||
function TAdvLed.BitmapToDraw: TLedBitmap;
|
||||
var
|
||||
ToDraw: TLedState;
|
||||
begin
|
||||
if not Enabled then
|
||||
ToDraw := lsOff
|
||||
else
|
||||
ToDraw := FState;
|
||||
Result := FGlyphs[ToDraw];
|
||||
end;
|
||||
|
||||
function TAdvLed.GetBlinkDuration: Integer;
|
||||
begin
|
||||
Result := FBlinkTimer.Interval;
|
||||
end;
|
||||
|
||||
procedure TAdvLed.SetBlinkDuration(const Value: Integer);
|
||||
begin
|
||||
FBlinkTimer.Interval := Value;
|
||||
end;
|
||||
|
||||
// set led blink
|
||||
procedure TAdvLed.SetBlink(const Value: Boolean);
|
||||
begin
|
||||
FBlink :=Value;
|
||||
if (csDesigning in ComponentState) then Exit;
|
||||
FBlinkTimer.Enabled := FBlink;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I ledbuttons.lrs}
|
||||
end.
|
||||
@ -11,7 +11,7 @@ interface
|
||||
|
||||
|
||||
uses
|
||||
Classes, LResources, IndAdvLed, IndLed, LedNumber, Sensors, IndGnouMeter;
|
||||
Classes, LResources, AdvLed, IndLed, LedNumber, Sensors, IndGnouMeter;
|
||||
|
||||
procedure Register;
|
||||
|
||||
@ -22,7 +22,7 @@ implementation
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents ('Industrial',[
|
||||
TindAdvLed, TIndLed, TLedNumber, TStopLightSensor, TAnalogSensor, TindGnouMeter]);
|
||||
TAdvLed, TIndLed, TLedNumber, TStopLightSensor, TAnalogSensor, TindGnouMeter]);
|
||||
|
||||
end;
|
||||
|
||||
|
||||
@ -1,265 +0,0 @@
|
||||
{ Component(s):
|
||||
TindAdvLed ---> old cindy name tcyAdvLed
|
||||
|
||||
Description:
|
||||
An advanced led with Group feature
|
||||
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mauricio
|
||||
* (https://sourceforge.net/projects/tcycomponents/).
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or the
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which
|
||||
* case the provisions of the GPL or the LGPL are applicable instead of those
|
||||
* above. If you wish to allow use of your version of this file only under the
|
||||
* terms of either the GPL or the LGPL, and not to allow others to use your
|
||||
* version of this file under the terms of the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and other
|
||||
* provisions required by the LGPL or the GPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file under the
|
||||
* terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****}
|
||||
|
||||
{**********************************************************************
|
||||
Package pl_Cindy.pkg
|
||||
for CodeTyphon Studio (http://www.pilotlogic.com/)
|
||||
***********************************************************************
|
||||
Modified by Jurassic Pork 2013 for package Industrial of Lazarus}
|
||||
|
||||
unit IndAdvLed;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses LCLIntf, LCLType, Classes, Types, Controls, Graphics, cyBaseLed, cyGraphics;
|
||||
|
||||
type
|
||||
TcyCustomAdvLed = class(TcyBaseLed)
|
||||
FPictureOn: TPicture;
|
||||
FPictureOff: TPicture;
|
||||
FPictureDisabled: TPicture;
|
||||
private
|
||||
FTransparent: boolean;
|
||||
procedure SetPictureOn(Value: TPicture);
|
||||
procedure SetPictureOff(Value: TPicture);
|
||||
procedure SetPictureDisabled(Value: TPicture);
|
||||
procedure SetTransparent(const Value: boolean);
|
||||
protected
|
||||
function TransparentColorAtPos(Point: TPoint): boolean; override;
|
||||
procedure Paint; override;
|
||||
procedure SetAutoSize(Value: Boolean); override;
|
||||
property Height default 25;
|
||||
property Width default 25;
|
||||
property PictureOn: TPicture read FPictureOn write SetPictureOn;
|
||||
property PictureOff: TPicture read FPictureOff write SetPictureOff;
|
||||
property PictureDisabled: TPicture read FPictureDisabled write SetPictureDisabled;
|
||||
property Transparent: boolean read FTransparent write SetTransparent default false;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure AdjustSize; override;
|
||||
published
|
||||
end;
|
||||
|
||||
TindAdvLed = class(TcyCustomAdvLed)
|
||||
private
|
||||
protected
|
||||
public
|
||||
published
|
||||
property Align;
|
||||
property Autosize;
|
||||
property Anchors;
|
||||
property Color;
|
||||
property Constraints;
|
||||
property Enabled;
|
||||
property Visible;
|
||||
property OnClick;
|
||||
property OnMouseDown;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
// Herited from TcyBaseLed :
|
||||
property AllowAllOff;
|
||||
property GroupIndex;
|
||||
property LedValue;
|
||||
property ReadOnly;
|
||||
// Herited from TcyCustomAdvLed :
|
||||
property PictureOn;
|
||||
property PictureOff;
|
||||
property PictureDisabled;
|
||||
property Transparent;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterComponents('Industrial',[TindAdvLed]);
|
||||
end;
|
||||
|
||||
constructor TcyCustomAdvLed.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FPictureOn := TPicture.Create;
|
||||
FPictureOff := TPicture.Create;
|
||||
FPictureDisabled := TPicture.Create;
|
||||
FTransparent := false;
|
||||
Height := 25;
|
||||
Width := 25;
|
||||
//Autosize := true; // Don' t work
|
||||
end;
|
||||
|
||||
destructor TcyCustomAdvLed.Destroy;
|
||||
begin
|
||||
FPictureOn.Free;
|
||||
FPictureOff.Free;
|
||||
FPictureDisabled.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.Paint;
|
||||
var curPicture: TPicture;
|
||||
begin
|
||||
if csDesigning in ComponentState
|
||||
then
|
||||
with Canvas do
|
||||
begin
|
||||
Pen.Style := psDash;
|
||||
Brush.Style := bsClear;
|
||||
Rectangle(0, 0, Width, Height);
|
||||
end;
|
||||
|
||||
case GetLedStatus of
|
||||
lsOn: curPicture := FPictureOn;
|
||||
lsOff: curPicture := FPictureOff;
|
||||
lsDisabled: curPicture := FPictureDisabled;
|
||||
end;
|
||||
|
||||
if ValidGraphic(curPicture.Graphic)
|
||||
then begin
|
||||
if curPicture.Graphic.Transparent <> FTransparent
|
||||
then curPicture.Graphic.Transparent := FTransparent;
|
||||
|
||||
if not AutoSize
|
||||
then begin
|
||||
{ if curPicture.Graphic is TIcon
|
||||
then DrawIconEx(Canvas.Handle, 0, 0, curPicture.Icon.Handle, Width, Height, 0, 0, DI_Normal) // Stretch draw doesn't work for icons!
|
||||
else }Canvas.StretchDraw(ClientRect, curPicture.Graphic);
|
||||
end
|
||||
else
|
||||
Canvas.Draw(0, 0, curPicture.Graphic);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.AdjustSize;
|
||||
var curPicture: TPicture;
|
||||
begin
|
||||
if Autosize
|
||||
then begin
|
||||
case GetLedStatus of
|
||||
lsOn: curPicture := FPictureOn;
|
||||
lsOff: curPicture := FPictureOff;
|
||||
lsDisabled: curPicture := FPictureDisabled;
|
||||
end;
|
||||
|
||||
if ValidGraphic(curPicture.Graphic)
|
||||
then SetBounds(Left, Top, curPicture.Graphic.Width, curPicture.Graphic.Height);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.SetAutoSize(Value: Boolean);
|
||||
begin
|
||||
Inherited;
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
function TcyCustomAdvLed.TransparentColorAtPos(Point: TPoint): boolean;
|
||||
var
|
||||
curPicture: TPicture;
|
||||
begin
|
||||
RESULT := false;
|
||||
|
||||
if Transparent
|
||||
then begin
|
||||
case GetLedStatus of
|
||||
lsOn: curPicture := FPictureOn;
|
||||
lsOff: curPicture := FPictureOff;
|
||||
lsDisabled: curPicture := FPictureDisabled;
|
||||
end;
|
||||
|
||||
if ValidGraphic(curPicture.Graphic)
|
||||
then begin
|
||||
if not AutoSize // Convert point coordinates to pixel coordinates ...
|
||||
then begin
|
||||
Point.x := (Point.x * curPicture.Graphic.Width) div Width;
|
||||
Point.y := (Point.y * curPicture.Graphic.Height) div Height;
|
||||
end;
|
||||
|
||||
RESULT := PictureIsTransparentAtPos(curPicture, Point);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.SetPictureOn(Value: TPicture);
|
||||
begin
|
||||
try
|
||||
FPictureOn.Assign(Value);
|
||||
if GetLedStatus = lsOn
|
||||
then begin
|
||||
AdjustSize;
|
||||
Invalidate;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.SetPictureOff(Value: TPicture);
|
||||
begin
|
||||
try
|
||||
FPictureOff.Assign(Value);
|
||||
if GetLedStatus = lsOff
|
||||
then begin
|
||||
AdjustSize;
|
||||
Invalidate;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.SetPictureDisabled(Value: TPicture);
|
||||
begin
|
||||
try
|
||||
FPictureDisabled.Assign(Value);
|
||||
if GetLedStatus = lsDisabled
|
||||
then begin
|
||||
AdjustSize;
|
||||
Invalidate;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyCustomAdvLed.SetTransparent(const Value: boolean);
|
||||
begin
|
||||
if value <> FTransparent
|
||||
then begin
|
||||
FTransparent := Value;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
233
components/IndustrialStuff/source/indcyBaseLed.pas
Normal file
233
components/IndustrialStuff/source/indcyBaseLed.pas
Normal file
@ -0,0 +1,233 @@
|
||||
{ Component(s):
|
||||
tcyBaseLed
|
||||
|
||||
Description:
|
||||
A base led component with Group feature
|
||||
Led states : ON/OFF/DISABLE
|
||||
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mauricio
|
||||
* (https://sourceforge.net/projects/tcycomponents/).
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or the
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which
|
||||
* case the provisions of the GPL or the LGPL are applicable instead of those
|
||||
* above. If you wish to allow use of your version of this file only under the
|
||||
* terms of either the GPL or the LGPL, and not to allow others to use your
|
||||
* version of this file under the terms of the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and other
|
||||
* provisions required by the LGPL or the GPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file under the
|
||||
* terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****}
|
||||
|
||||
{**********************************************************************
|
||||
Package pl_Cindy.pkg
|
||||
for CodeTyphon Studio (http://www.pilotlogic.com/)
|
||||
***********************************************************************}
|
||||
|
||||
unit indcyBaseLed;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses LCLIntf, LCLType, LMessages, Messages, Classes, Types, Controls, Graphics;
|
||||
|
||||
type
|
||||
TLedStatus = (lsOn, lsOff, lsDisabled);
|
||||
|
||||
TcyBaseLed = class(TGraphicControl)
|
||||
private
|
||||
FGroupIndex: Integer;
|
||||
FAllowAllOff: Boolean;
|
||||
FLedValue: Boolean;
|
||||
FReadOnly: Boolean;
|
||||
procedure SetAllowAllOff(Value: Boolean);
|
||||
procedure SetGroupIndex(Value: Integer);
|
||||
procedure UpdateExclusive;
|
||||
protected
|
||||
procedure Click; override;
|
||||
procedure Loaded; override;
|
||||
procedure SetEnabled(Value: Boolean); override;
|
||||
procedure CMButtonPressed(var Message: TLMessage); message CM_BUTTONPRESSED; // Called in UpdateExclusive procedure ...
|
||||
function TransparentColorAtPos(Point: TPoint): boolean; virtual;
|
||||
procedure LedStatusChanged; virtual;
|
||||
procedure SetInternalLedValue(Value: Boolean);
|
||||
function GetLedStatus: TLedStatus; virtual;
|
||||
procedure SetLedvalue(Value: Boolean); virtual;
|
||||
procedure SetReadOnly(AValue: Boolean); virtual;
|
||||
property AllowAllOff: Boolean read FAllowAllOff write SetAllowAllOff default false;
|
||||
property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0;
|
||||
property LedValue: Boolean read FLedvalue write SetLedvalue;
|
||||
property ReadOnly: Boolean read FReadOnly write SetReadOnly default false;
|
||||
public
|
||||
property Canvas;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
property LedStatus: TLedStatus read GetLedStatus;
|
||||
procedure Switch;
|
||||
published
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
constructor TcyBaseLed.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FAllowAllOff := false;
|
||||
FGroupIndex := 0;
|
||||
FLedvalue:= false;
|
||||
FReadOnly := false;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.LedStatusChanged;
|
||||
begin
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.Loaded;
|
||||
begin
|
||||
Inherited;
|
||||
ControlStyle := ControlStyle - [csDoubleClicks];
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.SetReadOnly(AValue: Boolean);
|
||||
begin
|
||||
if AValue <> FReadOnly
|
||||
then FReadOnly := AValue;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.SetEnabled(Value: Boolean);
|
||||
begin
|
||||
Inherited;
|
||||
LedStatusChanged;
|
||||
end;
|
||||
|
||||
function TcyBaseLed.TransparentColorAtPos(Point: TPoint): boolean;
|
||||
begin
|
||||
RESULT := false;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.Click;
|
||||
var aPt: TPoint;
|
||||
begin
|
||||
if not FReadOnly
|
||||
then begin
|
||||
GetCursorPos(aPt);
|
||||
aPt := Self.ScreenToClient(aPt);
|
||||
|
||||
if Not TransparentColorAtPos(aPt)
|
||||
then LedValue := not FLedValue;
|
||||
end;
|
||||
|
||||
Inherited;
|
||||
end;
|
||||
|
||||
function TcyBaseLed.GetLedStatus: TLedStatus;
|
||||
begin
|
||||
if not Enabled
|
||||
then
|
||||
RESULT := lsDisabled
|
||||
else
|
||||
if FLedValue
|
||||
then RESULT := lsOn
|
||||
else RESULT := lsOff;
|
||||
end;
|
||||
|
||||
// Procedure to force changing value :
|
||||
procedure TcyBaseLed.SetInternalLedValue(Value: Boolean);
|
||||
begin
|
||||
if FLedValue <> Value
|
||||
then begin
|
||||
FLedValue := Value;
|
||||
LedStatusChanged;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.Switch;
|
||||
begin
|
||||
LedValue := not FLedValue;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.SetLedvalue(Value: Boolean);
|
||||
begin
|
||||
if Value <> FLedvalue
|
||||
then begin
|
||||
if (not Value) and (not FAllowAllOff) and (FGroupIndex <> 0)
|
||||
then Exit; // Can't turn off all leds of the same group ...
|
||||
|
||||
FLedvalue := Value;
|
||||
LedStatusChanged;
|
||||
|
||||
if Value
|
||||
then UpdateExclusive; // Send message to turn off the other one ...
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.SetAllowAllOff(Value: Boolean);
|
||||
begin
|
||||
if FAllowAllOff <> Value
|
||||
then begin
|
||||
FAllowAllOff := Value;
|
||||
UpdateExclusive; // Inform FAllowAllOff value to the others from the same group
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.SetGroupIndex(Value: Integer);
|
||||
begin
|
||||
if FGroupIndex <> Value
|
||||
then begin
|
||||
FGroupIndex := Value;
|
||||
UpdateExclusive;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.UpdateExclusive;
|
||||
var
|
||||
Msg: TMessage;
|
||||
begin
|
||||
if (FGroupIndex <> 0) and (Parent <> nil)
|
||||
then begin
|
||||
Msg.Msg := CM_BUTTONPRESSED;
|
||||
Msg.WParam := FGroupIndex;
|
||||
Msg.LParam := PtrInt(Self);
|
||||
Msg.Result := 0;
|
||||
Parent.Broadcast(Msg);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TcyBaseLed.CMButtonPressed(var Message: TLMessage);
|
||||
var Sender: TcyBaseLed;
|
||||
begin
|
||||
if (csLoading in ComponentState) then exit;
|
||||
|
||||
if Message.WParam = FGroupIndex // Same group?
|
||||
then begin
|
||||
Sender := TcyBaseLed(Message.LParam);
|
||||
if Sender <> Self
|
||||
then begin
|
||||
if Sender.LedValue and FLedValue // Only one can be turn on on group mode ...
|
||||
then begin;
|
||||
FLedValue := false;
|
||||
LedStatusChanged;
|
||||
end;
|
||||
|
||||
FAllowAllOff := Sender.AllowAllOff;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
312
components/IndustrialStuff/source/indcyClasses.pas
Normal file
312
components/IndustrialStuff/source/indcyClasses.pas
Normal file
@ -0,0 +1,312 @@
|
||||
{ Unit indcyClasses from cyClasses
|
||||
|
||||
Description:
|
||||
Unit with sub-properties for components.
|
||||
|
||||
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mauricio
|
||||
* (https://sourceforge.net/projects/tcycomponents/).
|
||||
*
|
||||
* No contributors for now ...
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or the
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which
|
||||
* case the provisions of the GPL or the LGPL are applicable instead of those
|
||||
* above. If you wish to allow use of your version of this file only under the
|
||||
* terms of either the GPL or the LGPL, and not to allow others to use your
|
||||
* version of this file under the terms of the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and other
|
||||
* provisions required by the LGPL or the GPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file under the
|
||||
* terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****}
|
||||
|
||||
{**********************************************************************
|
||||
Package pl_Cindy.pkg
|
||||
for CodeTyphon Studio (http://www.pilotlogic.com/)
|
||||
***********************************************************************}
|
||||
|
||||
unit indcyClasses;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
// {$I cyCompilerDefines.inc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf, LCLType, Classes, Forms, Graphics, Math, Controls, ExtCtrls, SysUtils,
|
||||
indcyTypes, indcyGraphics;
|
||||
|
||||
type
|
||||
tcyBevel = class(TCollectionItem)
|
||||
private
|
||||
FHighlightColor: TColor;
|
||||
FShadowColor: TColor;
|
||||
FWidth: Word;
|
||||
FStyle: TcyBevelCut;
|
||||
FDrawRight: Boolean;
|
||||
FDrawLeft: Boolean;
|
||||
FDrawTop: Boolean;
|
||||
FDrawBottom: Boolean;
|
||||
FNeedOwnerRealign: Boolean;
|
||||
procedure SetHighlightColor(const Value: TColor);
|
||||
procedure SetShadowColor(const Value: TColor);
|
||||
procedure SetWidth(const Value: Word);
|
||||
procedure SetStyle(const Value: TcyBevelCut);
|
||||
procedure SetDrawBottom(const Value: Boolean);
|
||||
procedure SetDrawLeft(const Value: Boolean);
|
||||
procedure SetDrawRight(const Value: Boolean);
|
||||
procedure SetDrawTop(const Value: Boolean);
|
||||
protected
|
||||
function GetDisplayName: string; override;
|
||||
public
|
||||
constructor Create(ACollection: TCollection); override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property DrawLeft: Boolean read FDrawLeft write SetDrawLeft default True;
|
||||
property DrawTop: Boolean read FDrawTop write SetDrawTop default True;
|
||||
property DrawRight: Boolean read FDrawRight write SetDrawRight default True;
|
||||
property DrawBottom: Boolean read FDrawBottom write SetDrawBottom default True;
|
||||
property HighlightColor: TColor read FHighlightColor write SetHighlightColor default clBtnHighlight;
|
||||
property ShadowColor: TColor read FShadowColor write SetShadowColor default clBtnShadow;
|
||||
property Style: TcyBevelCut read FStyle write SetStyle default bcRaised;
|
||||
property Width: Word read FWidth write SetWidth default 1;
|
||||
end;
|
||||
|
||||
TcyBevelClass = class of tcyBevel;
|
||||
|
||||
tcyBevels = Class(TCollection)
|
||||
private
|
||||
FControl: TControl;
|
||||
FOnChange: TNotifyEvent;
|
||||
FNeedOwnerRealign: Boolean;
|
||||
function GetBevel(Index: Integer): TcyBevel;
|
||||
protected
|
||||
function GetOwner: TPersistent; Override;
|
||||
procedure Update(Item: TCollectionItem); Override;
|
||||
public
|
||||
constructor Create(aControl: TControl; BevelClass: TcyBevelClass);
|
||||
function Add: TcyBevel;
|
||||
procedure Delete(Index: Integer);
|
||||
procedure DrawBevels(aCanvas: TCanvas; var BoundsRect: TRect; RoundRect: Boolean);
|
||||
function xBevelsWidth: Integer;
|
||||
function BevelsWidth: Integer;
|
||||
property Items[Index: Integer]: TcyBevel read GetBevel; default;
|
||||
property NeedOwnerRealign: Boolean read FNeedOwnerRealign;
|
||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ tcyBevel }
|
||||
procedure tcyBevel.Assign(Source: TPersistent);
|
||||
begin
|
||||
if Source is tcyBevel then
|
||||
begin
|
||||
FHighlightColor := tcyBevel(Source).FHighlightColor;
|
||||
FShadowColor := tcyBevel(Source).FShadowColor;
|
||||
FWidth := tcyBevel(Source).FWidth;
|
||||
FStyle := tcyBevel(Source).FStyle;
|
||||
FDrawRight := tcyBevel(Source).FDrawRight;
|
||||
FDrawLeft := tcyBevel(Source).FDrawLeft;
|
||||
FDrawTop := tcyBevel(Source).FDrawTop;
|
||||
FDrawBottom := tcyBevel(Source).FDrawBottom;
|
||||
end;
|
||||
// inherited Assign(Source);
|
||||
end;
|
||||
|
||||
constructor tcyBevel.Create(ACollection: TCollection);
|
||||
begin
|
||||
inherited Create(ACollection);
|
||||
FHighlightColor := clBtnHighlight;
|
||||
FShadowColor := clBtnShadow;
|
||||
FWidth := 1;
|
||||
FStyle := bcRaised;
|
||||
FDrawLeft := true;
|
||||
FDrawTop := true;
|
||||
FDrawRight := true;
|
||||
FDrawBottom := true;
|
||||
FNeedOwnerRealign := true;
|
||||
end;
|
||||
|
||||
function tcyBevel.GetDisplayName: string;
|
||||
begin
|
||||
case FStyle of
|
||||
bcLowered: Result := 'Lowered';
|
||||
bcRaised: Result := 'Raised';
|
||||
bcNone: Result := 'None';
|
||||
bcTransparent: Result := 'Transparent';
|
||||
end;
|
||||
|
||||
Result := Result + ' Bevel';
|
||||
Result := Result + ' Width = ' + intToStr(FWidth);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetDrawBottom(const Value: Boolean);
|
||||
begin
|
||||
FDrawBottom := Value;
|
||||
Changed(false); // It will call TcyBevels.Update !
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetDrawLeft(const Value: Boolean);
|
||||
begin
|
||||
FDrawLeft := Value;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetDrawRight(const Value: Boolean);
|
||||
begin
|
||||
FDrawRight := Value;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetDrawTop(const Value: Boolean);
|
||||
begin
|
||||
FDrawTop := Value;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetHighlightColor(const Value: TColor);
|
||||
begin
|
||||
FHighlightColor := Value;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetShadowColor(const Value: TColor);
|
||||
begin
|
||||
FShadowColor := Value;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetStyle(const Value: TcyBevelCut);
|
||||
begin
|
||||
if FStyle = Value then EXIT;
|
||||
|
||||
if (FStyle = bcNone) or (Value = bcNone)
|
||||
then FNeedOwnerRealign := true;
|
||||
|
||||
FStyle := Value;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
procedure tcyBevel.SetWidth(const Value: Word);
|
||||
begin
|
||||
if FWidth = Value then EXIT;
|
||||
|
||||
FWidth := Value;
|
||||
FNeedOwnerRealign := true;
|
||||
Changed(false);
|
||||
end;
|
||||
|
||||
{TcyBevels}
|
||||
constructor TcyBevels.Create(aControl: TControl; BevelClass: TcyBevelClass);
|
||||
begin
|
||||
inherited Create(BevelClass);
|
||||
FControl := aControl;
|
||||
FNeedOwnerRealign := false;
|
||||
end;
|
||||
|
||||
function TcyBevels.GetBevel(Index: Integer): TcyBevel;
|
||||
begin
|
||||
Result := TcyBevel(inherited Items[Index]);
|
||||
end;
|
||||
|
||||
function TcyBevels.GetOwner: TPersistent;
|
||||
begin
|
||||
Result := FControl;
|
||||
end;
|
||||
|
||||
// Event Called by setting properties/events of TcyBevel :
|
||||
procedure TcyBevels.Update(Item: TCollectionItem);
|
||||
begin
|
||||
Inherited;
|
||||
if Assigned(FOnChange)
|
||||
then begin
|
||||
if Item <> nil
|
||||
then
|
||||
if TcyBevel(Item).FNeedOwnerRealign
|
||||
then begin
|
||||
FNeedOwnerRealign := true;
|
||||
TcyBevel(Item).FNeedOwnerRealign := false;
|
||||
end;
|
||||
|
||||
FOnChange(Self);
|
||||
FNeedOwnerRealign := false;
|
||||
end
|
||||
else
|
||||
FControl.Invalidate;
|
||||
end;
|
||||
|
||||
function TcyBevels.Add: TcyBevel;
|
||||
begin
|
||||
Result := TcyBevel(inherited Add);
|
||||
Result.Changed(false); // It will call TcyBevels.Update only at run-time!
|
||||
end;
|
||||
|
||||
procedure TcyBevels.Delete(Index: Integer);
|
||||
begin
|
||||
Inherited;
|
||||
FNeedOwnerRealign := true;
|
||||
Update(Nil);
|
||||
end;
|
||||
|
||||
procedure TcyBevels.DrawBevels(aCanvas: TCanvas; var BoundsRect: TRect; RoundRect: Boolean);
|
||||
var i: Integer;
|
||||
begin
|
||||
for i := 0 to Count-1 do
|
||||
case Items[i].FStyle of
|
||||
bcRaised:
|
||||
begin
|
||||
cyFrame3D(aCanvas, BoundsRect, Items[i].FHighlightColor, Items[i].FShadowColor, Items[i].FWidth,
|
||||
Items[i].FDrawLeft, Items[i].FDrawTop, Items[i].FDrawRight, Items[i].FDrawBottom, RoundRect);
|
||||
RoundRect := false;
|
||||
end;
|
||||
|
||||
bcLowered:
|
||||
begin
|
||||
cyFrame3D(aCanvas, BoundsRect, Items[i].FShadowColor, Items[i].FHighlightColor, Items[i].FWidth,
|
||||
Items[i].FDrawLeft, Items[i].FDrawTop, Items[i].FDrawRight, Items[i].FDrawBottom, RoundRect);
|
||||
RoundRect := false;
|
||||
end;
|
||||
|
||||
bcTransparent: // Just Inflate Rect
|
||||
begin
|
||||
InflateRect(BoundsRect, (-1) * Items[i].FWidth, (-1) * Items[i].FWidth);
|
||||
RoundRect := false;
|
||||
end;
|
||||
|
||||
bcNone: ;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TcyBevels.xBevelsWidth: Integer;
|
||||
begin
|
||||
RESULT := 0;
|
||||
end;
|
||||
|
||||
// 9999 for All other units like TcySimpleGauge
|
||||
function TcyBevels.BevelsWidth: Integer;
|
||||
var i: Integer;
|
||||
begin
|
||||
RESULT := 0;
|
||||
for i := 0 to Count-1 do
|
||||
if Items[i].FStyle <> bcNone
|
||||
then Inc(RESULT, Items[i].FWidth);
|
||||
end;
|
||||
|
||||
end.
|
||||
203
components/IndustrialStuff/source/indcyGraphics.pas
Normal file
203
components/IndustrialStuff/source/indcyGraphics.pas
Normal file
@ -0,0 +1,203 @@
|
||||
{ Unit indcyGraphics from cyGraphics
|
||||
|
||||
Description:
|
||||
Unit with graphic functions
|
||||
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mauricio
|
||||
* (https://sourceforge.net/projects/tcycomponents/).
|
||||
*
|
||||
* No contributors for now ...
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or the
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which
|
||||
* case the provisions of the GPL or the LGPL are applicable instead of those
|
||||
* above. If you wish to allow use of your version of this file only under the
|
||||
* terms of either the GPL or the LGPL, and not to allow others to use your
|
||||
* version of this file under the terms of the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and other
|
||||
* provisions required by the LGPL or the GPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file under the
|
||||
* terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****}
|
||||
|
||||
{**********************************************************************
|
||||
Package pl_Cindy.pkg
|
||||
for CodeTyphon Studio (http://www.pilotlogic.com/)
|
||||
***********************************************************************}
|
||||
|
||||
unit indcyGraphics;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
// {$I cyCompilerDefines.inc}
|
||||
|
||||
interface
|
||||
|
||||
// We need to put jpeg to the uses for avoid run-time not handled jpeg image ...
|
||||
uses
|
||||
LCLIntf, LCLType, Types, Classes, Forms, Graphics, Math, Buttons, Controls,
|
||||
ExtCtrls, SysUtils, indcyTypes;
|
||||
|
||||
// Objects painting functions :
|
||||
procedure cyFrame3D(Canvas: TCanvas; var Rect: TRect; TopLeftColor, BottomRightColor: TColor; Width: Integer;
|
||||
const DrawLeft: Boolean = true; const DrawTop: Boolean = true; const DrawRight: Boolean = true; const DrawBottom: Boolean = true;
|
||||
const RoundRect: boolean = false);
|
||||
|
||||
// TPicture and TGraphic functions:
|
||||
function PictureIsTransparentAtPos(aPicture: TPicture; aPoint: TPoint): boolean;
|
||||
function IconIsTransparentAtPos(aIcon: TIcon; aPoint: TPoint): boolean;
|
||||
function ValidGraphic(aGraphic: TGraphic): Boolean;
|
||||
|
||||
// Other functions:
|
||||
function PointInEllipse(const aPt: TPoint; const aRect: TRect): boolean;
|
||||
|
||||
implementation
|
||||
|
||||
{ Procedures and functions}
|
||||
|
||||
procedure cyFrame3D(Canvas: TCanvas; var Rect: TRect; TopLeftColor, BottomRightColor: TColor; Width: Integer;
|
||||
const DrawLeft: Boolean = true; const DrawTop: Boolean = true; const DrawRight: Boolean = true; const DrawBottom: Boolean = true;
|
||||
const RoundRect: boolean = false);
|
||||
var incValue: Integer;
|
||||
|
||||
procedure DrawLines;
|
||||
begin
|
||||
with Canvas, Rect do
|
||||
begin
|
||||
// Draw Left and Top line :
|
||||
Pen.Color := TopLeftColor;
|
||||
|
||||
if DrawLeft
|
||||
then begin
|
||||
MoveTo(Left, Top + incValue);
|
||||
LineTo(Left, Bottom);
|
||||
end;
|
||||
|
||||
if DrawTop
|
||||
then begin
|
||||
MoveTo(Left + incValue, Top);
|
||||
LineTo(Right, Top);
|
||||
end;
|
||||
|
||||
// Draw right and bottom line :
|
||||
Pen.Color := BottomRightColor;
|
||||
|
||||
if DrawRight
|
||||
then begin
|
||||
MoveTo(Right, Top + incValue);
|
||||
LineTo(Right, Bottom);
|
||||
end;
|
||||
|
||||
if DrawBottom
|
||||
then begin
|
||||
MoveTo(Right - incValue, Bottom);
|
||||
LineTo(Left-1 + incValue, Bottom);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
if RoundRect
|
||||
then incValue := 1
|
||||
else incValue := 0;
|
||||
|
||||
Canvas.Pen.Width := 1;
|
||||
Dec(Rect.Bottom);
|
||||
Dec(Rect.Right);
|
||||
|
||||
while Width > 0 do
|
||||
begin
|
||||
Dec(Width);
|
||||
DrawLines;
|
||||
incValue := 0;
|
||||
InflateRect(Rect, -1, -1);
|
||||
end;
|
||||
|
||||
Inc(Rect.Bottom);
|
||||
Inc(Rect.Right);
|
||||
end;
|
||||
|
||||
function PointInEllipse(const aPt: TPoint; const aRect: TRect): boolean;
|
||||
var
|
||||
CenterEllipseCoord: TPoint;
|
||||
EllipseWidth, EllipseHeight: Integer;
|
||||
begin
|
||||
CenterEllipseCoord := Point((aRect.Right + aRect.Left) div 2, (aRect.Bottom + aRect.Top) div 2);
|
||||
EllipseWidth := (aRect.Right - aRect.Left) div 2;
|
||||
EllipseHeight := (aRect.Bottom - aRect.Top) div 2;
|
||||
|
||||
RESULT := Sqr((aPt.x - CenterEllipseCoord.x)/EllipseWidth) + Sqr((aPt.y - CenterEllipseCoord.y)/EllipseHeight)
|
||||
<= 1;
|
||||
// = 0 On the center of ellipse
|
||||
// < 1 Inside the ellipse
|
||||
// = on the border of ellipse
|
||||
// > 1 Outside the ellipse
|
||||
end;
|
||||
|
||||
function PictureIsTransparentAtPos(aPicture: TPicture; aPoint: TPoint): boolean;
|
||||
begin
|
||||
RESULT := false; // TJPEGImage and others formats not handled ...
|
||||
if aPicture.Graphic = nil then Exit;
|
||||
if aPicture.Graphic.Empty then Exit;
|
||||
|
||||
if aPicture.Graphic is TBitmap
|
||||
then begin
|
||||
RESULT := aPicture.Bitmap.Canvas.Pixels[aPoint.X, aPoint.Y]
|
||||
= aPicture.Bitmap.Canvas.Pixels[0, aPicture.Bitmap.Height-1];
|
||||
end
|
||||
else
|
||||
if aPicture.Graphic is TIcon
|
||||
then
|
||||
RESULT := IconIsTransparentAtPos(aPicture.Icon, aPoint)
|
||||
end;
|
||||
|
||||
// 9999 New function for CodeTyphon
|
||||
function IconIsTransparentAtPos(aIcon: TIcon; aPoint: TPoint): boolean;
|
||||
var aPic: TPicture;
|
||||
begin
|
||||
RESULT := false;
|
||||
aPic := TPicture.Create;
|
||||
|
||||
try
|
||||
aPic.Bitmap.Width := aIcon.Width;
|
||||
aPic.Bitmap.Height := aIcon.Height;
|
||||
aPic.Bitmap.PixelFormat := pf1bit; // Black = not transparent
|
||||
aPic.Bitmap.Canvas.Brush.Color := clWhite;
|
||||
aPic.Bitmap.Canvas.FillRect(Rect(0, 0, aIcon.Width, aIcon.Height));
|
||||
|
||||
aPic.Assign(aIcon);
|
||||
|
||||
aPic.Bitmap.PixelFormat := pf1bit; // Black = not transparent
|
||||
|
||||
RESULT := aPic.Bitmap.Canvas.Pixels[aPoint.X, aPoint.Y] <> clBlack;
|
||||
|
||||
finally
|
||||
aPic.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ValidGraphic(aGraphic: TGraphic): Boolean;
|
||||
begin
|
||||
RESULT := false;
|
||||
if aGraphic <> Nil
|
||||
then
|
||||
if not aGraphic.Empty
|
||||
then RESULT := true;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
91
components/IndustrialStuff/source/indcyTypes.pas
Normal file
91
components/IndustrialStuff/source/indcyTypes.pas
Normal file
@ -0,0 +1,91 @@
|
||||
{ Unit indcyTypes from cyTypes
|
||||
|
||||
Description:
|
||||
Unit with Types declarations.
|
||||
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Mauricio
|
||||
* (https://sourceforge.net/projects/tcycomponents/).
|
||||
*
|
||||
* No contributors for now ...
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or the
|
||||
* GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which
|
||||
* case the provisions of the GPL or the LGPL are applicable instead of those
|
||||
* above. If you wish to allow use of your version of this file only under the
|
||||
* terms of either the GPL or the LGPL, and not to allow others to use your
|
||||
* version of this file under the terms of the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and other
|
||||
* provisions required by the LGPL or the GPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file under the
|
||||
* terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK *****}
|
||||
|
||||
{**********************************************************************
|
||||
Package pl_Cindy.pkg
|
||||
for CodeTyphon Studio (http://www.pilotlogic.com/)
|
||||
***********************************************************************}
|
||||
|
||||
unit indcyTypes;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf, LCLType, Graphics, Classes, types;
|
||||
|
||||
type
|
||||
// Graphic:
|
||||
TCaptionRender = (crNormal, crPathEllipsis, crEndEllipsis, crWordEllipsis);
|
||||
TCaptionOrientation = (coHorizontal, coHorizontalReversed, coVertical, coVerticalReversed);
|
||||
|
||||
TBgPosition = (bgCentered, bgTopLeft, bgTopCenter, bgTopRight, bgCenterRight, bgBottomRight, bgBottomCenter, bgBottomLeft, bgCenterLeft);
|
||||
TBgStyle = (bgNone, bgNormal, bgMosaic, bgStretch, bgStretchProportional);
|
||||
|
||||
TcyBevelCut = (bcLowered, bcRaised, bcNone, bcTransparent);
|
||||
|
||||
TDgradOrientation = (dgdVertical, dgdHorizontal, dgdAngle, dgdRadial, dgdRectangle);
|
||||
TDgradOrientationShape = (osRadial, osRectangle);
|
||||
TDgradBalanceMode = (bmNormal, bmMirror, bmReverse, bmReverseFromColor, bmInvertReverse, bmInvertReverseFromColor);
|
||||
|
||||
// Cindy components:
|
||||
TRunTimeDesignJob = (rjNothing, rjMove, rjResizeTop, rjResizeBottom, rjResizeLeft, rjResizeTopLeft,
|
||||
rjResizeBottomLeft, rjResizeRight, rjResizeTopRight, rjResizeBottomRight);
|
||||
|
||||
TLineCoord = record
|
||||
BottomCoord, TopCoord: TPoint;
|
||||
end;
|
||||
|
||||
//var
|
||||
// CaptionOrientationWarning: Boolean = true;
|
||||
|
||||
const
|
||||
DT_PATH_ELLIPSIS = $8000;
|
||||
DT_WORD_ELLIPSIS = $8000;
|
||||
|
||||
cCaptionOrientationWarning = 'Note that text orientation doesn''t work with all fonts!';
|
||||
|
||||
Alignments: array[TAlignment] of Word = (DT_LEFT, DT_RIGHT, DT_CENTER);
|
||||
WordWraps: array[Boolean] of Word = (DT_SINGLELINE, DT_WORDBREAK);
|
||||
TextLayouts: array[TTextLayout] of Longint = (DT_TOP, DT_VCENTER, DT_BOTTOM);
|
||||
CaptionOrientations: array[TCaptionOrientation] of word = (0, 1800, 900, 2700);
|
||||
CaptionRenders: array[TCaptionRender] of Integer = (0, DT_PATH_ELLIPSIS, DT_END_ELLIPSIS, DT_WORD_ELLIPSIS);
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
end.
|
||||
@ -7,7 +7,7 @@
|
||||
used by Lazarus for Industrial package
|
||||
***********************************************************************}
|
||||
|
||||
unit IndGnouMeter;
|
||||
unit indGnouMeter;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -73,6 +73,7 @@ type
|
||||
property Align;
|
||||
property Caption;
|
||||
property Visible;
|
||||
property ShowHint;
|
||||
property Value: Double read fValue write SetValue;
|
||||
property Color;
|
||||
property Font;
|
||||
|
||||
@ -49,7 +49,7 @@ unit IndLed;
|
||||
|
||||
interface
|
||||
|
||||
uses Classes, Types, Controls, Graphics, cyBaseLed, cyTypes, cyClasses, cyGraphics;
|
||||
uses Classes, Types, Controls, Graphics, indcyBaseLed, indcyTypes, indcyClasses, indcyGraphics;
|
||||
|
||||
type
|
||||
TShapeType = (stRectangle, stRoundRect, stEllipse);
|
||||
@ -118,6 +118,7 @@ type
|
||||
property OnMouseDown;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property ShowHint;
|
||||
// Herited from TcyBaseLed :
|
||||
property AllowAllOff;
|
||||
property GroupIndex;
|
||||
|
||||
@ -1,3 +1,76 @@
|
||||
LazarusResources.Add('tadvled','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#0#1'sRGB'#0#174#206#28#233#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167#147
|
||||
+#0#0#6'_IDATH'#199#149'Vmh'#148#217#21'~'#206'}?g'#242'1'#25''''#137'1'#163
|
||||
+#198#174#209#184#217#232'hB'#18#182#172#142'-+'#168#139#176#180#236#146'V'
|
||||
+#210']l'#161#20#202#246'G'#139#212#10#18#232#210'B'#245#143#136#236'B-'#180
|
||||
+#172#181#173#187#148'fK'#202#170#236#170#139'I'#180#27#19'g#Q'#243#253'a&'
|
||||
+#153'd2'#153#153#236#204';3'#239#251#222#211#31#26#187'l'#173#180#207#159's9'
|
||||
+#220#251'<'#247#28'.'#231#185#132'gC_'#183'n]x'#223#190'}'#7'C'#161'P('#24#12
|
||||
+#6#137#136#162#209'htppp'#240#202#149'+'#31#205#204#204'|'#12' '#135#255#19
|
||||
+'b'#251#246#237'o^'#188'xq$'#147#201'H'#203#178#248#193#240#3#217#211#219#205
|
||||
+#221#189'7'#228#189#251#247'd6'#155#149#217'l'#150';;;'''#155#155#155#127#4
|
||||
+'@}'#26#17#253#7#179#16#229'G'#143#30#253#195#177'c'#199#14#196'b1'#186'|'
|
||||
+#245#31#136#12#247'!'#195#9'8J'#30'`@e'#3#30#246'aGm'#19'^'#222'{'#0#27'7l'
|
||||
+#196#233#211#167#175'utt'#28'v'#28''''#250'_'#5#20'E'#169'8{'#246#236#199'mm'
|
||||
+'m'#13#127#253#240#3#234#30#188#204's'#133'qx'#139'Lj'#222#246#18#215#172#173
|
||||
+'%'#2#241#204#226'8'#250#30't#'#149'J'#211':c3'#183#212#237#197#235#223#250
|
||||
+#14'uuu'#141#28'9r'#228#155#182'm?|j'#191'O'#156'8qm~~^'#190#253#155#14#249
|
||||
+#198#241'C'#28#254#241's'#242#253'k'#191#149#137#204#2''''#173#184'LYqNYq'
|
||||
+#153#180#226'r9'#179'(?'#236'9'#207#223'x'#171'V'#182#31'?(;~u'#156'ggg'#229
|
||||
+#169'S'#167#250#0#20'='#185#244#234#162#181#181#245'g''O'#158#252#193#251#127
|
||||
+#251'3'#141#166#251'ih'#233#6#222':'#252#11#218#189's?1'#217#144#176#201'%'
|
||||
+#27'.lr'#216'&'#7#5#10'VnD'#205#134#26#234#188#245'{'#210#13#19#11#147#203't'
|
||||
+#184#173#189':'#18#137#208#248#248#248'''O'#4#136#168#242#204#153'3'#127'J'
|
||||
+#173'$='#3#147#221'|'''#246#9'6'#189'PI'#175#239#254'!;'#194'B'#1#22#21#200
|
||||
+'b'#27#22#21'8'#203#5'dQ'#144'Y'#228'e'#134#252'%'#229'<'#156#186#133#225#201
|
||||
+'!'#242#153#21'lp1'#194'{'#246#238#186'p'#225#194#31#153'9%'#0#160#161#161
|
||||
+#161#173#254#133'z'#255#192#224'g'#152#179#198'`T'#216#168#218'X'#142'4/ -'
|
||||
+#23#254#29#221#216#163#248'8'#151#226#5#164'x'#30#213#27#171#224#169#146#152
|
||||
+#205#14'#2'#212#143#154'M5'#197#173#173#173'o'#0' '#21#128#26#14#135'_'#137
|
||||
+#199#23#201#226'4'#22'r'#147'T'#250#156#9#219#155'FRFIc'#13#228#10#16#136#8#0
|
||||
+'?~'#24#12#9'f'#134'#'#29#202#24'1'#148'V'#154'X'#26#157'!6'#11#152#158#158
|
||||
+'B8'#28'>'#216#211#211#243'k'#21#128'w'#219#182'm'#161#225#145'a.[[B'#238'R'
|
||||
+#150#189#165#197#16#30#166#209#252'?9'#168'l'#5#145' '#2'1'#176#170#193#144
|
||||
+#144'`'#150#20#203#143'3'#27#5'xJ'#13'Jj+l'#248#20'LMOQ]]'#221#243#0'|*'#0'_'
|
||||
+'YYYY&'#183#2'G-@3'#21#232#166#14'C7'#145'p'#31#2#5#192#167'VB@}R'#3'3C'#194
|
||||
+'A'#218'YD'#220#153#129#174#155'0L'#27'zQ'#14#185'|'#22'6'#231#17#168'(/'#17
|
||||
+'BT'#168#0'LfV]'#215#133#161#155'P'#20#5#170#208#161#9#19#170'0a'#201#21#216
|
||||
+'v'#1#134#240'B!'#13#0#224#178#141#188#204#192#230'<Ta@'#19#14#20#145#131#170
|
||||
+#168'P'#21#13#178' '#225'8'#14#136#200#16#0#172#197#197#197#172#235#184'T'
|
||||
+#233#175#6#28#133#200'UIS'#13'hd'#146'&<'#164#9#19#128' '#249#168#243#4#16
|
||||
+#169'd'#146'N'#158'G{T'#147#200'U!'#11'D'#193#181'5$%#'#145'H8'#174#235'f'#5
|
||||
+#128#236#196#196#196#28#145'`'#191#167#2'^'#225'g'#215'"'#22#164'CQLVa'#176
|
||||
+'J'#30'h'#194#195':y'#161#147#151'5'#225'eM'#152#172#144#1'E1Y'#8#157']'#139
|
||||
+#160#203'b^'#31#216#196'v'#193#193#216#216'X'#12'@J'#0#176#6#6#6'>'#11#172#9
|
||||
+#208#220'T'#12#245#213'-d%]'#178'-'#1'W'#20#145'"'#12'RI'#127'\'#141#9'U'#152
|
||||
+#164#146'A'#10#25#164#144#14'Gx'#201#206#9#178#146'.'#234#214'6Rl:N'#21#229
|
||||
+#149#24#24#24#184#3' #'#0#228#251#250#250#254#158'H,'#203#216#220'"'#14'4'
|
||||
+#189#198#246#178#202#169#153#12'4Q'#194'P'#252'LdB'#129#206#10#12#168#208'Y'
|
||||
+#129#198'D:'#179#226#131'&J9'#253'0'#203#249'8'#240'J'#243'w9:;'#207#217'L'
|
||||
+#150'o'#222#188#217#9' '#167#0'`'#199'q'#146#130#196#158#250#250#250#160#147
|
||||
+#151#216'Q'#215#136'['#145'n'#242'W'#148'`sy'#8'~'#181#154#132'0'#160#192' '
|
||||
+#5'&t'#213#7#159#26#132'W)'#163#185#232#24#198'nN'#225#213#198'#'#228'$U|'
|
||||
+#145#206#224#218#213#235#247#250#251#251#223#6#144'X'#157'E'#249#137#137#137
|
||||
+#165'Ph'#231#161#244'JJk'#168#221'I_'#171#222#138#238#158#235#228#173#210'h{'
|
||||
+#224'E'#180#20#237#163':'#207'.l'#241#236#162#205#230#14'r'#225#208#221#185
|
||||
+#30'D.'#15#210#161#208#247#168'6'#16'BoO/Y'#153#188's'#238#220#185'c'#142#227
|
||||
+#244#2'pW'#5'\)e'#236#254#253#251'JKK'#235#139#163#163'#T'#187#254'y:'#248
|
||||
+#245'o'#243#208#157#187#24'J'#222#162#148#177#192'9a'#209#162'='#203#253#137
|
||||
+#235#232#190#251#17#236'1Ao'#134#127#202'z'#174#24#151'.]"M'#209#229';'#239
|
||||
+#188#251#238#242#242#242#239#0#164#191#234#7#4'`C0'#24#252'y{{'#251#247'M'
|
||||
+#175#161#175'Y'#227#231#221'/'#237'A'#213#250#10#154#140#15#243#23'n'#138#0
|
||||
+'f'#175'R'#138#154#192'V$b)'#186'q'#227'S'#142#197'bpl'#233#158#127#239#252
|
||||
+#249#169#169#169'_'#2#152#4' '#159#230'h'#2'@'#208#227#241#180#237#223#191
|
||||
+#255''''#141'M'#141#193'|>'#7'&'#137#234#234' |'#165#165#0#8'++iD'#163'QHW'
|
||||
,#194'cz'#241#249#231#131#177#174#174#174#179#153'L'#230'='#0#211#171#228'O'
|
||||
+#181#204#199#185'2'#0'!'#191#223#255'ZSS'#211#203'['#182'n'#217#20#8#4'4UU'#9
|
||||
+#0#187#142#139#196'r'#194#25#29#25#157#190'}'#251#246#213'x<'#254#23#0#3#0#18
|
||||
+#143'f'#213'3<'#249'KP'#1#172#1'P'#3#160'V'#211#180'Z'#211'4'#203#1'P.'#151
|
||||
+#139#219#182'='#14'`'#4#192#20#128'%'#0#246#255'd'#250'_E('#20'"'#0#26#0#227
|
||||
+'K?'#7#7'@'#1#128#29#137'D'#228#179#206#255#11#177'e'#15'-1Q'#134#220#0#0#0#0
|
||||
+'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('tanalogsensor','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#2#0#0#0'o'#21#170#175
|
||||
+#0#0#0#136'IDATx'#156#229#210'Y'#10#192' '#12#4#208#220#255'T'#189'Y'#170'M'
|
||||
@ -8,7 +81,7 @@ LazarusResources.Add('tanalogsensor','PNG',[
|
||||
+'''X'#175'@r>'#21'[/*'#231'-'#200#215#223'A'#243'9'#6#221'`TUS'#201#214#10
|
||||
+#161#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('tgrarrow','PNG',[
|
||||
LazarusResources.Add('tarrow','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#21#0#0#0#21#8#2#0#0#0'&u2'#193#0#0
|
||||
+#0']IDATx'#156#173#204#193#17#192' '#12#3'A'#247'_'#5'%'#166#131'0'#227#135
|
||||
+#25#130'1'#146#200#253#247#236#185#203'~'#240#230#221'z'#237#242#245#236'%'
|
||||
@ -16,40 +89,6 @@ LazarusResources.Add('tgrarrow','PNG',[
|
||||
+#143#240#171'D}*'#3'W'#254'('#183#30#148#137#167#228#228#5'9yA'#14#31'Q2'#241
|
||||
+'B'#29#230#217'<'#238#189'v'#138#229#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('tindadvled','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#11#18#0#0#11#18#1#210#221
|
||||
+'~'#252#0#0#0#22'tEXtCreation Time'#0'06/12/11'#132'x2'#182#0#0#0#28'tEXtSof'
|
||||
+'tware'#0'Adobe Fireworks CS5q'#181#227'6'#0#0#2'kIDATH'#137#157#150'1n'#27
|
||||
+'1'#16'E'#31#5#245#193#186#222#130#128'}'#15#205#1'r'#131#24#200#22#190#135
|
||||
+#215'Ez'#31#192#5#13'(7'#200#1'f'#1#187#247#1#20'`'#12#168#150#236#218#2#152
|
||||
+#130'Kjw%9J'#6#160#176'$'#135#255#15'?gH'#185#24'#'#231#152'sn'#3'T'#185#31
|
||||
+'ct'#231#172#155#159#11#218#182'-'#222'_'#245'3+'#156's9'#178'm'#140#241#226
|
||||
+'$H'#140#241#160#1#27'`'#19#194'2'#170'j'#28#217#199'[i'#170#26'CX'#198#236
|
||||
+#127#12#235'`'#7#206#185'M'#219#182#149'\'#11#139#203#197'~b'#247'>'#242#235
|
||||
+'^_'#160#6'_'#215#168'j'#165#170'8'#231'6'#211#221#184#225#25'd'#240#219#219
|
||||
+#219'1'#235#238#157#238#249#5#179'u'#25#242#190#134#26#216#15'a'#182#166'i'
|
||||
+#174'G'#146#21#130'S'#224#221'cG0'#5#20'/'#138#1#170#130#7'<B#2'#242#159#146
|
||||
+#140#8#226#199'['#197#252'K'#137#250#238#231'='#230'['#188#159#10#9#214#255
|
||||
+#152#10#141#191'I;'#234'MD'#10#193','#131#135#176#28#131#255#184#7'Q'#196#11
|
||||
+#158#220'&'#230#193'7J'#176#135'"'#159#217#154#16#150'U'#159#129#229#144#171
|
||||
+#239#223#190#150'u'#143'?'#127'a^i'#16#216#245#18#204#147'<'#160#25#187#239
|
||||
+#131#23'%'#4'h'#164'M'#253#193'nf}'#244#228#232#187#223#29'j'#15#189#222#202
|
||||
+#226'r1'#206#166'c'#230#129'F1S<'#245'h'#23's'#160#26'2'#218#19' Z'#250#221
|
||||
+#235#221#231#224#153#195#131#161#128#12#135#171'q'#29#236#222#25#230#157#161
|
||||
+#163#233'a'#223#142#144#24'`'#195#188'exU'#244#133'd'#172'0'#163'd'#206#148
|
||||
+#228#20'x'#153#240'`'#182'*C'#179#169#143#231#234'S'#144#147#224'i'#241#129
|
||||
+#205#128'Q'#133#14'Q'#236'H;i'#214#227#247#209'['#239'<'#139'1'#186#166#185#6
|
||||
+#210#253#146#14'\'#254#130'v'#4#223'Re[O'#22'B'#187#141'1'#186','#209#182'{~'
|
||||
+'I_54'#254#6'S'#249''''#2'oR'#136#134#177#205#0'b'#140#23'"'#178#5'`'#157#10
|
||||
+'E'#188'`'#225#156#208#129#144'*='#203#210'G'#191#191'*'#138#239#211#254','
|
||||
+#196#11#141'_bA0'#229'P2#'#21#245#4'|j'#7#215'u'#8#203'q'#225#25#152#165'*'
|
||||
+#29'e'#137#129#247'R|'#178#13#163'? '#152#146#228#236#26'~'#239#9'V)'#179'>'
|
||||
+#1#135'#or'#140#241'"'#223#132'S'#162#20#237#190#136#178'l!'#180#219#188'v'
|
||||
+#138'w'#244#209'/'#143'EO'#148#201#24#128#183'm'#2'='#5#156#237'@'#162#147
|
||||
+#142#255#249#183#229#15#187#175#156#165#150#179#179'c'#0#0#0#0'IEND'#174'B`'
|
||||
+#130
|
||||
]);
|
||||
LazarusResources.Add('tindgnoumeter','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#10#240#0#0#10#240#1'B'#172
|
||||
|
||||
289
components/IndustrialStuff/source/ledbuttons.lrs
Normal file
289
components/IndustrialStuff/source/ledbuttons.lrs
Normal file
@ -0,0 +1,289 @@
|
||||
LazarusResources.Add('black','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#4#0#0#0'J~'#245's'#0
|
||||
+#0#0#1'sRGB'#0#174#206#28#233#0#0#0#2'bKGD'#0#255#135#143#204#191#0#0#2#179
|
||||
+'IDAT8'#203#133#147'KlLQ'#24#199#127#231#222';'#237#180#213#199#232#3#29'RR'
|
||||
+#212'3'#19'i'#16#22'*^'#161#30';I'#133'DW'#130'D'#154'H'#144'n'#196'B'#132
|
||||
+#196#130#132'h'#226#145'HWlDD"At'#133'h)-A'''#148#138#209'F;}'#206#203#220'{'
|
||||
+'>'#139#185'f:'#21#241#157#213'9'#231#247'='#206#255';'#159'"'#219'rf'#213'm'
|
||||
+#174#15#4#252'~'#165'B'#161#238#238#135#15#190'=&'#206'?'#204'X'#222'x;'#24
|
||||
+#209'1'#233#209#207#228#169#254#160#163':*w'#191#172'<'#132#149#129'T'#154'.'
|
||||
+';~'#179'y'#219#128'z'#204'{l'#20#130#194#160#134#13#204#225'b'#219#169#189
|
||||
+'v(+'#184'Y'#222#210'5'#162'oJ'#147#222#163'WH'#149' '#136'W'#230#201'Zi'#210
|
||||
+'WuXZ{<'#179#179'*?'#217#214#175#207#234#3#178'@'#152#178#242'd'#163'>-'#223
|
||||
+#245#249#14#10#210#252#234#19#223#229#146#28#145#234#191#240'T'#166'-rA~'#200
|
||||
+#166'3'#238#3'T'#197#157#161'GrLg'#162#155#146'#9'#226#17'#'#237#178'C'#223
|
||||
+#215#15#199#205'*0`Y'#195'R_'#23#253#4#221'|'#185'L'#167#146'JfR'#228#202#19
|
||||
+#231#133'z'#199#220'i'#171#247#163#12#172#186#237#131'*L'#135#250#131#151#186
|
||||
+#197#154#20#225#195#0'`'#156'v'#213'G]='#150'A'#254#162'@'#143#20'0'#152#134
|
||||
+'r2'#141#193'K!'#0'6'#253'|'#165'f1'#197#6#197'%%Ib'#252't'#29#10#178#229'&'
|
||||
+#31#128'$'#189#216#148#20#26#229#6'^'#177#28'<'#252#207#20#26#27#149'k'#16
|
||||
+#251#25#181'U'#177'{,8YXf'#239'A'#19#182#157#168'A'#180#247#135#146'Rf'#2#224
|
||||
+'0'#142#158#132#219'L'#184#248'2~'#241'i'#128'Q'#131'Xg{'#169#26#166#26#0#205
|
||||
+#4'17j'#10#143#2#144'G'#5#229't'#190'&b'#144#232#184#23#214'q'#14#11#174#30
|
||||
+'C'#140#145' A'#140'aF'#221'\'#179'X*'#17'y~'#151#184#137#216'#j'#221#18#191
|
||||
+#131#163#130'n'#228#4#19'L'#16'!'#233#226'>v'#201#12#218#222#191':M'#216#4#18
|
||||
+#189'C'#129#157'IO=c'#233'nO6'#31#7')SQ'#251'Z'#179#253#12#199#4#28'='#240
|
||||
+#193'\'#181'&'#164'6*'#139#183'S'#240'r'#26'%_Y'#250'J'#203#240'u'#198#192'L'
|
||||
+'}'#150'H'#207#199#188'%'#129'Q'#179'F'#142'2M'#165#218'X'#192'z'#246#177'K'
|
||||
+#146#216#206#141#214'o'#231#8'!'#153#137'3'#240#231'5lm'#170#245''''#128'J'
|
||||
+#138#128'qBh'#188't'#13#220#191#28'i'#165'/'#165#183#154#212#202#18#2#190#221
|
||||
+#181#155#22#206'-'#245'X'#10#177#25#182#131'}/'#159#12#222#162#147'02e'#166#1
|
||||
+#176#152'N'#21#243'='#243#189'e'#168#248'`'#242'3A'#190'2'#148#150#235'/'#7
|
||||
+' '#160#240#144#139#5#216#252'"'#249'Fg'#223#255#6'l'#142'@'#170'Y'#138#128
|
||||
+#251#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('green','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#0#1'sRGB'#0#174#206#28#233#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167#147
|
||||
+#0#0#6'_IDATH'#199#149'Vmh'#148#217#21'~'#206'}?g'#242'1'#25''''#137'1'#163
|
||||
+#198#174#209#184#217#232'hB'#18#182#172#142'-+'#168#139#176#180#236#146'V'
|
||||
+#210']l'#161#20#202#246'G'#139#212#10#18#232#210'B'#245#143#136#236'B-'#180
|
||||
+#172#181#173#187#148'fK'#202#170#236#170#139'I'#180#27#19'g#Q'#243#253'a&'
|
||||
+#153'd2'#153#153#236#204';3'#239#251#222#211#31#26#187'l'#173#180#207#159's9'
|
||||
+#220#251'<'#247#28'.'#231#185#132'gC_'#183'n]x'#223#190'}'#7'C'#161'P('#24#12
|
||||
+#6#137#136#162#209'htppp'#240#202#149'+'#31#205#204#204'|'#12' '#135#255#19
|
||||
+'b'#251#246#237'o^'#188'xq$'#147#201'H'#203#178#248#193#240#3#217#211#219#205
|
||||
+#221#189'7'#228#189#251#247'd6'#155#149#217'l'#150';;;'''#155#155#155#127#4
|
||||
+'@}'#26#17#253#7#179#16#229'G'#143#30#253#195#177'c'#199#14#196'b1'#186'|'
|
||||
+#245#31#136#12#247'!'#195#9'8J'#30'`@e'#3#30#246'aGm'#19'^'#222'{'#0#27'7l'
|
||||
+#196#233#211#167#175'utt'#28'v'#28''''#250'_'#5#20'E'#169'8{'#246#236#199'mm'
|
||||
+'m'#13#127#253#240#3#234#30#188#204's'#133'qx'#139'Lj'#222#246#18#215#172#173
|
||||
+'%'#2#241#204#226'8'#250#30't#'#149'J'#211':c3'#183#212#237#197#235#223#250
|
||||
+#14'uuu'#141#28'9r'#228#155#182'm?|j'#191'O'#156'8qm~~^'#190#253#155#14#249
|
||||
+#198#241'C'#28#254#241's'#242#253'k'#191#149#137#204#2''''#173#184'LYqNYq'
|
||||
+#153#180#226'r9'#179'(?'#236'9'#207#223'x'#171'V'#182#31'?(;~u'#156'ggg'#229
|
||||
+#169'S'#167#250#0#20'='#185#244#234#162#181#181#245'g''O'#158#252#193#251#127
|
||||
+#251'3'#141#166#251'ih'#233#6#222':'#252#11#218#189's?1'#217#144#176#201'%'
|
||||
+#27'.lr'#216'&'#7#5#10'VnD'#205#134#26#234#188#245'{'#210#13#19#11#147#203't'
|
||||
+#184#173#189':'#18#137#208#248#248#248'''O'#4#136#168#242#204#153'3'#127'J'
|
||||
+#173'$='#3#147#221'|'''#246#9'6'#189'PI'#175#239#254'!;'#194'B'#1#22#21#200
|
||||
+'b'#27#22#21'8'#203#5'dQ'#144'Y'#228'e'#134#252'%'#229'<'#156#186#133#225#201
|
||||
+'!'#242#153#21'lp1'#194'{'#246#238#186'p'#225#194#31#153'9%'#0#160#161#161
|
||||
+#161#173#254#133'z'#255#192#224'g'#152#179#198'`T'#216#168#218'X'#142'4/ -'
|
||||
+#23#254#29#221#216#163#248'8'#151#226#5#164'x'#30#213#27#171#224#169#146#152
|
||||
+#205#14'#2'#212#143#154'M5'#197#173#173#173'o'#0' '#21#128#26#14#135'_'#137
|
||||
+#199#23#201#226'4'#22'r'#147'T'#250#156#9#219#155'FRFIc'#13#228#10#16#136#8#0
|
||||
+'?~'#24#12#9'f'#134'#'#29#202#24'1'#148'V'#154'X'#26#157'!6'#11#152#158#158
|
||||
+'B8'#28'>'#216#211#211#243'k'#21#128'w'#219#182'm'#161#225#145'a.[[B'#238'R'
|
||||
+#150#189#165#197#16#30#166#209#252'?9'#168'l'#5#145' '#2'1'#176#170#193#144
|
||||
+#144'`'#150#20#203#143'3'#27#5'xJ'#13'Jj+l'#248#20'LMOQ]]'#221#243#0'|*'#0'_'
|
||||
+'YYYY&'#183#2'G-@3'#21#232#166#14'C7'#145'p'#31#2#5#192#167'VB@}R'#3'3C'#194
|
||||
+'A'#218'YD'#220#153#129#174#155'0L'#27'zQ'#14#185'|'#22'6'#231#17#168'(/'#17
|
||||
+'BT'#168#0'LfV]'#215#133#161#155'P'#20#5#170#208#161#9#19#170'0a'#201#21#216
|
||||
+'v'#1#134#240'B!'#13#0#224#178#141#188#204#192#230'<Ta@'#19#14#20#145#131#170
|
||||
+#168'P'#21#13#178' '#225'8'#14#136#200#16#0#172#197#197#197#172#235#184'T'
|
||||
+#233#175#6#28#133#200'UIS'#13'hd'#146'&<'#164#9#19#128' '#249#168#243#4#16
|
||||
+#169'd'#146'N'#158'G{T'#147#200'U!'#11'D'#193#181'5$%#'#145'H8'#174#235'f'#5
|
||||
+#128#236#196#196#196#28#145'`'#191#167#2'^'#225'g'#215'"'#22#164'CQLVa'#176
|
||||
+'J'#30'h'#194#195':y'#161#147#151'5'#225'eM'#152#172#144#1'E1Y'#8#157']'#139
|
||||
+#160#203'b^'#31#216#196'v'#193#193#216#216'X'#12'@J'#0#176#6#6#6'>'#11#172#9
|
||||
+#208#220'T'#12#245#213'-d%]'#178'-'#1'W'#20#145'"'#12'RI'#127'\'#141#9'U'#152
|
||||
+#164#146'A'#10#25#164#144#14'Gx'#201#206#9#178#146'.'#234#214'6Rl:N'#21#229
|
||||
+#149#24#24#24#184#3' #'#0#228#251#250#250#254#158'H,'#203#216#220'"'#14'4'
|
||||
+#189#198#246#178#202#169#153#12'4Q'#194'P'#252'LdB'#129#206#10#12#168#208'Y'
|
||||
+#129#198'D:'#179#226#131'&J9'#253'0'#203#249'8'#240'J'#243'w9:;'#207#217'L'
|
||||
+#150'o'#222#188#217#9' '#167#0'`'#199'q'#146#130#196#158#250#250#250#160#147
|
||||
+#151#216'Q'#215#136'['#145'n'#242'W'#148'`sy'#8'~'#181#154#132'0'#160#192' '
|
||||
+#5'&t'#213#7#159#26#132'W)'#163#185#232#24#198'nN'#225#213#198'#'#228'$U|'
|
||||
+#145#206#224#218#213#235#247#250#251#251#223#6#144'X'#157'E'#249#137#137#137
|
||||
+#165'Ph'#231#161#244'JJk'#168#221'I_'#171#222#138#238#158#235#228#173#210'h{'
|
||||
+#224'E'#180#20#237#163':'#207'.l'#241#236#162#205#230#14'r'#225#208#221#185
|
||||
+#30'D.'#15#210#161#208#247#168'6'#16'BoO/Y'#153#188's'#238#220#185'c'#142#227
|
||||
+#244#2'pW'#5'\)e'#236#254#253#251'JKK'#235#139#163#163'#T'#187#254'y:'#248
|
||||
+#245'o'#243#208#157#187#24'J'#222#162#148#177#192'9a'#209#162'='#203#253#137
|
||||
+#235#232#190#251#17#236'1Ao'#134#127#202'z'#174#24#151'.]"M'#209#229';'#239
|
||||
+#188#251#238#242#242#242#239#0#164#191#234#7#4'`C0'#24#252'y{{'#251#247'M'
|
||||
+#175#161#175'Y'#227#231#221'/'#237'A'#213#250#10#154#140#15#243#23'n'#138#0
|
||||
+'f'#175'R'#138#154#192'V$b)'#186'q'#227'S'#142#197'bpl'#233#158#127#239#252
|
||||
+#249#169#169#169'_'#2#152#4' '#159#230'h'#2'@'#208#227#241#180#237#223#191
|
||||
+#255''''#141'M'#141#193'|>'#7'&'#137#234#234' |'#165#165#0#8'++iD'#163'QHW'
|
||||
,#194'cz'#241#249#231#131#177#174#174#174#179#153'L'#230'='#0#211#171#228'O'
|
||||
+#181#204#199#185'2'#0'!'#191#223#255'ZSS'#211#203'['#182'n'#217#20#8#4'4UU'#9
|
||||
+#0#187#142#139#196'r'#194#25#29#25#157#190'}'#251#246#213'x<'#254#23#0#3#0#18
|
||||
+#143'f'#213'3<'#249'KP'#1#172#1'P'#3#160'V'#211#180'Z'#211'4'#203#1'P.'#151
|
||||
+#139#219#182'='#14'`'#4#192#20#128'%'#0#246#255'd'#250'_E('#20'"'#0#26#0#227
|
||||
+'K?'#7#7'@'#1#128#29#137'D'#228#179#206#255#11#177'e'#15'-1Q'#134#220#0#0#0#0
|
||||
+'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('red','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167#147#0#0#0#9'pHYs'#0#0#0'H'#0#0#0
|
||||
+'H'#0'F'#201'k>'#0#0#0#9'vpAg'#0#0#0#24#0#0#0#24#0'xL'#165#166#0#0#6'lIDATH'
|
||||
+#199#149#150'[lT'#215#25#133#191#255#156#185#156'33'#142#199'w'#217#19'0'#225
|
||||
+'Rc'#3'q'#184#24'7i'#133'K'#5#149'K'#155#170'U'#211#212'J'#138#146#146'JQ'
|
||||
+#213#135#190'T'#168#174#26#132#212'TU'#5'/HA4'#18'<TA'#162#1#5#137'Dn'#131#16
|
||||
+#225#14#14'5'#24#227#18#140#239#6'3'#246#248#30#219'3'#227#153'9'#231#252'}'
|
||||
+#0#210'*'#165#168']/'#255#214#214#222'k'#237#189#180#245#175'-<'#25#129#242
|
||||
+#242#242#134#173'['#183'n'#171#173#173#173#141#197'b1'#17#145'x<'#30#239#236
|
||||
+#236#236'<u'#234#212#199#247#238#221';'#13','#240#127#194'X'#179'f'#205#235
|
||||
+'G'#143#30#237'I&'#147'^:'#157#214#238';w'#188#214'K'#151#244#202#197#139'^'
|
||||
+#215#237#219'^*'#149#242'R'#169#148#158'8qb'#176#174#174#238#231#128#239'qD'
|
||||
+#242#31#204#134'Q'#188's'#231#206'?777'#127'{,'#145#144#179'--'#244'~'#218
|
||||
+#138'99'#129'o!'#13#128'kY'#228#162'E,'#221#184#145'M'#219#182#177'h'#241'b'
|
||||
+#246#237#219'wv'#247#238#221#175':'#142#19#255#175#2#166'i'#150#236#223#191
|
||||
+#255'tSS'#211#234#143#142#29#147#174#191#253'U'#181#167#139#188'`P'#150'm'
|
||||
+#250#134#22#175#168#18#17#209#201#190'^'#250'.'#156'efnN'#204#21'+'#245#153
|
||||
+'-['#249#193'+'#175'HKKK'#207#142#29';'#190#153#203#229#134#31#235#247#174']'
|
||||
+#187#206#142#142#142'z{w'#237#242'~'#223#184'U'#127'SV'#236#181#190#243#142
|
||||
+#151#30#29#213#204#216#152#151#29#27#211#236#216#152#151#25#27#243#210#137
|
||||
+#132'w'#237#208'!}'#171#188#212'{{'#203'f'#239#143#205#205'z'#255#254'}o'#239
|
||||
+#222#189'm@'#248#139'C?'#26#212#215#215#255'j'#207#158'=?'#251#240#200#17#201
|
||||
+'\'#189'"s'#167'O'#243#242'['#187#165#230#197#239#138#153#203'!'#217#172'H6'
|
||||
+#139'd'#179'B6+'#146#205'H'#241#146'%<'#189#184'R:'#222'}W'#130'a'#139#190
|
||||
+#153'Y'#249#241#246#237#21#29#29#29#210#223#223#255#201#23#22#137'H'#233#241
|
||||
+#227#199'o?'#21#14#23#222'<'#246#190'N}p'#140#218'p'#158'|'#235#200'_4`'#24
|
||||
+#152' '#134#136'>\'#175#160'x'#10#174'"9T?'#217#241'S'#174#141#196#165#224
|
||||
+#165#151#180#234#251'?'#196'o'#219#201#198#198#198#213#174#235#14#25#0#171'W'
|
||||
+#175'nZUSSp'#235#234'U'#220#238'.b'#201#20#149#197'E'#152#241'8f'#252'>'#230
|
||||
+'H'#28#25#137'c<'#172'22'#130'9'#18#199#140#15'c'#12#15'SYV'#202#162#133#5'r'
|
||||
+#159#221#226'N['#27'K*+#'#245#245#245#175#1#226#3'|'#13#13#13#223#153#24#31
|
||||
+#23#153#153'&'#215#211'+'#229'~?'#249#211#147#152'w'#135#196#8#248#17#195#0
|
||||
+#17'A'#4'A'#5#5#212#195'p=|'#142'+'#145#248'0'#229#1'?'#147#253#3#18#206#164
|
||||
+#185';4DCC'#195#182#203#151'/'#255#193#7#132'V'#174'\Y'#219#219#221#173#21
|
||||
+#145#176#12#205#207'i4'#24' '#228#185'"'#151#206#169'T'#175#2#211#16'5'#12#21
|
||||
+'CD'#21'E'#21'<'#15'q]'#145#238'n'#13'-,'#16#13#4#196'N&5j'#8#247#6#7#165#170
|
||||
+#170#170#26#200#247#1#249#209'h4'#154#153#155#131'l'#134#144#24'XV'#144#128
|
||||
+'mc'#12#13'<'#176#188#188#2#252'>'#144#135#175#218#243#192'q'#144#209'Q'#140
|
||||
+#129'~'#252#182#133#229'z'#132#29#151'l2'#137#147#201'P\R'#146'g'#24'F'#137
|
||||
+#15#176'T'#213#231#185'.~'#203#194#240#153#24#193#0#134'm!'#161#16#204#207
|
||||
+#194#189',D'#194#224#15'<'#16#200'fa~'#30#210'i'#176'm'#12#215'Cr'#14'f&'#139
|
||||
+#25#8#160#158#135#227'8'#136'H'#208#0#210#227#227#227#169#156#227'H~'#236'ir'
|
||||
+'~'#191'8~'#191#24#182#5'!['#8#135#132#144#141#152#166' '#138#136#138#152#134
|
||||
+'H'#200#18#194'!'#8#217'b'#218#150'8~'#31#25#211#148#146#202'%'#226#2'SSS'
|
||||
+#142#235#186')'#3'H'#13#12#12#140'`'#154#26',-C'#139#138't'#222'4'#149'P'#16
|
||||
+'#b+'#182#165#132'Ch$'#164'D'#194'h$'#172#26#9#169#134'B'#170#182#133#17#182
|
||||
+'T'#194'AM'#154'&'#185'h'#190#22',]'#166#217#156'C___'#2#248#220#0#210#237
|
||||
+#237#237#127'/,*'#146#193#177'qJ^'#248#154'L'#170'J2'#224'C'#22#229#9'a['#212
|
||||
+#182#144#7#183'yPC'#182'`[B'#200'Bb'#17'I'#5'}2'#169'P'#184#177'^'#6'''&'#165
|
||||
+#184#172#132#246#246#246#27'@'#210#0'2mmm'#31'MMO{'#241#241'q'#214#188#250#19
|
||||
+#157#8'Z:8'#159'A'#11#243#149#165'E'#202'S'#22#26#12#170'Z'#22'jY'#170#129
|
||||
+#128#18#9#170'<S'#136#150#22#232'P2'#171#9#159#143'g_{]'#135#19#9#157'O'#165
|
||||
+#181#181#181#245#4#176'`'#2#234'8'#206#140#24#198#166#154#154#154'X'#198#245
|
||||
+'X'#190'a'#3#157#23#206'KY(B~'#221'z'#164'r'#177#16#177'Q'#203#18#13#219#24
|
||||
+#165#5#176#172#18')('#144#209#155'=\'#232#143'S'#253#230'/d"`'#241'y*'#197
|
||||
+#153's'#231'n_'#191'~'#253'm`'#234'Q/'#202#12#12#12'L>'#251#220's/'#206#205
|
||||
+#206#250#151#174']''e'#213#213'|z'#234#140#196'|"'#145#23'6#'#155#191''''#178
|
||||
+#246'y'#140#181'_'#21'YS'''#226':2y'#246#12'-m]'#178#226#141'7'#229#169'uu\n'
|
||||
+'m'#149'd&'#227#28'<x'#176#217'q'#156'+'#128#251'H'#192#245'</'#209#213#213
|
||||
+'e'#214#213#215'?'#223#215#219'+'#21#213#171'd'#195#203'Mz'#227#198'?H_>''yS'
|
||||
+#247#213#151'I'#138#198#135'4}'#238'c'#238#156#248#144'['#26#146#186#157#191
|
||||
+#213'd~'#1'''O'#158#20'#'#24#244#14#28'8'#240#167#233#233#233'C'#192#236#151
|
||||
+#243'@'#128'E'#177'X'#236#215#219#183'o'#127'#'#28#12#6#10#163#5#250#245#134
|
||||
+'M,*)'#150#153#174#207#212#155#153#18#20'5'#242#163#228'WU3:;'''#23#207#159
|
||||
,#215'D"A'#214#243#220#247#14#31'><44'#244';`'#16#240#30#151'h'#6#16#179'm'
|
||||
+#187#169#177#177#241#151#235#215#173#139'e'#211'iD'#149#138#138#10#242#242
|
||||
+#243#1#152#159#157'#'#30#143#227#170#135#21#14#209'q'#179'3'#209#210#210#178
|
||||
+'?'#153'L'#190#7#220'}D'#254#216#200'|8'#23#5'j'#11#10#10'~'#180'~'#253#250
|
||||
+'-_Y'#177'bIQQ'#145#223#231#243#9#160#142#235'2=5'#229#244#244#246#222#189'v'
|
||||
+#237#218#153#137#137#137#247#129'v`'#234'AoyB&'#255#27'|@!P'#9','#247#251#253
|
||||
+#203'-'#203'*'#6'daaa"'#151#203#245#3'='#192#16'0'#9#228#254#167#208#255'2jk'
|
||||
+'k'#5#240#3'A'#254#245'sp'#128','#144#235#232#232#240#158#180#255#159'<'#2
|
||||
+#236'[#'#156#28#156#0#0#0'%tEXtdate:create'#0'2010-02-11T15:08:24-06:00'#241
|
||||
+#172#142#210#0#0#0'%tEXtdate:modify'#0'2003-05-27T19:34:04-05:00!;_6'#0#0#0#0
|
||||
+'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('yellow','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
|
||||
+#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167#147#0#0#0#9'pHYs'#0#0#0'H'#0#0#0
|
||||
+'H'#0'F'#201'k>'#0#0#0#9'vpAg'#0#0#0#24#0#0#0#24#0'xL'#165#166#0#0#6'ZIDATH'
|
||||
+#199#149#150'[lUy'#21#198#127#235#191#247'>g'#239'^8='#189#209'r(%r+'#165'L'
|
||||
+#5','#149'L'#166#199'L'#134#4#24#141#209'h'#166#142#169#23#156#7'%F_'#8#145
|
||||
+#24#9#137#190#241'D'#8'a'#18'1'#19#195#8'q'#140'F2V'#28'p'#134#17#24#169#12
|
||||
+#180'S;'#3#133'Rz'#131#158#150#150#182#180#156#251'>{'#249'PQ3'#131'D'#191'd'
|
||||
+'%'#255#172'd}'#223#203'Z'#223#247#23#158#142'Pmmm|'#251#246#237#187#154#155
|
||||
+#155#155'c'#177'XLDd|||'#188#175#175#175#239#220#185's'#127#26#27#27'{'#27
|
||||
+#200#240#127#194'l'#220#184#241'[o'#188#241#198'@2'#153#12#210#233#180#222
|
||||
+#186'u3'#232#186#252#158'^'#254#235#165#160#191#255'F'#144'J'#165#130'T*'#165
|
||||
+#167'O'#159#30'nii'#249#30'`?'#137'H>'#193'lL'#229#190'}'#251'~'#185#127#255
|
||||
+#254#157#247''''''#229#252#159';'#185'}'#253#10#166'0'#141'E'#6'P'#10'x'#20
|
||||
+'L'#148'U'#13'-'#180'='#191#139#186#21'+8|'#248#240#187#7#15#30#252#186#239
|
||||
+#251#227#255'U'#192#178#172#170#163'G'#143#190#221#222#222#222#244#230#239
|
||||
+#127'#'#215#175#157#209#194#163#1'J'#138#194#178#166')'#174'U'#181'kDDtzb'
|
||||
+#144#219#31']`n~^'#156#210#181#186'j'#227#11'|'#233'+/Kgg'#231#192#238#221
|
||||
+#187#159#207#231#243'w'#159'$'#16':p'#224#192#217'={'#246#180#157'x'#237#24
|
||||
+#169#251']'#146#156#232#213'/v'#28'`'#211#179'_'#22'c'#140#138' '#128#170'B'
|
||||
+#160#202'GW'#254'('#191'}'#237#199#234'U6'#18#174'l'#145#142#221#223#215'S'
|
||||
+#167'Nu'#239#221#187'7'#14'$'#1#172#199#236#173#173#173'{'#15#29':'#244#202
|
||||
+#233#223#157#146#244#253#191#201#252#200'y^'#250#246'O'#164#169#245'E1'#248
|
||||
+#24#205#9#154#3#205#137#4'9'#145' /'#149#181#245#212#213#173#148#238'w~.a'
|
||||
+#207'cp'#236#161#180#127#173'cYoo'#175#220#185's'#231#157#127#9#136'H'#245
|
||||
+#145'#GN-'#204#207'yc7/'#232#204#224'[<'#179#186'BZw'#254'@'#173' '#133#209
|
||||
+#164#152' '#165'&H'#138#20#146'J!'#9#133'G'#168#159#148#146'H'#149#166#238']'
|
||||
+'dx'#240#186#184'%U'#234#155'%'#180#197'?'#183#233#228#201#147#191'R'#213#135
|
||||
+#6#160#169#169#169'}'#195#134#198#232#135#189'W'#200#207#223#164#182'4'#205
|
||||
+#138'X'#5#146'K`r'#227#152#236#4'd'#19#144#153'X'#172'l'#2#201'&'#144#236'8&'
|
||||
+'{'#143#250#186#165',/'#203#145#157#189'A'#255#135'WY'#185#178#190#164#181
|
||||
+#181#245#155#128#24#192#142#199#227'/NOO'#137#248's'#228#230#6#165#166'"$K'
|
||||
+#156'YLfT$'#155#16#205'&'#208#204#132#4#153#4'A6!'#154'Y,'#201#142'#'#153#187
|
||||
+'R'#204#184#212#148#135'(,'#12'K'#145#147#149#209#145#17#226#241#248'.'#192
|
||||
+#182#129#162#134#134#134#230#219#183'niMU'#137#164'n%'#181#172'4LQ8'#144#224
|
||||
+#193'{Jt=j'#140' FA'#4'PT'#129#0#130#130#232#220#128#186'v'#134'HiH'#194#147
|
||||
+')'#141#148#8'c'#163#195#178'n'#221#186#245'@'#196#6'"eeee'#153#212#2#174#201
|
||||
+#226#133#13#174#27'&'#20'v!=L`+'#226#213#128'q'#16#4'E'#1#133#192'G3'#147#144
|
||||
+#26'"'#20'vq'#189#2#197'^'#158'|6'#133#175'Y*'#151'V'#149#26'c'#170'l'#192'U'
|
||||
+'U;'#8#10#132'<'#23#203#178'0v'#8#227#184#24#167#8'-'#204'C:'#135'8'#197#168
|
||||
+'q'#0#208'B'#14#252'$'#20'2'#136#237'a'#156#0'c'#231#176','#27#203'r'#8#130#0
|
||||
+#223#247#17#145#176#1#210'SSS'#169#188#239'K'#164'<F>'#176#197#199#22#203'q'
|
||||
+#193'vE'#236'"'#17#199#3'1'#130'('#160'"'#198#8#182'+'#216#30#216#174'X'#142
|
||||
+'+'#190':'#228#10'F'#170'j'#235#165#16#192#204#204#140'_('#20'R'#6'H'#13#13
|
||||
+#13'%D,uK'#170'!T'#161#201#172'Qu'#194#152#176#167#216#174'b{'#224#20')v18'
|
||||
+#197#186#248#246#20#203#197#132'\'#149'PHSY'#131'oE4Z'#189'J'#243#249'<'#131
|
||||
+#131#131#147#192'C'#3#164'{zz'#222'//'#175#144#225#177')'#170'?'#181'Mf'#22
|
||||
+'TR'#190#133#169'('#17#28'W'#176'\'#196#246'D'#28#15#177'='#193#246'D,Wp'#194
|
||||
+'HE'#137#164#213#150#153'GJ'#197#138#22#25#185';-'#149'U'#213#244#244#244'|'
|
||||
+#0'$'#13#144#189'z'#245#234#155'3'#179#179'A"1E'#243#179'/'#235#131'dXG'#238
|
||||
+'eP7'#162#166#170'\q]'#212#132'T'#141#139'ZaUq'#148'pX'#165'2'#138#20#151#233
|
||||
+#232#221#172#222#127'h'#177#169#237#27'z'#247#222#164'>J'#166#181#171#171#235
|
||||
+'4'#144#177#0#245'}'#127'N'#196#180'5nh'#140'e'#179#1'k'#26'?C_'#247'E'#169
|
||||
+#142#150'P'#182'|3'#166#184'N$'#228#162#198#21#28#15#171'$'#138'D'#234#16''''
|
||||
+'*'#137#129#1'.u'#221#163#169#237#187#242#224'Q'#152#249#133#20#231#223#253
|
||||
+#203#141#238#238#238#159#1'3'#143#189'(;44'#244#224#153#230'O'#127'a~a'#222
|
||||
+'Y'#181'n'#147',]'#222'@'#215#133#243#178#172#202#146#210#154'6'#236#200#231
|
||||
+#197'^'#178#21'{I'#171'X'#197'['#4'|'#153#30#188#192#153'3'#215'e'#253#182'W'
|
||||
+'$R'#179#133#203#151#187'$'#153#202#250#199#143#31#223#239#251#254'e'#160#240
|
||||
+'X'#160#16#4#193'd'#127#127#191#181'uk'#235#182#219#3#3#18#171'o'#148#173#241
|
||||
+#151#244#131'k}$''.Jq8'#161#150#149#148' 7'#170#201#201's'#220'|'#255#15#220
|
||||
+#184#227#202'gw'#238#215#148#31#225#236#217#183#196#216#161#224#216#177'W_'
|
||||
+#157#157#157#253#5'0'#255'q'#187#22#160'.'#22#139#253#168#163#163#227';E^8T^'
|
||||
+'^'#166#207'='#23#167'.V)3'#19#253#26#228'f'#5'T'#141'SFti'#3#19#247#31#202
|
||||
+#165'K'#23'ubr'#146#188#31#20'N'#156'x'#253#245#145#145#145#159#2#195#139#167
|
||||
,#254#201'D3@'#204#243#188#246#29';v'#252'p'#203#230#205#177'\.'#13#170',['
|
||||
+#182#140'%'#145#8#0#11#11#243'$'#198#199')'#4#138#235#22#209#251#247#190#201
|
||||
+#206#206#206#163#201'd'#242#4'0'#250#152#252#137#145#249#207'^'#25#208#28#141
|
||||
+'F'#191#186'e'#203#150#23#214#174']'#179#178#162#162#194#177'm['#22#151#162
|
||||
+#192#236#236#140'?0p{'#244#218#181'k'#231#167#167#167#127#13#244#0'3'#139'>'
|
||||
+#242#148'L'#254#15#216'@9P'#15#172'v'#28'g'#181#235#186#149#128'd2'#153#233
|
||||
+'|>'#127#7#24#0'F'#128#7'@'#254#127#10#253#143#163#185#185'Y'#0#7#8#243#239
|
||||
+#159#131#15#228#128'|ooo'#240#180#249#127#0#221'Q'#234'~'#203#183#174#202#0#0
|
||||
+#0'%tEXtdate:create'#0'2010-02-11T15:08:24-06:00'#241#172#142#210#0#0#0'%tEX'
|
||||
+'tdate:modify'#0'2003-05-27T19:36:04-05:00%'#206#143#11#0#0#0#0'IEND'#174'B`'
|
||||
+#130
|
||||
]);
|
||||
LazarusResources.Add('bulboff','XPM',[
|
||||
'/* XPM */'#13#10'static char * LEDBULBOFF[] = {'#13#10'"15 15 16 1",'#13#10
|
||||
+'" '#9'c #000000",'#13#10'".'#9'c #800000",'#13#10'"+'#9'c #008000",'#13#10
|
||||
+'"@'#9'c #808000",'#13#10'"#'#9'c #000080",'#13#10'"$'#9'c #800080",'#13#10
|
||||
+'"%'#9'c #008080",'#13#10'"&'#9'c #808080",'#13#10'"*'#9'c #C0C0C0",'#13#10
|
||||
+'"='#9'c #FF0000",'#13#10'"-'#9'c #00FF00",'#13#10'";'#9'c #FFFF00",'#13#10
|
||||
+'">'#9'c #0000FF",'#13#10'",'#9'c #FF00FF",'#13#10'"'''#9'c #00FFFF",'#13#10
|
||||
+'")'#9'c #FFFFFF",'#13#10'"@@@@@@@@@@@@@@@",'#13#10'"@@@@@@@@@@@@@@@",'#13#10
|
||||
+'"@@@@@@@@@@@@@@@",'#13#10'"@@@@@@@@@@@@@@@",'#13#10'"@@@@@@ @@@@@@",'#13
|
||||
+#10'"@@@@@ ))) @@@@@",'#13#10'"@@@@ ))))) @@@@",'#13#10'"@@@@ ))&)) @@@@",'
|
||||
+#13#10'"@@@@ ))&)) @@@@",'#13#10'"@@@@@ )&) @@@@@",'#13#10'"@@@@@@ ) @@@@@@"'
|
||||
+','#13#10'"@@@@@@ ) @@@@@@",'#13#10'"@@@@@@ @@@@@@",'#13#10'"@@@@@@ * @@@@'
|
||||
+'@@",'#13#10'"@@@@@@ @@@@@@"};'#13#10
|
||||
]);
|
||||
LazarusResources.Add('bulbon','XPM',[
|
||||
'/* XPM */'#13#10'static char * LEDBULBON[] = {'#13#10'"15 15 16 1",'#13#10'"'
|
||||
+' '#9'c #000000",'#13#10'".'#9'c #800000",'#13#10'"+'#9'c #008000",'#13#10'"'
|
||||
+'@'#9'c #808000",'#13#10'"#'#9'c #000080",'#13#10'"$'#9'c #800080",'#13#10'"'
|
||||
+'%'#9'c #008080",'#13#10'"&'#9'c #808080",'#13#10'"*'#9'c #C0C0C0",'#13#10'"'
|
||||
+'='#9'c #FF0000",'#13#10'"-'#9'c #00FF00",'#13#10'";'#9'c #FFFF00",'#13#10'"'
|
||||
+'>'#9'c #0000FF",'#13#10'",'#9'c #FF00FF",'#13#10'"'''#9'c #00FFFF",'#13#10
|
||||
+'")'#9'c #FFFFFF",'#13#10'"@@@@@@@;@@@@@@@",'#13#10'"@@@@@@@;@@@@@@@",'#13#10
|
||||
+'"@@;@@;;;;;@@;@@",'#13#10'"@@@;;;;;;;;;@@@",'#13#10'"@@@;;; ;;;@@@",'#13
|
||||
+#10'"@@;;; );) ;;;@@",'#13#10'"@@;; ););) ;;@@",'#13#10'";;;; ;)&); ;;;;",'
|
||||
+#13#10'"@@;; );&;) ;;@@",'#13#10'"@@;;; )&) ;;;@@",'#13#10'"@@@;;; ) ;;;@@@"'
|
||||
+','#13#10'"@@@;;; ; ;;;@@@",'#13#10'"@@;@@; ;@@;@@",'#13#10'"@@@@@@ * @@@@'
|
||||
+'@@",'#13#10'"@@@@@@ @@@@@@"};'#13#10
|
||||
]);
|
||||
@ -7,6 +7,7 @@
|
||||
tel: 380-/44/-552-10-29
|
||||
|
||||
TStopLightSensor and TAnalogSensor sensor components
|
||||
Modified by Jurassic Pork for Lazarus "Industrial" package
|
||||
}
|
||||
unit Sensors;
|
||||
|
||||
@ -56,7 +57,7 @@ type
|
||||
function GetStatus: TStopLights;
|
||||
procedure SetColorState(slStopLight: TStopLights); virtual;
|
||||
published
|
||||
property Caption read GetCaption write SetCaption;
|
||||
property Caption read GetCaption write SetCaption;
|
||||
|
||||
property ShowText: Boolean read FShowText write SetShowText;
|
||||
property ShowLevel: Boolean read FShowLevel write SetShowLevel;
|
||||
@ -184,20 +185,23 @@ begin
|
||||
if (FValue <> AValue) then
|
||||
begin
|
||||
FValue := AValue;
|
||||
FlblShowText.Caption := Caption + FloatToStr(FValue);
|
||||
FlblShowText.Caption := FlblShowText.Hint + FloatToStr(FValue);
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSensorPanel.GetCaption: TCaption;
|
||||
begin
|
||||
// Modif J.P 05/2013 Caption replace Hint
|
||||
Result := FlblShowText.Hint;
|
||||
end;
|
||||
|
||||
procedure TSensorPanel.SetCaption(AValue: TCaption);
|
||||
begin
|
||||
// Modif J.P 05/2013 Caption replace Hint
|
||||
FlblShowText.Hint := AValue;
|
||||
inherited Caption := '';
|
||||
FlblShowText.Caption := FlblShowText.Hint + FloatToStr(FValue);
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user