{========================================================================} {= (c) 1995-98 SwiftSoft Ronald Dittrich =} {========================================================================} {= All Rights Reserved =} {========================================================================} {= D 01099 Dresden = Tel.: +0351-8012255 =} {= 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: 20.01.1998 - 18:00:00 $ =} {========================================================================} unit MMGauge; {$I COMPILER.INC} interface uses {$IFDEF WIN32} Windows, {$ELSE} WinTypes, WinProcs, {$ENDIF} Classes, Controls, Graphics, Menus, MMObj; type TMMGaugeKind = (gkText,gkHorizontalBar,gkVerticalBar,gkPie,gkNeedle); const defWidth = 150; defHeight = 18; defKind = gkHorizontalBar; defShowText = True; defForeColor = clActiveCaption; defBackColor = clWhite; defMinValue = 0; defMaxValue = 100; defProgress = 0; defBWText = False; type {-- TMMCustomGauge --------------------------------------------------} TMMCustomGauge = class(TMMGraphicControl) public constructor Create(AOwner: TComponent); override; procedure AddProgress(Value: Longint); property PercentDone: Longint read GetPercentDone; protected property Width default defWidth; property Height default defHeight; property Kind: TMMGaugeKind read FKind write SetGaugeKind default defKind; property ShowText: Boolean read FShowText write SetShowText default defShowText; property ForeColor: TColor read FForeColor write SetForeColor default defForeColor; property BackColor: TColor read FBackColor write SetBackColor default defBackColor; property MinValue: Longint read FMinValue write SetMinValue default defMinValue; property MaxValue: Longint read FMaxValue write SetMaxValue default defMaxValue; property Progress: Longint read FCurValue write SetProgress default defProgress; property Caption: string read FCaption write SetCaption; property BWText: Boolean read FBWText write SetBWText default defBWText; end; {-- TMMGauge --------------------------------------------------------} TMMGauge = class(TMMCustomGauge) published property Kind; property ShowText; property ForeColor; property BackColor; property MinValue; property MaxValue; property Progress; property Caption; property BWText; property Align; property Enabled; property Font; property Bevel; property ParentFont; property ParentShowHint; property PopupMenu; property ShowHint; property Visible; end; implementation