home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 May / Chip_2002-05_cd1.bin / chplus / cpp / 5 / Komponety.exe / pies.h < prev    next >
C/C++ Source or Header  |  1998-02-09  |  2KB  |  70 lines

  1. //---------------------------------------------------------------------------
  2. // Borland C++Builder
  3. // Copyright (c) 1987, 1998 Borland International Inc.  All Rights Reserved.
  4. //---------------------------------------------------------------------------
  5. #ifndef PiesHPP
  6. #define PiesHPP
  7. //----------------------------------------------------------------------------
  8. #include <StdCtrls.hpp>
  9. #include <Graphics.hpp>
  10. #include <Forms.hpp>
  11. #include <Controls.hpp>
  12. #include <Classes.hpp>
  13. #include <System.hpp>
  14. #include <math.h>
  15. //-- type declarations -------------------------------------------------------
  16. class  PACKAGE TAngles : public TPersistent
  17. {
  18. private:
  19.     int FStartAngle;
  20.     int FEndAngle;
  21.     TNotifyEvent FOnChange;
  22.     void __fastcall SetStart(int Value);
  23.     void __fastcall SetEnd(int Value);
  24. public:
  25.     void __fastcall Assign(TPersistent* Value);
  26.     void __fastcall Changed(void);
  27.     
  28. __published:
  29.     __property int StartAngle = {read=FStartAngle, write=SetStart, nodefault};
  30.     __property int EndAngle = {read=FEndAngle, write=SetEnd, nodefault};
  31.     __property TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  32. public:
  33.     __fastcall TAngles(void);
  34.     __fastcall virtual ~TAngles(void);
  35. };
  36.  
  37. class  PACKAGE TPie : public TGraphicControl
  38. {
  39. __published:
  40.     TPen* FPen;
  41.     TBrush* FBrush;
  42.     TEdit* FEdit;
  43.     TAngles* FAngles;
  44.     virtual void __fastcall Paint(void);
  45.     void __fastcall SetBrush(TBrush* Value);
  46.     void __fastcall SetPen(TPen* Value);
  47.     void __fastcall SetAngles(TAngles* Value);
  48.     void __fastcall StyleChanged(TObject* Sender);
  49.     __property TAngles* Angles = {read=FAngles, write=SetAngles, nodefault};
  50.     __property TBrush* Brush = {read=FBrush, write=SetBrush, nodefault};
  51.     __property TPen* Pen = {read=FPen, write=SetPen, nodefault};
  52.     __property ShowHint ;
  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. public:
  62.     __fastcall virtual TPie(TComponent* AOwner);
  63.     __fastcall virtual ~TPie(void);
  64. };
  65.  
  66. //-- var, const, procedure ---------------------------------------------------
  67. #define PI 3.1415926535897932385
  68. //-- end unit ----------------------------------------------------------------
  69. #endif    // Pies
  70.