home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 October / Chip_2001-10_cd1.bin / zkuste / delphi / kompon / d123456 / CHEMPLOT.ZIP / TPlot / Axis.hpp < prev    next >
C/C++ Source or Header  |  2001-07-31  |  8KB  |  210 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, atZ };
  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(Plotdefs::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 Plotdefs::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.     bool FAutoZero;
  66.     TAxisType FAxisType;
  67.     TDirection FDirection;
  68.     float FIntercept;
  69.     TAxisLabel* FLabels;
  70.     Classes::TPersistent* FLabelSeries;
  71.     float FLimitLower;
  72.     float FLimitUpper;
  73.     bool FLimitsVisible;
  74.     bool FLogScale;
  75.     float FLogSpan;
  76.     float FMin;
  77.     float FMax;
  78.     Graphics::TPen* FPen;
  79.     float FStepSize;
  80.     float FStepStart;
  81.     float FSpan;
  82.     Byte FTickMinor;
  83.     int FTickSign;
  84.     Byte FTickSize;
  85.     TOrientation FTickDirection;
  86.     Byte FTickNum;
  87.     Titles::TTitle* FTitle;
  88.     float FZoomIntercept;
  89.     float FZoomMin;
  90.     float FZoomMax;
  91.     int PrecisionAdded;
  92.     void __fastcall SetupHorizontalEnvelope(void);
  93.     void __fastcall SetupVerticalEnvelope(void);
  94.     
  95. protected:
  96.     void __fastcall SetArrowSize(Byte Value);
  97.     void __fastcall SetAutoScale(bool Value);
  98.     void __fastcall SetAutoZero(bool Value);
  99.     void __fastcall SetDirection(Plotdefs::TDirection Value);
  100.     void __fastcall SetIntercept(float Value);
  101.     void __fastcall SetLimitLower(float Value);
  102.     void __fastcall SetLimitUpper(float Value);
  103.     void __fastcall SetLimitsVisible(bool Value);
  104.     void __fastcall SetLogScale(bool Value);
  105.     void __fastcall SetMin(float Value);
  106.     void __fastcall SetMax(float Value);
  107.     void __fastcall SetPen(Graphics::TPen* Value);
  108.     void __fastcall SetStepSize(float Value);
  109.     void __fastcall SetStepStart(float Value);
  110.     void __fastcall SetTickMinor(Byte Value);
  111.     void __fastcall SetTickSize(Byte Value);
  112.     void __fastcall SetOrientation(Plotdefs::TOrientation Value);
  113.     virtual void __fastcall StyleChange(System::TObject* Sender);
  114.     virtual void __fastcall TitleChange(System::TObject* Sender);
  115.     
  116. public:
  117.     void __fastcall ReScale(void);
  118.     __property TAxisType AxisType = {read=FAxisType, write=FAxisType, nodefault};
  119.     __property float ZoomIntercept = {read=FZoomIntercept, write=FZoomIntercept};
  120.     __property float ZoomMin = {read=FZoomMin, write=FZoomMin};
  121.     __property float ZoomMax = {read=FZoomMax, write=FZoomMax};
  122.     __fastcall TAxis(Classes::TPersistent* AOwner);
  123.     __fastcall virtual ~TAxis(void);
  124.     virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, int LimitPos);
  125.     float __fastcall GetNextXValue(float XValue);
  126.     System::AnsiString __fastcall LabelToStrF(float Value);
  127.     float __fastcall StrToLabel(System::AnsiString Value);
  128.     int __fastcall FofX(float X);
  129.     int __fastcall FofY(float Y);
  130.     float __fastcall XofF(int F);
  131.     float __fastcall YofF(int F);
  132.     void __fastcall SetLabelSeries(Classes::TPersistent* Value);
  133.     void __fastcall SetMinFromSeries(float Value);
  134.     void __fastcall SetMaxFromSeries(float Value);
  135.     void __fastcall SetMinMaxFromSeries(float AMin, float AMax);
  136.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  137.     
  138. __published:
  139.     __property Byte ArrowSize = {read=FArrowSize, write=SetArrowSize, nodefault};
  140.     __property bool AutoScale = {read=FAutoScale, write=SetAutoScale, default=1};
  141.     __property bool AutoZero = {read=FAutoZero, write=SetAutoZero, nodefault};
  142.     __property Titles::TTitle* Title = {read=FTitle, write=FTitle};
  143.     __property Plotdefs::TDirection Direction = {read=FDirection, write=SetDirection, nodefault};
  144.     __property float Intercept = {read=FIntercept, write=SetIntercept};
  145.     __property TAxisLabel* Labels = {read=FLabels, write=FLabels};
  146.     __property float LimitLower = {read=FLimitLower, write=SetLimitLower};
  147.     __property float LimitUpper = {read=FLimitUpper, write=SetLimitUpper};
  148.     __property bool LimitsVisible = {read=FLimitsVisible, write=SetLimitsVisible, nodefault};
  149.     __property bool LogScale = {read=FLogScale, write=SetLogScale, nodefault};
  150.     __property float Min = {read=FMin, write=SetMin};
  151.     __property float Max = {read=FMax, write=SetMax};
  152.     __property Graphics::TPen* Pen = {read=FPen, write=SetPen};
  153.     __property float StepSize = {read=FStepSize, write=SetStepSize};
  154.     __property float StepStart = {read=FStepStart, write=SetStepStart};
  155.     __property Byte TickMinor = {read=FTickMinor, write=SetTickMinor, nodefault};
  156.     __property Byte TickSize = {read=FTickSize, write=SetTickSize, nodefault};
  157.     __property Plotdefs::TOrientation TickDirection = {read=FTickDirection, write=SetOrientation, nodefault
  158.         };
  159. };
  160.  
  161. class DELPHICLASS TAngleAxis;
  162. class PASCALIMPLEMENTATION TAngleAxis : public Axis::TAxis 
  163. {
  164.     typedef Axis::TAxis inherited;
  165.     
  166. private:
  167.     Word FAngle;
  168.     float FAngleRadians;
  169.     Word FLength;
  170.     float FZInterceptY;
  171.     int FEndX;
  172.     int FEndY;
  173.     Extended FSin;
  174.     Extended FCos;
  175.     Extended FSinM30;
  176.     Extended FCosM30;
  177.     Extended FSinP30;
  178.     Extended FCosP30;
  179.     
  180. protected:
  181.     void __fastcall SetAngle(Word Value);
  182.     void __fastcall SetLength(Word Value);
  183.     void __fastcall SetZInterceptY(float Value);
  184.     
  185. public:
  186.     __property int EndX = {read=FEndX, nodefault};
  187.     __property int EndY = {read=FEndY, nodefault};
  188.     __fastcall TAngleAxis(Classes::TPersistent* AOwner);
  189.     __fastcall virtual ~TAngleAxis(void);
  190.     virtual bool __fastcall ClickedOn(int iX, int iY);
  191.     virtual void __fastcall Outline(Graphics::TCanvas* ACanvas);
  192.     int __fastcall FofZ(float Z);
  193.     tagPOINT __fastcall dFofZ(float Z);
  194.     virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, int LimitPos);
  195.     
  196. __published:
  197.     __property Word Angle = {read=FAngle, write=SetAngle, nodefault};
  198.     __property Word Length = {read=FLength, write=SetLength, nodefault};
  199.     __property float ZInterceptY = {read=FZInterceptY, write=SetZInterceptY};
  200. };
  201.  
  202. //-- var, const, procedure ---------------------------------------------------
  203.  
  204. }    /* namespace Axis */
  205. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  206. using namespace Axis;
  207. #endif
  208. //-- end unit ----------------------------------------------------------------
  209. #endif    // Axis
  210.