| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Fax.: +49 (0)351-8037944 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 17.03.98 - 18:00:02 $ =}
- {========================================================================}
- Unit MMEGauge;
- {$I COMPILER.INC}
- Interface
- Uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- SysUtils,
- Messages,
- Classes,
- Graphics,
- Controls,
- Forms,
- Dialogs,
- Menus,
- MMUtils,
- MMString,
- MMObj,
- MMMulDiv,
- MMDIBCv;
- const
- VALUERANGE = 100; { Range for SetValue/GetValue, here 0..100% }
- type
- TMMLEDGaugeKind = (gkHorizontal, gkVertical);
- TMMLEDGaugeDirection = (dirNormal, dirReversed);
- {-- TMMLEDGauge ---------------------------------------------------------}
- TMMLEDGauge = class(TMMDIBGraphicControl)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- property NumSpots: integer read FNumSpots;
- property Point1Spot: integer read FPoint1Spot;
- property Point2Spot: integer read FPoint2Spot;
- published
- property OnClick;
- property OnDblClick;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property Align;
- property Bevel;
- property PopupMenu;
- property ParentShowHint;
- property ShowHint;
- property Visible;
- property Enabled;
- property ParentColor default False;
- property Color default clBlack;
- property Kind: TMMLEDGaugeKind read FKind write SetKind default gkHorizontal;
- property Height default 17;
- property Width default 200;
- property SpotSpace: integer read FSpotSpace write SetSpotSpace default 1;
- property SpotWidth: integer read FSpotWidth write SetSpotWidth default 1;
- property Bar1Color: TColor index 0 read FBar1Color write SetColors default clAqua;
- property Bar2Color: TColor index 1 read FBar2Color write SetColors default clAqua;
- property Bar3Color: TColor index 2 read FBar3Color write SetColors default clRed;
- property Inactive1Color: TColor index 3 read FInact1Color write SetColors default clTeal;
- property Inactive2Color: TColor index 4 read FInact2Color write SetColors default clTeal;
- property Inactive3Color: TColor index 5 read FInact3Color write SetColors default clMaroon;
- property InactiveDoted: Boolean read FInactiveDoted write SetInactiveDoted default False;
- property ActiveDoted: Boolean read FActiveDoted write SetActiveDoted default False;
- property Point1: integer index 0 Read FPoint1 write SetPoints default 50;
- property Point2: integer index 1 Read FPoint2 write SetPoints default 85;
- property Direction: TMMLEDGaugeDirection read FDirection write SetDirection default dirNormal;
- property Progress: integer read FProgress write SetProgress default 0;
- end;
- implementation
|