home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / Essentials / SETUP.EXE / %MAINDIR% / EsGrad.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-28  |  3.3 KB  |  100 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'EsGrad.pas' rev: 3.00
  6.  
  7. #ifndef EsGradHPP
  8. #define EsGradHPP
  9. #include <EsData.hpp>
  10. #include <EsConst.hpp>
  11. #include <Messages.hpp>
  12. #include <Graphics.hpp>
  13. #include <Controls.hpp>
  14. #include <Classes.hpp>
  15. #include <Windows.hpp>
  16. #include <SysInit.hpp>
  17. #include <System.hpp>
  18.  
  19. //-- user supplied -----------------------------------------------------------
  20.  
  21. namespace Esgrad
  22. {
  23. //-- type declarations -------------------------------------------------------
  24. enum TGradDirection { dHorizontal, dVertical };
  25.  
  26. typedef Word TEsColorBand;
  27.  
  28. class DELPHICLASS TEsCustomGradient;
  29. class PASCALIMPLEMENTATION TEsCustomGradient : public Controls::TGraphicControl 
  30. {
  31.     typedef Controls::TGraphicControl inherited;
  32.     
  33. protected:
  34.     Graphics::TColor FFromColor;
  35.     Graphics::TColor FToColor;
  36.     TGradDirection FDirection;
  37.     TEsColorBand FColorBands;
  38.     int gGradColors[256];
  39.     HPALETTE gPalette;
  40.     System::AnsiString __fastcall GetVersion();
  41.     void __fastcall SetColorBands(TEsColorBand Value);
  42.     void __fastcall SetDirection(TGradDirection Value);
  43.     void __fastcall SetFromColor(Graphics::TColor Value);
  44.     void __fastcall SetToColor(Graphics::TColor Value);
  45.     void __fastcall SetVersion(const System::AnsiString Value);
  46.     void __fastcall gCalculateColors(void);
  47.     void __fastcall gFillRectGradient(HDC DC, const Windows::TRect &R);
  48.     MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Msg);
  49.     DYNAMIC bool __fastcall PaletteChanged(bool Foreground);
  50.     virtual void __fastcall Paint(void);
  51.     __property TEsColorBand ColorBands = {read=FColorBands, write=SetColorBands, default=128};
  52.     __property TGradDirection Direction = {read=FDirection, write=SetDirection, default=0};
  53.     __property Graphics::TColor FromColor = {read=FFromColor, write=SetFromColor, default=255};
  54.     __property Graphics::TColor ToColor = {read=FToColor, write=SetToColor, default=65535};
  55.     __property System::AnsiString Version = {read=GetVersion, write=SetVersion, stored=false};
  56.     
  57. public:
  58.     __fastcall virtual TEsCustomGradient(Classes::TComponent* AComponent);
  59.     __fastcall virtual ~TEsCustomGradient(void);
  60.     void __fastcall PaintTo(int DC, const Windows::TRect &R);
  61. };
  62.  
  63. class DELPHICLASS TEsGradient;
  64. class PASCALIMPLEMENTATION TEsGradient : public Esgrad::TEsCustomGradient 
  65. {
  66.     typedef Esgrad::TEsCustomGradient inherited;
  67.     
  68. __published:
  69.     __property Align ;
  70.     __property ColorBands ;
  71.     __property Direction ;
  72.     __property FromColor ;
  73.     __property ToColor ;
  74.     __property Version ;
  75.     __property OnClick ;
  76.     __property OnDblClick ;
  77.     __property OnDragDrop ;
  78.     __property OnDragOver ;
  79.     __property OnMouseDown ;
  80.     __property OnMouseMove ;
  81.     __property OnMouseUp ;
  82.     __property OnStartDrag ;
  83. public:
  84.     /* TEsCustomGradient.Create */ __fastcall virtual TEsGradient(Classes::TComponent* AComponent) : Esgrad::
  85.         TEsCustomGradient(AComponent) { }
  86.     /* TEsCustomGradient.Destroy */ __fastcall virtual ~TEsGradient(void) { }
  87.     
  88. };
  89.  
  90. //-- var, const, procedure ---------------------------------------------------
  91. #define MinColorBands (Byte)(2)
  92. #define MaxColorBands (Word)(256)
  93.  
  94. }    /* namespace Esgrad */
  95. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  96. using namespace Esgrad;
  97. #endif
  98. //-- end unit ----------------------------------------------------------------
  99. #endif    // EsGrad
  100.