MMSCROLL.INT 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMScroll;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinProcs,
  33. WinTypes,
  34. {$ENDIF}
  35. SysUtils,
  36. Messages,
  37. Classes,
  38. Graphics,
  39. Controls,
  40. ExtCtrls,
  41. MMObj,
  42. MMUtils,
  43. MMString,
  44. MMMulDiv;
  45. type
  46. TMMScrollPanelKind = (spHorizontal, spVertical);
  47. TMMScrollShiftKind = (sknone, skleft, skright, skboth, skJump);
  48. TMMScrollChangeEvent = procedure(Sender : TObject; Min, Max : longint) of object;
  49. {-- TMMScrollPanel ----------------------------------------------------}
  50. TMMScrollPanel = class(TMMGraphicControl)
  51. public
  52. constructor Create(AOwner : TComponent); override;
  53. destructor Destroy; override;
  54. procedure Paint; override;
  55. procedure SetSliderAll(Min, Max: Longint);
  56. procedure SetRangeAll(Min, Max: Longint);
  57. published
  58. property OnTrack: TMMScrollChangeEvent read FOnTrack write FOnTrack;
  59. property OnTrackEnd: TMMScrollChangeEvent read FOnTrackEnd write FOnTrackend;
  60. property OnTrackSize: TMMScrollChangeEvent read FOnTrackSize write FOnTrackSize;
  61. property Align;
  62. property Bevel;
  63. property Color;
  64. property Enabled;
  65. property Font;
  66. property ShowHint;
  67. property Visible;
  68. property Width default 100;
  69. property Height default 22;
  70. property Caption;
  71. property ParentFont;
  72. property ParentColor;
  73. property ParentShowHint;
  74. property Kind: TMMScrollPanelKind read FKind write SetKind default spHorizontal;
  75. property RangeMin: Longint read FRangeMin write SetRangeMin default 0;
  76. property RangeMax: Longint read FRangeMax write SetRangeMax default 1000;
  77. property Sizeable: Boolean read FSizeable write FSizeable default True;
  78. property SliderMin: Longint read FSliderMin write SetSliderMin default 200;
  79. property SliderMax: Longint read FSliderMax write SetSliderMax default 500;
  80. property Locator: Longint read FLocator write SetLocator default -1;
  81. property LocatorColor: TColor read FLocColor write SetLocColor default clYellow;
  82. property SliderColor: TColor read FSliderColor write SetSliderColor default clBtnFace;
  83. end;
  84. implementation