MMCTRL.INT 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Fax.: +49 (0)351-8037944 =}
  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: 07.04.98 - 21:08:47 $ =}
  24. {========================================================================}
  25. unit MMCtrl;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinTypes,
  33. WinProcs,
  34. {$ENDIF}
  35. Forms,
  36. SysUtils,
  37. Messages,
  38. Classes,
  39. Graphics,
  40. Controls,
  41. Dialogs,
  42. ExtCtrls,
  43. Menus,
  44. Buttons,
  45. MMObj,
  46. MMUtils,
  47. MMMath,
  48. MMString,
  49. MMBmpLst,
  50. MMObsrv;
  51. type
  52. TMMOrientation = (orVertical,orHorizontal);
  53. TMMGetGylphIndex = procedure(Sender: TObject; IsDown: Boolean; var Index: integer) of object;
  54. {-- TMMBitmapSlider ---------------------------------------------------------}
  55. TMMBitmapSlider = class(TMMCustomBitmapListControl)
  56. public
  57. constructor Create(AOwner: TComponent); override;
  58. destructor Destroy; override;
  59. function ThumbBitmapValid: Boolean;
  60. property ThumbBitmap: TBitmap read GetThumbBitmap;
  61. published
  62. property OnChange: TNotifyEvent read FOnChange write FOnChange;
  63. property OnTrack: TNotifyEvent read FOnTrack write FOnTrack;
  64. property OnTrackEnd: TNotifyEvent read FOnTrackEnd write FOnTrackEnd;
  65. property OnGetGlyphIndex: TMMGetGylphIndex read FOnGetGlyphIndex write FOnGetGlyphIndex;
  66. property OnGetThumbGlyphIndex: TMMGetGylphIndex read FOnGetThumbGlyphIndex write FOnGetThumbGlyphIndex;
  67. property Width default 200;
  68. property Height default 40;
  69. property Visible;
  70. property Enabled;
  71. property ParentShowHint;
  72. property PopupMenu;
  73. property ShowHint;
  74. property TransparentColor;
  75. property TransparentMode;
  76. property BitmapList;
  77. property BitmapIndex;
  78. property BitmapThumbIndex: Integer read FBitmapThumbIndex write SetBitmapThumbIndex default -1;
  79. property Margin: integer read FMargin write SetMargin default 2;
  80. property NumGlyphs: integer read FNumGlyphs write SetNumGlyphs default 1;
  81. property NumThumbGlyphs: integer read FNumThumbGlyphs write SetNumThumbGlyphs default 1;
  82. property AutoSize: Boolean read FAutoSize write SetAutoSize default False;
  83. property HandCursor: Boolean read FHandCursor write FHandCursor default False;
  84. property ThumbCursor: TCursor read FThumbCursor write FThumbCursor default crDefault;
  85. property MinValue: Longint read FMin write SetMin default 0;
  86. property MaxValue: Longint read FMax write SetMax default 10;
  87. property LineSize: Integer read FLineSize write FLineSize default 1;
  88. property PageSize: Integer read FPageSize write FPageSize default 5;
  89. property Orientation: TMMOrientation read FOrientation write SetOrientation default orHorizontal;
  90. property Position: Longint read GetPosition write SetPosition default 0;
  91. property Logarithmic: Boolean read FLogMode write SetLogMode default False;
  92. property Sensitivity: Integer read FSensitivity write SetSensitivity default -24;
  93. end;
  94. implementation