home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 October / Chip_2001-10_cd1.bin / zkuste / delphi / kompon / d123456 / CHEMPLOT.ZIP / TPlot / Titles.hpp < prev    next >
C/C++ Source or Header  |  2001-07-31  |  13KB  |  351 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) 'Titles.pas' rev: 3.00
  6.  
  7. #ifndef TitlesHPP
  8. #define TitlesHPP
  9. #include <Plotdefs.hpp>
  10. #include <Misc.hpp>
  11. #include <Graphics.hpp>
  12. #include <Dialogs.hpp>
  13. #include <Controls.hpp>
  14. #include <Windows.hpp>
  15. #include <NoMath.hpp>
  16. #include <SysUtils.hpp>
  17. #include <Classes.hpp>
  18. #include <SysInit.hpp>
  19. #include <System.hpp>
  20.  
  21. //-- user supplied -----------------------------------------------------------
  22.  
  23. namespace Titles
  24. {
  25. //-- type declarations -------------------------------------------------------
  26. class DELPHICLASS TRectangle;
  27. class PASCALIMPLEMENTATION TRectangle : public Classes::TPersistent 
  28. {
  29.     typedef Classes::TPersistent inherited;
  30.     
  31. private:
  32.     TAlignment FAlignment;
  33.     bool FFireEvents;
  34.     int FLeft;
  35.     int FTop;
  36.     int FRight;
  37.     int FBottom;
  38.     System::AnsiString FName;
  39.     Classes::TPersistent* FOwner;
  40.     int FTag;
  41.     bool FVisible;
  42.     
  43. protected:
  44.     Classes::TNotifyEvent FOnChange;
  45.     int __fastcall GetHeight(void);
  46.     int __fastcall GetWidth(void);
  47.     int __fastcall GetMidX(void);
  48.     int __fastcall GetMidY(void);
  49.     virtual void __fastcall SetLeft(int Value);
  50.     virtual void __fastcall SetMidX(int Value);
  51.     virtual void __fastcall SetMidY(int Value);
  52.     virtual void __fastcall SetTop(int Value);
  53.     void __fastcall SetAlignment(Classes::TAlignment Value);
  54.     virtual void __fastcall SetRight(int Value);
  55.     virtual void __fastcall SetBottom(int Value);
  56.     virtual void __fastcall SetVisible(bool Value);
  57.     virtual void __fastcall SetHeight(int Value);
  58.     virtual void __fastcall SetWidth(int Value);
  59.     virtual void __fastcall DoHandleChange(void);
  60.     
  61. public:
  62.     __property Classes::TPersistent* Owner = {read=FOwner};
  63.     __property int Tag = {read=FTag, write=FTag, nodefault};
  64.     __fastcall virtual TRectangle(Classes::TPersistent* AOwner);
  65.     __fastcall virtual ~TRectangle(void);
  66.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  67.     void __fastcall AssignToRect(const Windows::TRect &Dest);
  68.     virtual bool __fastcall ClickedOn(int iX, int iY);
  69.     virtual void __fastcall MoveTo(int iX, int iY);
  70.     virtual void __fastcall MoveBy(int dX, int dY);
  71.     virtual void __fastcall Outline(Graphics::TCanvas* ACanvas);
  72.     
  73. __published:
  74.     __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, nodefault};
  75.     __property bool FireEvents = {read=FFireEvents, write=FFireEvents, nodefault};
  76.     __property System::AnsiString Name = {read=FName, write=FName};
  77.     __property int Left = {read=FLeft, write=SetLeft, nodefault};
  78.     __property int Top = {read=FTop, write=SetTop, nodefault};
  79.     __property int Right = {read=FRight, write=SetRight, nodefault};
  80.     __property int Bottom = {read=FBottom, write=SetBottom, nodefault};
  81.     __property bool Visible = {read=FVisible, write=SetVisible, nodefault};
  82.     __property int Height = {read=GetHeight, write=SetHeight, nodefault};
  83.     __property int Width = {read=GetWidth, write=SetWidth, nodefault};
  84.     __property int MidX = {read=GetMidX, write=SetMidX, nodefault};
  85.     __property int MidY = {read=GetMidY, write=SetMidY, nodefault};
  86.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  87. };
  88.  
  89. class DELPHICLASS TBorder;
  90. class PASCALIMPLEMENTATION TBorder : public Titles::TRectangle 
  91. {
  92.     typedef Titles::TRectangle inherited;
  93.     
  94. private:
  95.     int FRightEx;
  96.     int FBottomEx;
  97.     void __fastcall SetRightEx(int Value);
  98.     void __fastcall SetBottomEx(int Value);
  99.     int __fastcall GetRightGap(void);
  100.     int __fastcall GetBottomGap(void);
  101.     int __fastcall GetHeightEx(void);
  102.     int __fastcall GetWidthEx(void);
  103.     void __fastcall SetRightGap(int Value);
  104.     void __fastcall SetBottomGap(int Value);
  105.     void __fastcall SetHeightEx(int Value);
  106.     void __fastcall SetWidthEx(int Value);
  107.     
  108. protected:
  109.     virtual void __fastcall SetLeft(int Value);
  110.     virtual void __fastcall SetTop(int Value);
  111.     
  112. public:
  113.     __fastcall virtual TBorder(Classes::TPersistent* AOwner);
  114.     
  115. __published:
  116.     __property int RightEx = {read=FRightEx, write=SetRightEx, nodefault};
  117.     __property int BottomEx = {read=FBottomEx, write=SetBottomEx, nodefault};
  118.     __property int RightGap = {read=GetRightGap, write=SetRightGap, nodefault};
  119.     __property int BottomGap = {read=GetBottomGap, write=SetBottomGap, nodefault};
  120.     __property int HeightEx = {read=GetHeightEx, write=SetHeightEx, nodefault};
  121.     __property int WidthEx = {read=GetWidthEx, write=SetWidthEx, nodefault};
  122. public:
  123.     /* TRectangle.Destroy */ __fastcall virtual ~TBorder(void) { }
  124.     
  125. };
  126.  
  127. class DELPHICLASS TAngleRect;
  128. class PASCALIMPLEMENTATION TAngleRect : public Titles::TRectangle 
  129. {
  130.     typedef Titles::TRectangle inherited;
  131.     
  132. private:
  133.     Plotdefs::TDegrees FAngle;
  134.     float FAngleRadians;
  135.     Word FLength;
  136.     Word FBreadth;
  137.     tagPOINT FCentre;
  138.     tagPOINT FOrigin;
  139.     tagPOINT FPolyRect[5];
  140.     Extended FSin;
  141.     Extended FCos;
  142.     Extended FSinM30;
  143.     Extended FCosM30;
  144.     Extended FSinP30;
  145.     Extended FCosP30;
  146.     
  147. protected:
  148.     __property Extended Sin = {read=FSin};
  149.     __property Extended Cos = {read=FCos};
  150.     __property Extended SinM30 = {read=FSinM30};
  151.     __property Extended CosM30 = {read=FCosM30};
  152.     __property Extended SinP30 = {read=FSinP30};
  153.     __property Extended CosP30 = {read=FCosP30};
  154.     void __fastcall DoGeometry(void);
  155.     tagPOINT __fastcall RotatePoint(const tagPOINT &APoint);
  156.     void __fastcall SetAngle(Plotdefs::TDegrees Value);
  157.     void __fastcall SetLength(Word Value);
  158.     void __fastcall SetBreadth(Word Value);
  159.     void __fastcall SetOrigin(const tagPOINT &Value);
  160.     virtual tagPOINT __fastcall GetVector();
  161.     virtual void __fastcall SetLeft(int Value);
  162.     virtual void __fastcall SetTop(int Value);
  163.     virtual void __fastcall SetRight(int Value);
  164.     virtual void __fastcall SetBottom(int Value);
  165.     virtual void __fastcall SetMidX(int Value);
  166.     virtual void __fastcall SetMidY(int Value);
  167.     virtual void __fastcall SetHeight(int Value);
  168.     virtual void __fastcall SetWidth(int Value);
  169.     virtual void __fastcall SetCentre(const tagPOINT &NewCentre);
  170.     virtual void __fastcall SetVector(const tagPOINT &Value);
  171.     
  172. public:
  173.     __property tagPOINT Origin = {read=FOrigin, write=SetOrigin};
  174.     __property tagPOINT Centre = {read=FCentre, write=SetCentre};
  175.     __property tagPOINT Vector = {read=GetVector, write=SetVector};
  176.     __fastcall virtual TAngleRect(Classes::TPersistent* AOwner);
  177.     __fastcall virtual ~TAngleRect(void);
  178.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  179.     virtual bool __fastcall ClickedOn(int iX, int iY);
  180.     virtual void __fastcall MoveTo(int NewX, int NewY);
  181.     virtual void __fastcall MoveBy(int dX, int dY);
  182.     void __fastcall SetNewGeometry(const tagPOINT &NewOrigin, Plotdefs::TDegrees NewAngle, int NewLength
  183.         , int NewBreadth);
  184.     virtual void __fastcall Outline(Graphics::TCanvas* ACanvas);
  185.     
  186. __published:
  187.     __property Plotdefs::TDegrees Angle = {read=FAngle, write=SetAngle, nodefault};
  188.     __property Word Breadth = {read=FBreadth, write=SetBreadth, nodefault};
  189.     __property Word Length = {read=FLength, write=SetLength, nodefault};
  190. };
  191.  
  192. class DELPHICLASS TCaption;
  193. class PASCALIMPLEMENTATION TCaption : public Titles::TRectangle 
  194. {
  195.     typedef Titles::TRectangle inherited;
  196.     
  197. private:
  198.     System::AnsiString FCaption;
  199.     Graphics::TFont* FFont;
  200.     Classes::TNotifyEvent FOnCaptionChange;
  201.     
  202. protected:
  203.     virtual void __fastcall CreateName(void);
  204.     virtual void __fastcall SetCaption(System::AnsiString Value);
  205.     void __fastcall SetFont(Graphics::TFont* Value);
  206.     
  207. public:
  208.     __fastcall virtual TCaption(Classes::TPersistent* AOwner);
  209.     __fastcall virtual ~TCaption(void);
  210.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  211.     
  212. __published:
  213.     __property System::AnsiString Caption = {read=FCaption, write=SetCaption};
  214.     __property Graphics::TFont* Font = {read=FFont, write=SetFont};
  215.     __property Classes::TNotifyEvent OnCaptionChange = {read=FOnCaptionChange, write=FOnCaptionChange};
  216.         
  217. };
  218.  
  219. class DELPHICLASS TTitle;
  220. class PASCALIMPLEMENTATION TTitle : public Titles::TCaption 
  221. {
  222.     typedef Titles::TCaption inherited;
  223.     
  224. private:
  225.     TDirection FDirection;
  226.     TOrientation FOrientation;
  227.     Windows::TRect FEnvelope;
  228.     System::AnsiString FUnits;
  229.     System::AnsiString FFullCaption;
  230.     void __fastcall SetDirection(Plotdefs::TDirection Value);
  231.     void __fastcall SetOrientation(Plotdefs::TOrientation Value);
  232.     void __fastcall SetEnvelope(const Windows::TRect &Value);
  233.     void __fastcall SetUnits(System::AnsiString Value);
  234.     
  235. protected:
  236.     DYNAMIC void __fastcall DoGeometry(Graphics::TCanvas* ACanvas, System::AnsiString TheText);
  237.     virtual void __fastcall SetCaption(System::AnsiString Value);
  238.     
  239. public:
  240.     __property Windows::TRect Envelope = {read=FEnvelope, write=SetEnvelope};
  241.     __property System::AnsiString FullCaption = {read=FFullCaption};
  242.     __fastcall virtual TTitle(Classes::TPersistent* AOwner);
  243.     void __fastcall Draw(Graphics::TCanvas* ACanvas);
  244.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  245.     
  246. __published:
  247.     __property System::AnsiString Units = {read=FUnits, write=SetUnits};
  248.     __property Plotdefs::TDirection Direction = {read=FDirection, write=SetDirection, nodefault};
  249.     __property Plotdefs::TOrientation Orientation = {read=FOrientation, write=SetOrientation, nodefault
  250.         };
  251. public:
  252.     /* TCaption.Destroy */ __fastcall virtual ~TTitle(void) { }
  253.     
  254. };
  255.  
  256. class DELPHICLASS TLegend;
  257. class PASCALIMPLEMENTATION TLegend : public Titles::TRectangle 
  258. {
  259.     typedef Titles::TRectangle inherited;
  260.     
  261. private:
  262.     bool FCheckboxes;
  263.     TDirection FDirection;
  264.     Graphics::TFont* FFont;
  265.     int FFontHeight;
  266.     int FStringWidth;
  267.     int FCheckWidth;
  268.     int FLineWidth;
  269.     Classes::TList* FSeriesList;
  270.     
  271. protected:
  272.     int __fastcall GetItemWidth(void);
  273.     void __fastcall SetCheckboxes(bool Value);
  274.     void __fastcall SetDirection(Plotdefs::TDirection Value);
  275.     void __fastcall SetFont(Graphics::TFont* Value);
  276.     
  277. public:
  278.     __property int FontHeight = {read=FFontHeight, nodefault};
  279.     __property int ItemWidth = {read=GetItemWidth, nodefault};
  280.     __fastcall virtual TLegend(Classes::TPersistent* AOwner, Classes::TList* SeriesList);
  281.     __fastcall virtual ~TLegend(void);
  282.     int __fastcall GetHit(int iX, int iY, Windows::TRect &TheRect);
  283.     void __fastcall Draw(Graphics::TCanvas* ACanvas, int SeriesIncrement);
  284.     
  285. __published:
  286.     __property bool CheckBoxes = {read=FCheckboxes, write=SetCheckboxes, nodefault};
  287.     __property Plotdefs::TDirection Direction = {read=FDirection, write=SetDirection, nodefault};
  288.     __property Graphics::TFont* Font = {read=FFont, write=SetFont};
  289. public:
  290.     /* TRectangle.Create */ __fastcall virtual TLegend(Classes::TPersistent* AOwner) : Titles::TRectangle(
  291.         AOwner) { }
  292.     
  293. };
  294.  
  295. class DELPHICLASS TNote;
  296. class PASCALIMPLEMENTATION TNote : public Titles::TCaption 
  297. {
  298.     typedef Titles::TCaption inherited;
  299.     
  300. private:
  301.     int FArrowLeft;
  302.     int FArrowTop;
  303.     float FArrowLeftReal;
  304.     float FArrowTopReal;
  305.     Classes::TPersistent* FOwner;
  306.     float FLeftReal;
  307.     float FTopReal;
  308.     int ArrowStartLeft;
  309.     int ArrowStartTop;
  310.     
  311. protected:
  312.     virtual void __fastcall SetLeft(int Value);
  313.     virtual void __fastcall SetTop(int Value);
  314.     virtual void __fastcall SetArrowLeft(int Value);
  315.     virtual void __fastcall SetArrowTop(int Value);
  316.     virtual void __fastcall SetArrowLeftReal(float Value);
  317.     virtual void __fastcall SetArrowTopReal(float Value);
  318.     virtual void __fastcall SetLeftReal(float Value);
  319.     virtual void __fastcall SetTopReal(float Value);
  320.     
  321. public:
  322.     __fastcall virtual TNote(Classes::TPersistent* AOwner);
  323.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  324.     void __fastcall Draw(Graphics::TCanvas* ACanvas);
  325.     void __fastcall TracePointerTo(Graphics::TCanvas* ACanvas, int iX, int iY);
  326.     
  327. __published:
  328.     __property int ArrowLeft = {read=FArrowLeft, write=SetArrowLeft, nodefault};
  329.     __property int ArrowTop = {read=FArrowTop, write=SetArrowTop, nodefault};
  330.     __property float ArrowLeftReal = {read=FArrowLeftReal, write=SetArrowLeftReal};
  331.     __property float ArrowTopReal = {read=FArrowTopReal, write=SetArrowTopReal};
  332.     __property float LeftReal = {read=FLeftReal, write=SetLeftReal};
  333.     __property float TopReal = {read=FTopReal, write=SetTopReal};
  334. public:
  335.     /* TCaption.Destroy */ __fastcall virtual ~TNote(void) { }
  336.     
  337. };
  338.  
  339. //-- var, const, procedure ---------------------------------------------------
  340. #define SIN_30  (5.000000E-01)
  341. #define SIN_60  (8.660254E-01)
  342. #define COS_30  (8.660254E-01)
  343. #define COS_60  (5.000000E-01)
  344.  
  345. }    /* namespace Titles */
  346. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  347. using namespace Titles;
  348. #endif
  349. //-- end unit ----------------------------------------------------------------
  350. #endif    // Titles
  351.