| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- {========================================================================}
- {= (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 MMScrlr;
- {$I COMPILER.INC}
- interface
- uses
- {$IFDEF WIN32}
- Windows,
- {$ELSE}
- WinTypes,
- WinProcs,
- {$ENDIF}
- SysUtils,
- Classes,
- Controls,
- Graphics,
- Forms,
- Messages,
- MMSystem,
- MMObj,
- MMUtils,
- MMDIBCv,
- MMTimer;
- type
- TMMEndNotifyEvent = procedure(Sender: TObject; var Reset: Boolean) of object;
- TMMHorizPos = (hpLeftLeft,hpLeftRight,hpCenter,hpRightLeft,hpRightRight,hpUser);
- TMMVertPos = (vpTopTop,vpTopBottom,vpCenter,vpBottomTop,vpBottomBottom,vpUser);
- const
- defAutoSize = True;
- defAlignment = taCenter;
- defAutoScroll = False;
- defScrollSpeed = 100;
- defScrollStepX = 0;
- defScrollStepY = 0;
- defHorizStart = hpCenter;
- defHorizEnd = hpCenter;
- defVertStart = vpCenter;
- defVertEnd = vpCenter;
- defWidth = 100;
- defHeight = 100;
- type
- {-- TMMCustomScroller --------------------------------------------------}
- TMMCustomScroller = class(TMMDIBGraphicControl)
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure UpdateScrollPos;
- procedure ResetScrollPos;
- protected
- property OnBeginX: TNotifyEvent read FOnBeginX write FOnBeginX;
- property OnBeginY: TNotifyEvent read FOnBeginY write FOnBeginY;
- property OnEndX: TMMEndNotifyEvent read FOnEndX write FOnEndX;
- property OnEndY: TMMEndNotifyEvent read FOnEndY write FOnEndY;
- property OnStep: TNotifyEvent read FOnStep write FOnStep;
-
- property TextHeight: integer read FTextHeight;
- property TextWidth: integer read FTextWidth;
- property Width default defWidth;
- property Height default defHeight;
- property AutoSize: Boolean read FAutoSize write SetAutoSize default defAutoSize;
- property Text: TStrings read GetText write SetText;
- property ScrollPosX: Integer index 0 read FScrollPosX write SetScrollPos stored StoreScrollPos;
- property ScrollPosY: Integer index 1 read FScrollPosY write SetScrollPos stored StoreScrollPos;
- property Alignment: TAlignment read FAlignment write SetAlignment default defAlignment;
- property AutoScroll: Boolean read FAutoScroll write SetAutoScroll default defAutoScroll;
- property ScrollSpeed: Integer read FScrollSpeed write SetScrollSpeed default defScrollSpeed;
- property ScrollStepX: Integer index 0 read FScrollStepX write SetScrollStep default defScrollStepX;
- property ScrollStepY: Integer index 1 read FScrollStepY write SetScrollStep default defScrollStepY;
- property StartPosX: Integer index 0 read GetStartPos write SetStartPos stored StoreStartPos;
- property StartPosY: Integer index 1 read GetStartPos write SetStartPos stored StoreStartPos;
- property EndPosX: Integer index 0 read GetEndPos write SetEndPos stored StoreEndPos;
- property EndPosY: Integer index 1 read GetEndPos write SetEndPos stored StoreEndPos;
- property HorizStart: TMMHorizPos read FHorizStart write SetHorizStart default defHorizStart;
- property HorizEnd: TMMHorizPos read FHorizEnd write SetHorizEnd default defHorizEnd;
- property VertStart: TMMVertPos read FVertStart write SetVertStart default defVertStart;
- property VertEnd: TMMVertPos read FVertEnd write SetVertEnd default defVertEnd;
- end;
- {-- TMMScroller --------------------------------------------------------}
- TMMScroller = class(TMMCustomScroller)
- published
- property OnClick;
- property OnDblClick;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property OnBeginX;
- property OnBeginY;
- property OnEndX;
- property OnEndY;
- property OnStep;
- property Bevel;
- property UseBackGroundDIB;
- property BackGroundDIB;
- property PaletteRealize;
- property PaletteMapped;
- property Left;
- property Top;
- property Align;
- property Width;
- property Height;
- property Visible;
- property Enabled;
- property Alignment;
- property Font;
- property ParentFont;
- property AutoSize;
- property Text;
- property Color;
- property ParentColor;
- property ShowHint;
- property ParentShowHint;
- property ScrollPosX;
- property ScrollPosY;
- property TextHeight;
- property TextWidth;
- property AutoScroll;
- property ScrollSpeed;
- property ScrollStepX;
- property ScrollStepY;
- property StartPosX;
- property StartPosY;
- property EndPosX;
- property EndPosY;
- property HorizStart;
- property HorizEnd;
- property VertStart;
- property VertEnd;
- end;
- implementation
|