home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / ctrlkit.zip / CTRL3D.INT < prev    next >
Text File  |  1995-09-16  |  3KB  |  97 lines

  1. unit Ctrl3D;
  2.  
  3. interface
  4.  
  5. uses
  6.   Classes, Controls, Forms, Graphics, Menus, Messages, StdCtrls, SysUtils,
  7.   WinTypes, WinProcs, ColorBtn;
  8.  
  9. type
  10.   T3dStyle = (tsNone, tsRaised, tsRecessed, tsShadowed);
  11.   TShadowOffset = 1..10;
  12.  
  13. type
  14.   TLabel3D = class(TCustomLabel)
  15.   private
  16.     F3dStyle     : T3dStyle;
  17.     FOffset      : TShadowOffset;
  18.     FShadowColor : TColor;
  19.     FHiliteColor : TColor;
  20.  
  21.     function  GetOffset: Integer;
  22.     procedure SetStyle(AStyle : T3dStyle);
  23.     procedure SetOffset(AValue : TShadowOffset);
  24.     procedure SetShadowColor(AColor : TColor);
  25.     procedure SetHiliteColor(AColor : TColor);
  26.  
  27.   protected
  28.     procedure Paint; override;
  29.  
  30.   public
  31.     constructor Create(AOwner : TComponent); override;
  32.  
  33.   published
  34.     property Align;
  35.     property Alignment;
  36.     property AutoSize;
  37.     property Caption;
  38.     property Color;
  39.     property DragCursor;
  40.     property DragMode;
  41.     property Enabled;
  42.     property FocusControl;
  43.     property Font;
  44.     property ParentColor;
  45.     property ParentFont;
  46.     property ParentShowHint;
  47.     property PopupMenu;
  48.     property ShowAccelChar;
  49.     property ShowHint;
  50.     {property Transparent;}
  51.     property Visible;
  52.     property WordWrap;
  53.     property OnClick;
  54.     property OnDblClick;
  55.     property OnDragDrop;
  56.     property OnDragOver;
  57.     property OnEndDrag;
  58.     property OnMouseDown;
  59.     property OnMouseMove;
  60.     property OnMouseUp;
  61.  
  62.     property TextStyle : T3dStyle read F3dStyle write SetStyle default tsRecessed;
  63.     property ShadowOffset : TShadowOffset read FOffset write SetOffset default 1;
  64.     property ColorShadow : TColor read FShadowColor write SetShadowColor default clBtnShadow;
  65.     property ColorHighlight : TColor read FHiliteColor write SetHiliteColor default clBtnHighlight;
  66.   end;
  67.  
  68.  
  69.   TButton3D = class(TColoredButton)
  70.   private
  71.     F3dStyle     : T3dStyle;
  72.     FOffset      : TShadowOffset;
  73.     FShadowColor : TColor;
  74.     FHiliteColor : TColor;
  75.  
  76.     function  GetOffset: Integer;
  77.     procedure SetStyle(AStyle : T3dStyle);
  78.     procedure SetOffset(AValue : TShadowOffset);
  79.     procedure SetShadowColor(AColor : TColor);
  80.     procedure SetHiliteColor(AColor : TColor);
  81.  
  82.   protected
  83.     function  DrawCaption(const ARect : TRect): TRect; override;
  84.  
  85.   public
  86.     constructor Create(AOwner : TComponent); override;
  87.  
  88.   published
  89.     property TextStyle : T3dStyle read F3dStyle write SetStyle default tsRecessed;
  90.     property ShadowOffset : TShadowOffset read FOffset write SetOffset default 1;
  91.     property ColorShadow : TColor read FShadowColor write SetShadowColor default clBtnShadow;
  92.     property ColorHighlight : TColor read FHiliteColor write SetHiliteColor default clBtnHighlight;
  93.   end;
  94.  
  95.  
  96. implementation
  97. end.