MMEGAUGE.INT 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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: 17.03.98 - 18:00:02 $ =}
  24. {========================================================================}
  25. Unit MMEGauge;
  26. {$I COMPILER.INC}
  27. Interface
  28. Uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. {$ELSE}
  32. WinTypes,
  33. WinProcs,
  34. {$ENDIF}
  35. SysUtils,
  36. Messages,
  37. Classes,
  38. Graphics,
  39. Controls,
  40. Forms,
  41. Dialogs,
  42. Menus,
  43. MMUtils,
  44. MMString,
  45. MMObj,
  46. MMMulDiv,
  47. MMDIBCv;
  48. const
  49. VALUERANGE = 100; { Range for SetValue/GetValue, here 0..100% }
  50. type
  51. TMMLEDGaugeKind = (gkHorizontal, gkVertical);
  52. TMMLEDGaugeDirection = (dirNormal, dirReversed);
  53. {-- TMMLEDGauge ---------------------------------------------------------}
  54. TMMLEDGauge = class(TMMDIBGraphicControl)
  55. public
  56. constructor Create(AOwner: TComponent); override;
  57. destructor Destroy; override;
  58. property NumSpots: integer read FNumSpots;
  59. property Point1Spot: integer read FPoint1Spot;
  60. property Point2Spot: integer read FPoint2Spot;
  61. published
  62. property OnClick;
  63. property OnDblClick;
  64. property OnMouseDown;
  65. property OnMouseMove;
  66. property OnMouseUp;
  67. property Align;
  68. property Bevel;
  69. property PopupMenu;
  70. property ParentShowHint;
  71. property ShowHint;
  72. property Visible;
  73. property Enabled;
  74. property ParentColor default False;
  75. property Color default clBlack;
  76. property Kind: TMMLEDGaugeKind read FKind write SetKind default gkHorizontal;
  77. property Height default 17;
  78. property Width default 200;
  79. property SpotSpace: integer read FSpotSpace write SetSpotSpace default 1;
  80. property SpotWidth: integer read FSpotWidth write SetSpotWidth default 1;
  81. property Bar1Color: TColor index 0 read FBar1Color write SetColors default clAqua;
  82. property Bar2Color: TColor index 1 read FBar2Color write SetColors default clAqua;
  83. property Bar3Color: TColor index 2 read FBar3Color write SetColors default clRed;
  84. property Inactive1Color: TColor index 3 read FInact1Color write SetColors default clTeal;
  85. property Inactive2Color: TColor index 4 read FInact2Color write SetColors default clTeal;
  86. property Inactive3Color: TColor index 5 read FInact3Color write SetColors default clMaroon;
  87. property InactiveDoted: Boolean read FInactiveDoted write SetInactiveDoted default False;
  88. property ActiveDoted: Boolean read FActiveDoted write SetActiveDoted default False;
  89. property Point1: integer index 0 Read FPoint1 write SetPoints default 50;
  90. property Point2: integer index 1 Read FPoint2 write SetPoints default 85;
  91. property Direction: TMMLEDGaugeDirection read FDirection write SetDirection default dirNormal;
  92. property Progress: integer read FProgress write SetProgress default 0;
  93. end;
  94. implementation