MMLABEL.INT 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 MMLabel;
  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. StdCtrls,
  41. Forms,
  42. MMObj,
  43. MMUtils,
  44. MMString;
  45. type
  46. TMMLabelDepth = 0..20;
  47. TMMLabelDirection = (ldNone, ldUp, ldUpRight, ldRight, ldDownRight,
  48. ldDown, ldDownLeft, ldLeft, ldUpLeft);
  49. TMMLabelStyle = (lsNone,lsCustom,lsRaised,lsSunken,lsShadow,lsFlying);
  50. { Range for rotation }
  51. TMMAngle = 0..360;
  52. { Options for varying the shadow/highlight for the label }
  53. TMMLabelOption = (loNormal, loExtrude);
  54. type
  55. {-- TMMLabel ----------------------------------------------------------}
  56. TMMLabel = class(TMMGraphicControl)
  57. public
  58. constructor Create(AOwner:TComponent); override;
  59. destructor Destroy; override;
  60. published
  61. property OnClick;
  62. property OnDblClick;
  63. property OnDragDrop;
  64. property OnDragOver;
  65. property OnEndDrag;
  66. property OnMouseDown;
  67. property OnMouseMove;
  68. property OnMouseUp;
  69. property Align;
  70. property Caption;
  71. property Color;
  72. property Cursor;
  73. property DragCursor;
  74. property DragMode;
  75. property Enabled;
  76. property Font;
  77. property ParentColor;
  78. property ParentFont;
  79. property ParentShowHint;
  80. property ShowHint;
  81. property Visible;
  82. property Width default 142;
  83. property Height default 33;
  84. property Bevel;
  85. property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
  86. property Transparent: Boolean read FTransparent write SetTransparent default True;
  87. property Bitmap: TBitmap read FBitmap write SetBitmap;
  88. property DepthHighlight: TMMLabelDepth index 0 read FDepthHighlight write SetDepth default 1;
  89. property DepthShadow: TMMLabelDepth index 1 read FDepthShadow write SetDepth default 1;
  90. property DirectionHighlight: TMMLabelDirection index 0 read FDirectionHighlight write SetDirection default ldUpLeft;
  91. property DirectionShadow: TMMLabelDirection index 1 read FDirectionShadow write SetDirection default ldDownRight;
  92. property ColourHighlight: TColor index 0 read FColorHighlight write SetColor default clWhite;
  93. property ColourShadow: TColor index 1 read FColorShadow write SetColor default clGray;
  94. property StyleHighlight: TMMLabelOption index 0 read FStyleHighlight write SetStyle default loNormal;
  95. property StyleShadow: TMMLabelOption index 1 read FStyleShadow write SetStyle default loNormal;
  96. property EffectStyle: TMMLabelStyle read FEffectStyle write SetEffect default lsRaised;
  97. property AsButton: Boolean read FAsButton write SetAsButton default False;
  98. property Angle: TMMAngle read FAngle write SetAngle default 0;
  99. end;
  100. implementation