{========================================================================} {= (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 MMWheel; {$I COMPILER.INC} interface uses {$IFDEF WIN32} Windows, {$ELSE} WinTypes, WinProcs, {$ENDIF} Messages, Classes, SysUtils, Controls, ExtCtrls, Graphics, Menus, MMObj, MMScale; type EMMWheelError = class(Exception); TMMFocusAction = (faHandleColor,faFrameRect,faAll); TMMHandleStyle = (hsEllipse,hsOwnerDraw); TMMDrawHandleEvent = procedure(Sender : TObject; Canvas : TCanvas; Rect : TRect; Origin : TPoint; Focused : Boolean) of object; const defMinValue = 0; defMaxValue = 10; defValue = 0; defStartAngle = 225; defEndAngle = 315; defWidth = 100; defHeight = 100; defAutoSize = True; defHandleColor = clMaroon; defFocusedColor = clRed; defUpDown = False; defScrollSize = 160; defLineStep = 1; defPageStep = 2; defFocusAction = faAll; defHandleStyle = hsEllipse; defRadius = 0; defHandleSize = 4; defHandleMargin = 4; defFrameSpace = 4; defScaleMargin = 3; type {-- TMMCustomWheel ---------------------------------------------------} TMMCustomWheel = class(TMMCustomControl) public constructor Create(AOwner : TComponent); override; destructor Destroy; override; protected property TabStop default True; property AutoSize : Boolean read FAutoSize write SetAutoSize; property BackBmp : TBitmap read FBackBmp write SetBackBmp; property MinValue : Integer read FMinValue write SetMinValue default defMinValue; property MaxValue : Integer read FMaxValue write SetMaxValue default defMaxValue; property Value : Integer read FValue write SetValue default defValue; property StartAngle : Integer read FStartAngle write SetStartAngle default defStartAngle; property EndAngle : Integer read FEndAngle write SetEndAngle default defEndAngle; property HandleColor : TColor read FHandleColor write SetHandleColor default defHandleColor; property FocusedColor: TColor read FFocusedColor write SetFocusedColor default defFocusedColor; property UpDown : Boolean read FUpDown write FUpDown default defUpDown; property ScrollSize : Integer index 0 read FScrollSize write SetScrollParam default defScrollSize; property LineStep : Integer index 1 read FLineStep write SetScrollParam default defLineStep; property PageStep : Integer index 2 read FPageStep write SetScrollParam default defPageStep; property FocusAction : TMMFocusAction read FFocusAction write SetFocusAction default defFocusAction; property Scale : TMMScale read FScale write SetScale; property Radius : Integer read GetRadius write SetRadius default defRadius; property HandleStyle : TMMHandleStyle read FHandleStyle write SetHandleStyle default defHandleStyle; property HandleSize : Integer read FHandleSize write SetHandleSize default defHandleSize; property HandleMargin: Integer read FHandleMargin write SetHandleMargin default defHandleMargin; property FrameSpace : Integer read FFrameSpace write SetFrameSpace default defFrameSpace; property ScaleMargin : Integer read FScaleMargin write SetScaleMargin default defScaleMargin; property OnChange : TNotifyEvent read FOnChange write FOnChange; property OnDrawHandle: TMMDrawHandleEvent read FOnDrawHandle write FOnDrawHandle; end; {-- TMMWheel ---------------------------------------------------------} TMMWheel = class(TMMCustomWheel) published property OnEnter; property OnExit; property OnKeyDown; property OnKeyPress; property OnKeyUp; property OnChange; property OnDrawHandle; property Bevel; property Visible; property Color; property Enabled; property ParentShowHint; property PopupMenu; property ShowHint; property TabStop; property TabOrder; property Width; property Height; property AutoSize; property BackBmp; property MinValue; property MaxValue; property Value; property StartAngle; property EndAngle; property HandleColor; property FocusedColor; property UpDown; property ScrollSize; property LineStep; property PageStep; property FocusAction; property Scale; property Radius; property HandleStyle; property HandleSize; property HandleMargin; property FrameSpace; property ScaleMargin; end; {=========================================================================} implementation