home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 September / Chip_2001-09_cd1.bin / zkuste / delphi / kolekce / d12345 / CHEMPLOT.ZIP / TPlot / Axis.hpp < prev    next >
C/C++ Source or Header  |  2001-06-01  |  7KB  |  192 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) 'Axis.pas' rev: 3.00
  6.  
  7. #ifndef AxisHPP
  8. #define AxisHPP
  9. #include <Titles.hpp>
  10. #include <Plotdefs.hpp>
  11. #include <NoMath.hpp>
  12. #include <Misc.hpp>
  13. #include <Graphics.hpp>
  14. #include <Windows.hpp>
  15. #include <SysUtils.hpp>
  16. #include <Classes.hpp>
  17. #include <SysInit.hpp>
  18. #include <System.hpp>
  19.  
  20. //-- user supplied -----------------------------------------------------------
  21.  
  22. namespace Axis
  23. {
  24. //-- type declarations -------------------------------------------------------
  25. enum TAxisType { atPrimary, atSecondary, atTertiary };
  26.  
  27. enum TLabelFormat { lfGeneral, lfExponent, lfFixed, lfNumber, lfCurrency, lfSI, lfPercent, lfSeconds, 
  28.     lfMinutes, lfHours, lfDays, lfShortTime, lfShortDate };
  29.  
  30. class DELPHICLASS TAxisLabel;
  31. class PASCALIMPLEMENTATION TAxisLabel : public Titles::TCaption 
  32. {
  33.     typedef Titles::TCaption inherited;
  34.     
  35. private:
  36.     TDirection FDirection;
  37.     Byte FDigits;
  38.     Byte FPrecision;
  39.     TLabelFormat FNumberFormat;
  40.     void __fastcall SetDirection(Titles::TDirection Value);
  41.     void __fastcall SetDigits(Byte Value);
  42.     void __fastcall SetPrecision(Byte Value);
  43.     void __fastcall SetNumberFormat(TLabelFormat Value);
  44.     
  45. public:
  46.     __fastcall virtual TAxisLabel(Classes::TPersistent* AOwner);
  47.     __fastcall virtual ~TAxisLabel(void);
  48.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  49.     
  50. __published:
  51.     __property Titles::TDirection Direction = {read=FDirection, write=SetDirection, nodefault};
  52.     __property Byte Digits = {read=FDigits, write=SetDigits, nodefault};
  53.     __property Byte Precision = {read=FPrecision, write=SetPrecision, nodefault};
  54.     __property TLabelFormat NumberFormat = {read=FNumberFormat, write=SetNumberFormat, nodefault};
  55. };
  56.  
  57. class DELPHICLASS TAxis;
  58. class PASCALIMPLEMENTATION TAxis : public Titles::TRectangle 
  59. {
  60.     typedef Titles::TRectangle inherited;
  61.     
  62. private:
  63.     Byte FArrowSize;
  64.     bool FAutoScale;
  65.     TAxisType FAxisType;
  66.     TDirection FDirection;
  67.     float FIntercept;
  68.     TAxisLabel* FLabels;
  69.     Classes::TPersistent* FLabelSeries;
  70.     bool FLogScale;
  71.     float FLogSpan;
  72.     float FMin;
  73.     float FMax;
  74.     Graphics::TPen* FPen;
  75.     float FStepSize;
  76.     float FStepStart;
  77.     float FSpan;
  78.     Byte FTickMinor;
  79.     int FTickSign;
  80.     Byte FTickSize;
  81.     TOrientation FTickDirection;
  82.     Byte FTickNum;
  83.     Titles::TTitle* FTitle;
  84.     float FZoomIntercept;
  85.     float FZoomMin;
  86.     float FZoomMax;
  87.     int PrecisionAdded;
  88.     void __fastcall SetupHorizontalEnvelope(void);
  89.     void __fastcall SetupVerticalEnvelope(int StrWidth);
  90.     
  91. protected:
  92.     void __fastcall SetArrowSize(Byte Value);
  93.     void __fastcall SetAutoScale(bool Value);
  94.     void __fastcall SetDirection(Titles::TDirection Value);
  95.     void __fastcall SetIntercept(float Value);
  96.     void __fastcall SetLogScale(bool Value);
  97.     void __fastcall SetMin(float Value);
  98.     void __fastcall SetMax(float Value);
  99.     void __fastcall SetPen(Graphics::TPen* Value);
  100.     void __fastcall SetStepSize(float Value);
  101.     void __fastcall SetStepStart(float Value);
  102.     void __fastcall SetTickMinor(Byte Value);
  103.     void __fastcall SetTickSize(Byte Value);
  104.     void __fastcall SetOrientation(Titles::TOrientation Value);
  105.     virtual void __fastcall StyleChange(System::TObject* Sender);
  106.     virtual void __fastcall TitleChange(System::TObject* Sender);
  107.     
  108. public:
  109.     void __fastcall ReScale(void);
  110.     __property TAxisType AxisType = {read=FAxisType, write=FAxisType, nodefault};
  111.     __property float ZoomIntercept = {read=FZoomIntercept, write=FZoomIntercept};
  112.     __property float ZoomMin = {read=FZoomMin, write=FZoomMin};
  113.     __property float ZoomMax = {read=FZoomMax, write=FZoomMax};
  114.     __fastcall TAxis(Classes::TPersistent* AOwner);
  115.     __fastcall virtual ~TAxis(void);
  116.     virtual void __fastcall Draw(Graphics::TCanvas* ACanvas);
  117.     float __fastcall GetNextXValue(float XValue);
  118.     System::AnsiString __fastcall LabelToStrF(float Value);
  119.     float __fastcall StrToLabel(System::AnsiString Value);
  120.     int __fastcall FofX(float X);
  121.     int __fastcall FofY(float Y);
  122.     float __fastcall XofF(int F);
  123.     float __fastcall YofF(int F);
  124.     void __fastcall SetLabelSeries(Classes::TPersistent* Value);
  125.     void __fastcall SetMinFromSeries(float Value);
  126.     void __fastcall SetMaxFromSeries(float Value);
  127.     void __fastcall SetMinMaxFromSeries(float AMin, float AMax);
  128.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  129.     
  130. __published:
  131.     __property Byte ArrowSize = {read=FArrowSize, write=SetArrowSize, nodefault};
  132.     __property bool AutoScale = {read=FAutoScale, write=SetAutoScale, default=1};
  133.     __property Titles::TTitle* Title = {read=FTitle, write=FTitle};
  134.     __property Titles::TDirection Direction = {read=FDirection, write=SetDirection, nodefault};
  135.     __property float Intercept = {read=FIntercept, write=SetIntercept};
  136.     __property TAxisLabel* Labels = {read=FLabels, write=FLabels};
  137.     __property bool LogScale = {read=FLogScale, write=SetLogScale, nodefault};
  138.     __property float Min = {read=FMin, write=SetMin};
  139.     __property float Max = {read=FMax, write=SetMax};
  140.     __property Graphics::TPen* Pen = {read=FPen, write=SetPen};
  141.     __property float StepSize = {read=FStepSize, write=SetStepSize};
  142.     __property float StepStart = {read=FStepStart, write=SetStepStart};
  143.     __property Byte TickMinor = {read=FTickMinor, write=SetTickMinor, nodefault};
  144.     __property Byte TickSize = {read=FTickSize, write=SetTickSize, nodefault};
  145.     __property Titles::TOrientation TickDirection = {read=FTickDirection, write=SetOrientation, nodefault
  146.         };
  147. };
  148.  
  149. class DELPHICLASS TAngleAxis;
  150. class PASCALIMPLEMENTATION TAngleAxis : public Axis::TAxis 
  151. {
  152.     typedef Axis::TAxis inherited;
  153.     
  154. private:
  155.     Word FAngle;
  156.     float FAngleRadians;
  157.     Word FLength;
  158.     int FEndX;
  159.     int FEndY;
  160.     Extended FSin;
  161.     Extended FCos;
  162.     Extended FSinM30;
  163.     Extended FCosM30;
  164.     Extended FSinP30;
  165.     Extended FCosP30;
  166.     
  167. protected:
  168.     void __fastcall SetAngle(Word Value);
  169.     void __fastcall SetLength(Word Value);
  170.     
  171. public:
  172.     __fastcall TAngleAxis(Classes::TPersistent* AOwner);
  173.     __fastcall virtual ~TAngleAxis(void);
  174.     virtual bool __fastcall ClickedOn(int iX, int iY);
  175.     HIDESBASE void __fastcall Outline(Graphics::TCanvas* ACanvas);
  176.     tagPOINT __fastcall dFofZ(float Z);
  177.     virtual void __fastcall Draw(Graphics::TCanvas* ACanvas);
  178.     
  179. __published:
  180.     __property Word Angle = {read=FAngle, write=SetAngle, nodefault};
  181.     __property Word Length = {read=FLength, write=SetLength, nodefault};
  182. };
  183.  
  184. //-- var, const, procedure ---------------------------------------------------
  185.  
  186. }    /* namespace Axis */
  187. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  188. using namespace Axis;
  189. #endif
  190. //-- end unit ----------------------------------------------------------------
  191. #endif    // Axis
  192.