home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / Vcl / teengine.hpp < prev    next >
C/C++ Source or Header  |  2000-02-01  |  53KB  |  1,236 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'TeEngine.pas' rev: 5.00
  6.  
  7. #ifndef TeEngineHPP
  8. #define TeEngineHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #pragma option push -Vx
  13. #include <ExtCtrls.hpp>    // Pascal unit
  14. #include <Controls.hpp>    // Pascal unit
  15. #include <TeCanvas.hpp>    // Pascal unit
  16. #include <TeeProcs.hpp>    // Pascal unit
  17. #include <Graphics.hpp>    // Pascal unit
  18. #include <Classes.hpp>    // Pascal unit
  19. #include <Windows.hpp>    // Pascal unit
  20. #include <SysUtils.hpp>    // Pascal unit
  21. #include <SysInit.hpp>    // Pascal unit
  22. #include <System.hpp>    // Pascal unit
  23.  
  24. //-- user supplied -----------------------------------------------------------
  25.  
  26. namespace Teengine
  27. {
  28. //-- type declarations -------------------------------------------------------
  29. #pragma option push -b-
  30. enum TSeriesMarksStyle { smsValue, smsPercent, smsLabel, smsLabelPercent, smsLabelValue, smsLegend, 
  31.     smsPercentTotal, smsLabelPercentTotal, smsXValue };
  32. #pragma option pop
  33.  
  34. typedef double *PChartValue;
  35.  
  36. typedef double TChartValue;
  37.  
  38. #pragma option push -b-
  39. enum TChartListOrder { loNone, loAscending, loDescending };
  40. #pragma option pop
  41.  
  42. class DELPHICLASS TChartValueList;
  43. class DELPHICLASS TChartSeries;
  44. class DELPHICLASS TChartAxis;
  45. class DELPHICLASS TCustomChartAxis;
  46. class DELPHICLASS TChartAxisTitle;
  47. class PASCALIMPLEMENTATION TChartAxisTitle : public Teeprocs::TChartFontObject 
  48. {
  49.     typedef Teeprocs::TChartFontObject inherited;
  50.     
  51. private:
  52.     int FAngle;
  53.     TCustomChartAxis* FAxis;
  54.     AnsiString FCaption;
  55.     bool __fastcall IsAngleStored(void);
  56.     void __fastcall SetAngle(int Value);
  57.     void __fastcall SetCaption(const AnsiString Value);
  58.     
  59. public:
  60.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  61.     
  62. __published:
  63.     __property int Angle = {read=FAngle, write=SetAngle, stored=IsAngleStored, nodefault};
  64.     __property AnsiString Caption = {read=FCaption, write=SetCaption};
  65.     __property Font ;
  66. public:
  67.     #pragma option push -w-inl
  68.     /* TChartFontObject.Create */ inline __fastcall TChartAxisTitle(Teeprocs::TCustomTeePanel* AOwner) : 
  69.         Teeprocs::TChartFontObject(AOwner) { }
  70.     #pragma option pop
  71.     #pragma option push -w-inl
  72.     /* TChartFontObject.Destroy */ inline __fastcall virtual ~TChartAxisTitle(void) { }
  73.     #pragma option pop
  74.     
  75. };
  76.  
  77.  
  78. #pragma option push -b-
  79. enum TAxisLabelStyle { talAuto, talNone, talValue, talMark, talText };
  80. #pragma option pop
  81.  
  82. class DELPHICLASS TCustomAxisPanel;
  83. class DELPHICLASS TChartSeriesList;
  84. class PASCALIMPLEMENTATION TChartSeriesList : public Classes::TList 
  85. {
  86.     typedef Classes::TList inherited;
  87.     
  88. private:
  89.     TCustomAxisPanel* FOwner;
  90.     void __fastcall SetSeries(int Index, TChartSeries* Series);
  91.     TChartSeries* __fastcall GetSeries(int Index);
  92.     
  93. public:
  94.     int __fastcall CountActive(void);
  95.     __property TCustomAxisPanel* Owner = {read=FOwner};
  96.     __property TChartSeries* Series[int Index] = {read=GetSeries, write=SetSeries/*, default*/};
  97. public:
  98.         
  99.     #pragma option push -w-inl
  100.     /* TList.Destroy */ inline __fastcall virtual ~TChartSeriesList(void) { }
  101.     #pragma option pop
  102.     
  103. public:
  104.     #pragma option push -w-inl
  105.     /* TObject.Create */ inline __fastcall TChartSeriesList(void) : Classes::TList() { }
  106.     #pragma option pop
  107.     
  108. };
  109.  
  110.  
  111. class DELPHICLASS TChartDepthAxis;
  112. class PASCALIMPLEMENTATION TCustomChartAxis : public Classes::TPersistent 
  113. {
  114.     typedef Classes::TPersistent inherited;
  115.     
  116. private:
  117.     bool FAutomatic;
  118.     bool FAutomaticMaximum;
  119.     bool FAutomaticMinimum;
  120.     double FDesiredIncrement;
  121.     double FMaximumValue;
  122.     double FMinimumValue;
  123.     bool FLogarithmic;
  124.     int FLogarithmicBase;
  125.     Tecanvas::TChartAxisPen* FAxis;
  126.     int FPosAxis;
  127.     TChartAxisTitle* FAxisTitle;
  128.     int FTitleSize;
  129.     int FPosTitle;
  130.     Tecanvas::TDottedGrayPen* FGrid;
  131.     bool FGridCentered;
  132.     bool FLabels;
  133.     int FLabelsAngle;
  134.     Graphics::TFont* FLabelsFont;
  135.     bool FLabelsOnAxis;
  136.     int FLabelsSeparation;
  137.     int FLabelsSize;
  138.     TAxisLabelStyle FLabelStyle;
  139.     int FPosLabels;
  140.     AnsiString FAxisValuesFormat;
  141.     AnsiString FDateTimeFormat;
  142.     bool FExactDateTime;
  143.     bool FRoundFirstLabel;
  144.     bool FLabelsMultiLine;
  145.     Tecanvas::TChartHiddenPen* FMinorGrid;
  146.     int FMinorTickCount;
  147.     int FMinorTickLength;
  148.     Tecanvas::TDarkGrayPen* FMinorTicks;
  149.     Tecanvas::TDarkGrayPen* FTicks;
  150.     Tecanvas::TDarkGrayPen* FTicksInner;
  151.     int FTickInnerLength;
  152.     int FTickLength;
  153.     bool FTickOnLabelsOnly;
  154.     bool FInverted;
  155.     bool FHorizontal;
  156.     bool FOtherSide;
  157.     TCustomAxisPanel* FParentChart;
  158.     bool FVisible;
  159.     double FStartPosition;
  160.     double FEndPosition;
  161.     double FPositionPercent;
  162.     double IMaximum;
  163.     double IMinimum;
  164.     double IRange;
  165.     bool IAxisDateTime;
  166.     int ICenterPos;
  167.     int IDefaultTitleAngle;
  168.     void __fastcall SetAutomatic(bool Value);
  169.     void __fastcall SetAutomaticMinimum(bool Value);
  170.     void __fastcall SetAutomaticMaximum(bool Value);
  171.     void __fastcall SetAxis(Tecanvas::TChartAxisPen* Value);
  172.     void __fastcall SetAxisTitle(TChartAxisTitle* Value);
  173.     void __fastcall SetDateTimeFormat(const AnsiString Value);
  174.     void __fastcall SetDesiredIncrement(const double Value);
  175.     void __fastcall SetExactDateTime(bool Value);
  176.     void __fastcall SetGrid(Tecanvas::TDottedGrayPen* Value);
  177.     void __fastcall SetGridCentered(bool Value);
  178.     void __fastcall SetInverted(bool Value);
  179.     void __fastcall SetLabels(bool Value);
  180.     void __fastcall SetLabelsFont(Graphics::TFont* Value);
  181.     void __fastcall SetLabelStyle(TAxisLabelStyle Value);
  182.     void __fastcall SetLabelsOnAxis(bool Value);
  183.     void __fastcall SetLabelsAngle(int Value);
  184.     void __fastcall SetLabelsMultiLine(bool Value);
  185.     void __fastcall SetLabelsSeparation(int Value);
  186.     void __fastcall SetLabelsSize(int Value);
  187.     void __fastcall SetLogarithmic(bool Value);
  188.     void __fastcall SetLogarithmicBase(int Value);
  189.     void __fastcall SetMaximum(const double Value);
  190.     void __fastcall SetMinimum(const double Value);
  191.     void __fastcall SetMinorGrid(Tecanvas::TChartHiddenPen* Value);
  192.     void __fastcall SetMinorTickCount(int Value);
  193.     void __fastcall SetMinorTickLength(int Value);
  194.     void __fastcall SetMinorTicks(Tecanvas::TDarkGrayPen* Value);
  195.     void __fastcall SetStartPosition(const double Value);
  196.     void __fastcall SetEndPosition(const double Value);
  197.     void __fastcall SetPositionPercent(const double Value);
  198.     void __fastcall SetRoundFirstLabel(bool Value);
  199.     void __fastcall SetTickLength(int Value);
  200.     void __fastcall SetTickInnerLength(int Value);
  201.     void __fastcall SetTicks(Tecanvas::TDarkGrayPen* Value);
  202.     void __fastcall SetTicksInner(Tecanvas::TDarkGrayPen* Value);
  203.     void __fastcall SetTickOnLabelsOnly(bool Value);
  204.     void __fastcall SetTitleSize(int Value);
  205.     void __fastcall SetValuesFormat(const AnsiString Value);
  206.     void __fastcall SetVisible(bool Value);
  207.     int __fastcall ApplyPosition(int APos, const Windows::TRect &R);
  208.     double __fastcall CalcDateTimeIncrement(int MaxNumLabels);
  209.     double __fastcall CalcLabelsIncrement(int MaxNumLabels);
  210.     int __fastcall GetRectangleEdge(const Windows::TRect &R);
  211.     int __fastcall InternalCalcLogPosValue(bool IsX, const double Value);
  212.     int __fastcall InternalCalcDepthPosValue(const double Value);
  213.     double __fastcall InternalCalcLog(double &LogMax, double &LogMin);
  214.     int __fastcall InternalCalcPosValue(const double Value, bool FromEnd);
  215.     bool __fastcall IsAxisValuesFormatStored(void);
  216.     bool __fastcall IsFontStored(void);
  217.     bool __fastcall IsMaxStored(void);
  218.     bool __fastcall IsMinStored(void);
  219.     bool __fastcall IsPosStored(void);
  220.     bool __fastcall IsStartStored(void);
  221.     bool __fastcall IsEndStored(void);
  222.     
  223. public:
  224.     int IStartPos;
  225.     int IEndPos;
  226.     int IAxisSize;
  227.     bool IsDepthAxis;
  228.     void __fastcall InternalCalcPositions(void);
  229.     int __fastcall InternalCalcSize(Graphics::TFont* tmpFont, int tmpAngle, const AnsiString tmpText, int 
  230.         tmpSize);
  231.     void __fastcall InternalSetInverted(bool Value);
  232.     void __fastcall CalcRect(Windows::TRect &R, bool InflateChartRectangle);
  233.     void __fastcall InternalSetMaximum(const double Value);
  234.     void __fastcall InternalSetMinimum(const double Value);
  235.     int __fastcall SizeTickAxis(void);
  236.     int __fastcall SizeTitle(void);
  237.     int __fastcall SizeLabels(void);
  238.     void __fastcall RecalcSizeCenter(void);
  239.     __fastcall TCustomChartAxis(TCustomAxisPanel* AOwner);
  240.     __fastcall virtual ~TCustomChartAxis(void);
  241.     int __fastcall MaxLabelsWidth(void);
  242.     int __fastcall LabelWidth(const double Value);
  243.     int __fastcall LabelHeight(const double Value);
  244.     AnsiString __fastcall LabelValue(const double Value);
  245.     TAxisLabelStyle __fastcall CalcLabelStyle(void);
  246.     void __fastcall DrawTitle(int x, int y);
  247.     void __fastcall DrawAxisLabel(int x, int y, int Angle, const AnsiString St);
  248.     int __fastcall CalcPosValue(const double Value);
  249.     int __fastcall CalcXPosValue(const double Value);
  250.     int __fastcall CalcYPosValue(const double Value);
  251.     int __fastcall CalcSizeValue(const double Value);
  252.     double __fastcall CalcPosPoint(int Value);
  253.     void __fastcall CustomDrawMinMax(int APosLabels, int APosTitle, int APosAxis, bool GridVisible, const 
  254.         double AMinimum, const double AMaximum, const double AIncrement);
  255.     void __fastcall CustomDraw(int APosLabels, int APosTitle, int APosAxis, bool GridVisible);
  256.     void __fastcall CustomDrawStartEnd(int APosLabels, int APosTitle, int APosAxis, bool GridVisible, int 
  257.         AStartPos, int AEndPos);
  258.     void __fastcall CustomDrawMinMaxStartEnd(int APosLabels, int APosTitle, int APosAxis, bool GridVisible
  259.         , const double AMinimum, const double AMaximum, const double AIncrement, int AStartPos, int AEndPos
  260.         );
  261.     void __fastcall Draw(bool CalcPosAxis);
  262.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  263.     void __fastcall AdjustMaxMin(void);
  264.     void __fastcall CalcMinMax(double &AMin, double &AMax);
  265.     void __fastcall Scroll(const double Offset, bool CheckLimits);
  266.     bool __fastcall Clicked(int x, int y);
  267.     bool __fastcall IsDateTime(void);
  268.     void __fastcall SetMinMax(double AMin, double AMax);
  269.     double __fastcall CalcXYIncrement(int MaxLabelSize);
  270.     double __fastcall CalcIncrement(void);
  271.     void __fastcall AdjustMaxMinRect(const Windows::TRect &Rect);
  272.     void __fastcall IncDecDateTime(bool Increment, double &Value, const double AnIncrement, Teeprocs::TDateTimeStep 
  273.         tmpWhichDateTime);
  274.     __property bool Horizontal = {read=FHorizontal, write=FHorizontal, nodefault};
  275.     __property bool OtherSide = {read=FOtherSide, write=FOtherSide, nodefault};
  276.     __property int PosAxis = {read=FPosAxis, nodefault};
  277.     __property int PosLabels = {read=FPosLabels, nodefault};
  278.     __property int PosTitle = {read=FPosTitle, nodefault};
  279.     __property TCustomAxisPanel* ParentChart = {read=FParentChart};
  280.     __property bool Automatic = {read=FAutomatic, write=SetAutomatic, default=1};
  281.     __property bool AutomaticMaximum = {read=FAutomaticMaximum, write=SetAutomaticMaximum, default=1};
  282.     __property bool AutomaticMinimum = {read=FAutomaticMinimum, write=SetAutomaticMinimum, default=1};
  283.     __property Tecanvas::TChartAxisPen* Axis = {read=FAxis, write=SetAxis};
  284.     __property AnsiString AxisValuesFormat = {read=FAxisValuesFormat, write=SetValuesFormat, stored=IsAxisValuesFormatStored
  285.         };
  286.     __property AnsiString DateTimeFormat = {read=FDateTimeFormat, write=SetDateTimeFormat};
  287.     __property bool ExactDateTime = {read=FExactDateTime, write=SetExactDateTime, default=1};
  288.     __property Tecanvas::TDottedGrayPen* Grid = {read=FGrid, write=SetGrid};
  289.     __property bool GridCentered = {read=FGridCentered, write=SetGridCentered, default=0};
  290.     __property double Increment = {read=FDesiredIncrement, write=SetDesiredIncrement};
  291.     __property bool Inverted = {read=FInverted, write=SetInverted, default=0};
  292.     __property bool Labels = {read=FLabels, write=SetLabels, default=1};
  293.     __property int LabelsAngle = {read=FLabelsAngle, write=SetLabelsAngle, default=0};
  294.     __property Graphics::TFont* LabelsFont = {read=FLabelsFont, write=SetLabelsFont, stored=IsFontStored
  295.         };
  296.     __property bool LabelsMultiLine = {read=FLabelsMultiLine, write=SetLabelsMultiLine, default=0};
  297.     __property bool LabelsOnAxis = {read=FLabelsOnAxis, write=SetLabelsOnAxis, default=1};
  298.     __property int LabelsSeparation = {read=FLabelsSeparation, write=SetLabelsSeparation, default=10};
  299.     __property int LabelsSize = {read=FLabelsSize, write=SetLabelsSize, default=0};
  300.     __property TAxisLabelStyle LabelStyle = {read=FLabelStyle, write=SetLabelStyle, default=0};
  301.     __property bool Logarithmic = {read=FLogarithmic, write=SetLogarithmic, default=0};
  302.     __property int LogarithmicBase = {read=FLogarithmicBase, write=SetLogarithmicBase, default=10};
  303.     __property double Maximum = {read=FMaximumValue, write=SetMaximum, stored=IsMaxStored};
  304.     __property double Minimum = {read=FMinimumValue, write=SetMinimum, stored=IsMinStored};
  305.     __property Tecanvas::TChartHiddenPen* MinorGrid = {read=FMinorGrid, write=SetMinorGrid};
  306.     __property int MinorTickCount = {read=FMinorTickCount, write=SetMinorTickCount, default=3};
  307.     __property int MinorTickLength = {read=FMinorTickLength, write=SetMinorTickLength, default=2};
  308.     __property Tecanvas::TDarkGrayPen* MinorTicks = {read=FMinorTicks, write=SetMinorTicks};
  309.     __property double StartPosition = {read=FStartPosition, write=SetStartPosition, stored=IsStartStored
  310.         };
  311.     __property double EndPosition = {read=FEndPosition, write=SetEndPosition, stored=IsEndStored};
  312.     __property double PositionPercent = {read=FPositionPercent, write=SetPositionPercent, stored=IsPosStored
  313.         };
  314.     __property bool RoundFirstLabel = {read=FRoundFirstLabel, write=SetRoundFirstLabel, default=1};
  315.     __property int TickInnerLength = {read=FTickInnerLength, write=SetTickInnerLength, default=0};
  316.     __property int TickLength = {read=FTickLength, write=SetTickLength, default=4};
  317.     __property Tecanvas::TDarkGrayPen* Ticks = {read=FTicks, write=SetTicks};
  318.     __property Tecanvas::TDarkGrayPen* TicksInner = {read=FTicksInner, write=SetTicksInner};
  319.     __property bool TickOnLabelsOnly = {read=FTickOnLabelsOnly, write=SetTickOnLabelsOnly, default=1};
  320.     __property TChartAxisTitle* Title = {read=FAxisTitle, write=SetAxisTitle};
  321.     __property int TitleSize = {read=FTitleSize, write=SetTitleSize, default=0};
  322.     __property bool Visible = {read=FVisible, write=SetVisible, default=1};
  323. };
  324.  
  325.  
  326. class PASCALIMPLEMENTATION TChartDepthAxis : public TCustomChartAxis 
  327. {
  328.     typedef TCustomChartAxis inherited;
  329.     
  330. __published:
  331.     __property Automatic ;
  332.     __property AutomaticMaximum ;
  333.     __property AutomaticMinimum ;
  334.     __property Axis ;
  335.     __property AxisValuesFormat ;
  336.     __property DateTimeFormat ;
  337.     __property ExactDateTime ;
  338.     __property Grid ;
  339.     __property Increment ;
  340.     __property Inverted ;
  341.     __property Labels ;
  342.     __property LabelsAngle ;
  343.     __property LabelsFont ;
  344.     __property LabelsMultiLine ;
  345.     __property LabelsOnAxis ;
  346.     __property LabelsSeparation ;
  347.     __property LabelsSize ;
  348.     __property LabelStyle ;
  349.     __property Logarithmic ;
  350.     __property LogarithmicBase ;
  351.     __property Maximum ;
  352.     __property Minimum ;
  353.     __property MinorGrid ;
  354.     __property MinorTickCount ;
  355.     __property MinorTickLength ;
  356.     __property MinorTicks ;
  357.     __property RoundFirstLabel ;
  358.     __property TickInnerLength ;
  359.     __property TickLength ;
  360.     __property TickOnLabelsOnly ;
  361.     __property Ticks ;
  362.     __property TicksInner ;
  363.     __property Title ;
  364.     __property TitleSize ;
  365.     __property Visible ;
  366. public:
  367.     #pragma option push -w-inl
  368.     /* TCustomChartAxis.Create */ inline __fastcall TChartDepthAxis(TCustomAxisPanel* AOwner) : TCustomChartAxis(
  369.         AOwner) { }
  370.     #pragma option pop
  371.     #pragma option push -w-inl
  372.     /* TCustomChartAxis.Destroy */ inline __fastcall virtual ~TChartDepthAxis(void) { }
  373.     #pragma option pop
  374.     
  375. };
  376.  
  377.  
  378. typedef void __fastcall (__closure *TAxisOnGetLabel)(TChartAxis* Sender, TChartSeries* Series, int ValueIndex
  379.     , AnsiString &LabelText);
  380.  
  381. typedef void __fastcall (__closure *TAxisOnGetNextLabel)(TChartAxis* Sender, int LabelIndex, double 
  382.     &LabelValue, bool &Stop);
  383.  
  384. class PASCALIMPLEMENTATION TCustomAxisPanel : public Teeprocs::TCustomTeePanelExtended 
  385. {
  386.     typedef Teeprocs::TCustomTeePanelExtended inherited;
  387.     
  388. private:
  389.     TChartSeriesList* FSeriesList;
  390.     TChartDepthAxis* FDepthAxis;
  391.     TChartAxis* FTopAxis;
  392.     TChartAxis* FBottomAxis;
  393.     TChartAxis* FLeftAxis;
  394.     TChartAxis* FRightAxis;
  395.     bool FView3DWalls;
  396.     bool FClipPoints;
  397.     bool FAxisVisible;
  398.     TAxisOnGetLabel FOnGetAxisLabel;
  399.     TAxisOnGetNextLabel FOnGetNextAxisLabel;
  400.     Classes::TNotifyEvent FOnPageChange;
  401.     Classes::TNotifyEvent FOnBeforeDrawAxes;
  402.     Classes::TNotifyEvent FOnBeforeDrawSeries;
  403.     int FPage;
  404.     int FMaxPointsPerPage;
  405.     bool FScaleLastPage;
  406.     int FMaxZOrder;
  407.     int FSeriesWidth3D;
  408.     int FSeriesHeight3D;
  409.     void __fastcall CheckOtherSeries(TChartSeries* Dest, TChartSeries* Source);
  410.     TChartSeries* __fastcall GetSeries(int Index);
  411.     void __fastcall InternalAddSeries(TChartSeries* ASeries);
  412.     double __fastcall InternalMinMax(TCustomChartAxis* AAxis, bool IsMin, bool IsX);
  413.     bool __fastcall NoActiveSeries(TCustomChartAxis* AAxis);
  414.     void __fastcall SetAxisVisible(bool Value);
  415.     void __fastcall SetBottomAxis(TChartAxis* Value);
  416.     void __fastcall SetClipPoints(bool Value);
  417.     void __fastcall SetDepthAxis(TChartDepthAxis* Value);
  418.     void __fastcall SetLeftAxis(TChartAxis* Value);
  419.     void __fastcall SetMaxPointsPerPage(int Value);
  420.     void __fastcall SetRightAxis(TChartAxis* Value);
  421.     void __fastcall SetScaleLastPage(bool Value);
  422.     void __fastcall SetTopAxis(TChartAxis* Value);
  423.     void __fastcall SetView3DWalls(bool Value);
  424.     
  425. protected:
  426.     Classes::TList* FAxes;
  427.     virtual void __fastcall CalcAxisRect(void) = 0 ;
  428.     virtual void __fastcall CalcSeriesRect(void) = 0 ;
  429.     virtual int __fastcall CalcWallSize(TCustomChartAxis* Axis) = 0 ;
  430.     virtual void __fastcall DrawTitlesAndLegend(void) = 0 ;
  431.     virtual void __fastcall DrawWalls(void) = 0 ;
  432.     bool __fastcall IsAxisVisible(TCustomChartAxis* Axis);
  433.     DYNAMIC void __fastcall RemovedDataSource(TChartSeries* ASeries, Classes::TComponent* AComponent);
  434.     virtual void __fastcall SetPage(int Value);
  435.     DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
  436.     
  437. public:
  438.     Graphics::TColor LegendColor;
  439.     __fastcall virtual TCustomAxisPanel(Classes::TComponent* AOwner);
  440.     __fastcall virtual ~TCustomAxisPanel(void);
  441.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  442.     TChartSeries* __fastcall ActiveSeriesLegend(int ItemIndex);
  443.     void __fastcall AddSeries(TChartSeries* ASeries);
  444.     void __fastcall CalcSize3DWalls(void);
  445.     virtual void __fastcall CheckDatasource(TChartSeries* ASeries);
  446.     virtual AnsiString __fastcall FormattedValueLegend(TChartSeries* ASeries, int ValueIndex);
  447.     void __fastcall FreeAllSeries(void);
  448.     TChartSeries* __fastcall GetAxisSeries(TCustomChartAxis* Axis);
  449.     Graphics::TColor __fastcall GetFreeSeriesColor(bool CheckBackground);
  450.     int __fastcall GetMaxValuesCount(void);
  451.     virtual void __fastcall InternalDraw(const Windows::TRect &UserRectangle);
  452.     virtual bool __fastcall IsFreeSeriesColor(Graphics::TColor AColor, bool CheckBackground) = 0 ;
  453.     virtual bool __fastcall IsValidDataSource(TChartSeries* ASeries, Classes::TComponent* AComponent);
  454.     double __fastcall MaxXValue(TChartAxis* AAxis);
  455.     double __fastcall MaxYValue(TChartAxis* AAxis);
  456.     double __fastcall MinXValue(TChartAxis* AAxis);
  457.     double __fastcall MinYValue(TChartAxis* AAxis);
  458.     int __fastcall MaxMarkWidth(void);
  459.     int __fastcall MaxTextWidth(void);
  460.     DYNAMIC int __fastcall NumPages(void);
  461.     void __fastcall RemoveSeries(TChartSeries* ASeries);
  462.     __property TChartSeries* Series[int Index] = {read=GetSeries/*, default*/};
  463.     int __fastcall SeriesCount(void);
  464.     AnsiString __fastcall SeriesTitleLegend(int SeriesIndex);
  465.     __property Classes::TList* AxesList = {read=FAxes};
  466.     __property int MaxZOrder = {read=FMaxZOrder, write=FMaxZOrder, nodefault};
  467.     __property int SeriesWidth3D = {read=FSeriesWidth3D, nodefault};
  468.     __property int SeriesHeight3D = {read=FSeriesHeight3D, nodefault};
  469.     __property bool AxisVisible = {read=FAxisVisible, write=SetAxisVisible, default=1};
  470.     __property TChartAxis* BottomAxis = {read=FBottomAxis, write=SetBottomAxis};
  471.     __property bool ClipPoints = {read=FClipPoints, write=SetClipPoints, default=1};
  472.     __property Color ;
  473.     __property TChartDepthAxis* DepthAxis = {read=FDepthAxis, write=SetDepthAxis};
  474.     __property TChartAxis* LeftAxis = {read=FLeftAxis, write=SetLeftAxis};
  475.     __property int MaxPointsPerPage = {read=FMaxPointsPerPage, write=SetMaxPointsPerPage, default=0};
  476.     __property int Page = {read=FPage, write=SetPage, default=1};
  477.     __property TChartAxis* RightAxis = {read=FRightAxis, write=SetRightAxis};
  478.     __property bool ScaleLastPage = {read=FScaleLastPage, write=SetScaleLastPage, default=1};
  479.     __property TChartSeriesList* SeriesList = {read=FSeriesList};
  480.     __property TChartAxis* TopAxis = {read=FTopAxis, write=SetTopAxis};
  481.     __property bool View3DWalls = {read=FView3DWalls, write=SetView3DWalls, default=1};
  482.     __property Classes::TNotifyEvent OnBeforeDrawAxes = {read=FOnBeforeDrawAxes, write=FOnBeforeDrawAxes
  483.         };
  484.     __property Classes::TNotifyEvent OnBeforeDrawSeries = {read=FOnBeforeDrawSeries, write=FOnBeforeDrawSeries
  485.         };
  486.     __property TAxisOnGetLabel OnGetAxisLabel = {read=FOnGetAxisLabel, write=FOnGetAxisLabel};
  487.     __property TAxisOnGetNextLabel OnGetNextAxisLabel = {read=FOnGetNextAxisLabel, write=FOnGetNextAxisLabel
  488.         };
  489.     __property Classes::TNotifyEvent OnPageChange = {read=FOnPageChange, write=FOnPageChange};
  490. public:
  491.     #pragma option push -w-inl
  492.     /* TWinControl.CreateParented */ inline __fastcall TCustomAxisPanel(HWND ParentWindow) : Teeprocs::TCustomTeePanelExtended(
  493.         ParentWindow) { }
  494.     #pragma option pop
  495.     
  496. };
  497.  
  498.  
  499.  
  500. class PASCALIMPLEMENTATION TChartAxis : public TCustomChartAxis 
  501. {
  502.     typedef TCustomChartAxis inherited;
  503.     
  504. __published:
  505.     __property Automatic ;
  506.     __property AutomaticMaximum ;
  507.     __property AutomaticMinimum ;
  508.     __property Axis ;
  509.     __property AxisValuesFormat ;
  510.     __property DateTimeFormat ;
  511.     __property ExactDateTime ;
  512.     __property Grid ;
  513.     __property GridCentered ;
  514.     __property Increment ;
  515.     __property Inverted ;
  516.     __property Labels ;
  517.     __property LabelsAngle ;
  518.     __property LabelsFont ;
  519.     __property LabelsMultiLine ;
  520.     __property LabelsOnAxis ;
  521.     __property LabelsSeparation ;
  522.     __property LabelsSize ;
  523.     __property LabelStyle ;
  524.     __property Logarithmic ;
  525.     __property LogarithmicBase ;
  526.     __property Maximum ;
  527.     __property Minimum ;
  528.     __property MinorGrid ;
  529.     __property MinorTickCount ;
  530.     __property MinorTickLength ;
  531.     __property MinorTicks ;
  532.     __property StartPosition ;
  533.     __property EndPosition ;
  534.     __property PositionPercent ;
  535.     __property RoundFirstLabel ;
  536.     __property TickInnerLength ;
  537.     __property TickLength ;
  538.     __property TickOnLabelsOnly ;
  539.     __property Ticks ;
  540.     __property TicksInner ;
  541.     __property Title ;
  542.     __property TitleSize ;
  543.     __property Visible ;
  544. public:
  545.     #pragma option push -w-inl
  546.     /* TCustomChartAxis.Create */ inline __fastcall TChartAxis(TCustomAxisPanel* AOwner) : TCustomChartAxis(
  547.         AOwner) { }
  548.     #pragma option pop
  549.     #pragma option push -w-inl
  550.     /* TCustomChartAxis.Destroy */ inline __fastcall virtual ~TChartAxis(void) { }
  551.     #pragma option pop
  552.     
  553. };
  554.  
  555.  
  556. class DELPHICLASS TSeriesMarks;
  557. class DELPHICLASS TSeriesMarksPositions;
  558. class DELPHICLASS TSeriesMarkPosition;
  559. class PASCALIMPLEMENTATION TSeriesMarksPositions : public Classes::TList 
  560. {
  561.     typedef Classes::TList inherited;
  562.     
  563. private:
  564.     void __fastcall SetPosition(int Index, TSeriesMarkPosition* APosition);
  565.     TSeriesMarkPosition* __fastcall GetPosition(int Index);
  566.     
  567. public:
  568.     void __fastcall Automatic(int Index);
  569.     __property TSeriesMarkPosition* Position[int Index] = {read=GetPosition, write=SetPosition/*, default
  570.         */};
  571. public:
  572.     #pragma option push -w-inl
  573.     /* TList.Destroy */ inline __fastcall virtual ~TSeriesMarksPositions(void) { }
  574.     #pragma option pop
  575.     
  576. public:
  577.     #pragma option push -w-inl
  578.     /* TObject.Create */ inline __fastcall TSeriesMarksPositions(void) : Classes::TList() { }
  579.     #pragma option pop
  580.     
  581. };
  582.  
  583.  
  584. class PASCALIMPLEMENTATION TSeriesMarks : public Classes::TPersistent 
  585. {
  586.     typedef Classes::TPersistent inherited;
  587.     
  588. private:
  589.     Tecanvas::TChartArrowPen* FArrow;
  590.     int FArrowLength;
  591.     Graphics::TColor FBackColor;
  592.     bool FBackTransparent;
  593.     bool FClip;
  594.     Tecanvas::TChartPen* FFrame;
  595.     Graphics::TFont* FFont;
  596.     TSeriesMarksStyle FMarkerStyle;
  597.     TChartSeries* FParent;
  598.     TSeriesMarksPositions* FPositions;
  599.     bool FVisible;
  600.     int FZPosition;
  601.     void __fastcall SetStyle(TSeriesMarksStyle Value);
  602.     void __fastcall SetFont(Graphics::TFont* Value);
  603.     void __fastcall SetClip(bool Value);
  604.     void __fastcall SetFrame(Tecanvas::TChartPen* Value);
  605.     void __fastcall SetArrow(Tecanvas::TChartArrowPen* Value);
  606.     void __fastcall SetArrowLength(int Value);
  607.     bool __fastcall IsFontStored(void);
  608.     void __fastcall SetVisible(bool Value);
  609.     void __fastcall SetBackColor(Graphics::TColor Value);
  610.     void __fastcall SetBackTransparent(bool Value);
  611.     
  612. protected:
  613.     void __fastcall ClearPositions(void);
  614.     void __fastcall UsePosition(int Index, TSeriesMarkPosition* &MarkPosition);
  615.     
  616. public:
  617.     __fastcall TSeriesMarks(TChartSeries* AOwner);
  618.     __fastcall virtual ~TSeriesMarks(void);
  619.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  620.     int __fastcall Clicked(int X, int Y);
  621.     void __fastcall Draw(int Index, Graphics::TColor AColor, const AnsiString St, TSeriesMarkPosition* 
  622.         APosition);
  623.     __property TChartSeries* ParentSeries = {read=FParent};
  624.     __property TSeriesMarksPositions* Positions = {read=FPositions};
  625.     __property int ZPosition = {read=FZPosition, write=FZPosition, nodefault};
  626.     
  627. __published:
  628.     __property Tecanvas::TChartArrowPen* Arrow = {read=FArrow, write=SetArrow};
  629.     __property int ArrowLength = {read=FArrowLength, write=SetArrowLength, nodefault};
  630.     __property Graphics::TColor BackColor = {read=FBackColor, write=SetBackColor, default=8454143};
  631.     __property bool Clip = {read=FClip, write=SetClip, default=0};
  632.     __property Graphics::TFont* Font = {read=FFont, write=SetFont, stored=IsFontStored};
  633.     __property Tecanvas::TChartPen* Frame = {read=FFrame, write=SetFrame};
  634.     __property TSeriesMarksStyle Style = {read=FMarkerStyle, write=SetStyle, default=2};
  635.     __property bool Transparent = {read=FBackTransparent, write=SetBackTransparent, default=0};
  636.     __property bool Visible = {read=FVisible, write=SetVisible, nodefault};
  637. };
  638.  
  639.  
  640. class DELPHICLASS TChartValueLists;
  641. class PASCALIMPLEMENTATION TChartValueLists : public Classes::TList 
  642. {
  643.     typedef Classes::TList inherited;
  644.     
  645. private:
  646.     TChartValueList* __fastcall GetValueList(int Index);
  647.     
  648. public:
  649.     __property TChartValueList* ValueList[int Index] = {read=GetValueList/*, default*/};
  650. public:
  651.     #pragma option push -w-inl
  652.     /* TList.Destroy */ inline __fastcall virtual ~TChartValueLists(void) { }
  653.     #pragma option pop
  654.     
  655. public:
  656.     #pragma option push -w-inl
  657.     /* TObject.Create */ inline __fastcall TChartValueLists(void) : Classes::TList() { }
  658.     #pragma option pop
  659.     
  660. };
  661.  
  662.  
  663. #pragma option push -b-
  664. enum THorizAxis { aTopAxis, aBottomAxis, aBothHorizAxis, aCustomHorizAxis };
  665. #pragma option pop
  666.  
  667. #pragma option push -b-
  668. enum TVertAxis { aLeftAxis, aRightAxis, aBothVertAxis, aCustomVertAxis };
  669. #pragma option pop
  670.  
  671. #pragma option push -b-
  672. enum TeEngine__21 { rOnDelete, rOnModify, rOnInsert, rOnClear };
  673. #pragma option pop
  674.  
  675. typedef Set<TeEngine__21, rOnDelete, rOnClear>  TSeriesRecalcOptions;
  676.  
  677. class DELPHICLASS TTeeFunction;
  678. #pragma option push -b-
  679. enum TFunctionPeriodStyle { psNumPoints, psRange };
  680. #pragma option pop
  681.  
  682. #pragma option push -b-
  683. enum TFunctionPeriodAlign { paFirst, paCenter, paLast };
  684. #pragma option pop
  685.  
  686. class PASCALIMPLEMENTATION TTeeFunction : public Classes::TComponent 
  687. {
  688.     typedef Classes::TComponent inherited;
  689.     
  690. private:
  691.     double FPeriod;
  692.     TFunctionPeriodStyle FPeriodStyle;
  693.     TFunctionPeriodAlign FPeriodAlign;
  694.     TChartSeries* FParent;
  695.     bool FUpdating;
  696.     void __fastcall SetPeriod(const double Value);
  697.     void __fastcall SetParentSeries(TChartSeries* AParent);
  698.     void __fastcall SetPeriodAlign(TFunctionPeriodAlign Value);
  699.     void __fastcall SetPeriodStyle(TFunctionPeriodStyle Value);
  700.     
  701. protected:
  702.     bool CanUsePeriod;
  703.     DYNAMIC void __fastcall SetParentComponent(Classes::TComponent* Value);
  704.     void __fastcall InternalSetPeriod(const double APeriod);
  705.     void __fastcall AddFunctionXY(bool YMandatorySource, double tmpX, double tmpY);
  706.     virtual void __fastcall CalculatePeriod(TChartSeries* Source, const double tmpX, int FirstIndex, int 
  707.         LastIndex);
  708.     virtual void __fastcall CalculateAllPoints(TChartSeries* Source, TChartValueList* NotMandatorySource
  709.         );
  710.     virtual void __fastcall CalculateByPeriod(TChartSeries* Source, TChartValueList* NotMandatorySource
  711.         );
  712.     TChartValueList* __fastcall ValueList(TChartSeries* ASeries);
  713.     
  714. public:
  715.     bool MovingFunction;
  716.     __fastcall virtual TTeeFunction(Classes::TComponent* AOwner);
  717.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  718.     void __fastcall BeginUpdate(void);
  719.     void __fastcall EndUpdate(void);
  720.     void __fastcall ReCalculate(void);
  721.     virtual double __fastcall Calculate(TChartSeries* Series, int First, int Last);
  722.     virtual double __fastcall CalculateMany(Classes::TList* SeriesList, int ValueIndex);
  723.     virtual void __fastcall AddPoints(TChartSeries* Source);
  724.     DYNAMIC Classes::TComponent* __fastcall GetParentComponent(void);
  725.     DYNAMIC bool __fastcall HasParent(void);
  726.     __property TChartSeries* ParentSeries = {read=FParent, write=SetParentSeries};
  727.     
  728. __published:
  729.     __property double Period = {read=FPeriod, write=SetPeriod};
  730.     __property TFunctionPeriodAlign PeriodAlign = {read=FPeriodAlign, write=SetPeriodAlign, default=1};
  731.         
  732.     __property TFunctionPeriodStyle PeriodStyle = {read=FPeriodStyle, write=SetPeriodStyle, default=0};
  733.         
  734. public:
  735.     #pragma option push -w-inl
  736.     /* TComponent.Destroy */ inline __fastcall virtual ~TTeeFunction(void) { }
  737.     #pragma option pop
  738.     
  739. };
  740.  
  741.  
  742. #pragma option push -b-
  743. enum TeEngine__51 { tssIsTemplate, tssDenyChangeType, tssDenyDelete, tssDenyClone, tssIsPersistent, 
  744.     tssHideDataSource };
  745. #pragma option pop
  746.  
  747. typedef Set<TeEngine__51, tssIsTemplate, tssHideDataSource>  TChartSeriesStyle;
  748.  
  749. typedef void __fastcall (__closure *TSeriesOnAfterAdd)(TChartSeries* Sender, int ValueIndex);
  750.  
  751. typedef bool __fastcall (__closure *TSeriesOnBeforeAdd)(TChartSeries* Sender);
  752.  
  753. typedef void __fastcall (__closure *TSeriesOnClear)(TChartSeries* Sender);
  754.  
  755. typedef void __fastcall (__closure *TSeriesClick)(TChartSeries* Sender, int ValueIndex, Controls::TMouseButton 
  756.     Button, Classes::TShiftState Shift, int X, int Y);
  757.  
  758. typedef void __fastcall (__closure *TSeriesOnGetMarkText)(TChartSeries* Sender, int ValueIndex, AnsiString 
  759.     &MarkText);
  760.  
  761. #pragma option push -b-
  762. enum TValueEvent { veClear, veAdd, veDelete, veRefresh, veModify };
  763. #pragma option pop
  764.  
  765. #pragma option push -b-
  766. enum TLegendTextStyle { ltsPlain, ltsLeftValue, ltsRightValue, ltsLeftPercent, ltsRightPercent, ltsXValue 
  767.     };
  768. #pragma option pop
  769.  
  770. class PASCALIMPLEMENTATION TChartSeries : public Classes::TComponent 
  771. {
  772.     typedef Classes::TComponent inherited;
  773.     
  774. private:
  775.     bool FActive;
  776.     Graphics::TColor FColor;
  777.     bool FColorEachPoint;
  778.     Classes::TList* FColors;
  779.     AnsiString FColorSource;
  780.     Controls::TCursor FCursor;
  781.     Classes::TList* FDataSources;
  782.     int FFirstVisibleIndex;
  783.     TChartAxis* FGetHorizAxis;
  784.     TChartAxis* FGetVertAxis;
  785.     AnsiString FLabelsSource;
  786.     int FLastVisibleIndex;
  787.     Classes::TList* FLinkedSeries;
  788.     TSeriesMarks* FMarks;
  789.     TCustomAxisPanel* FParent;
  790.     AnsiString FPercentFormat;
  791.     bool FShowInLegend;
  792.     Classes::TStringList* FTempDataSources;
  793.     AnsiString FTitle;
  794.     AnsiString FValueFormat;
  795.     TChartValueLists* FValuesList;
  796.     TChartValueList* FX;
  797.     Classes::TList* FXLabels;
  798.     TChartValueList* FY;
  799.     THorizAxis FHorizAxis;
  800.     TChartAxis* FCustomHorizAxis;
  801.     TChartAxis* FCustomVertAxis;
  802.     int FZOrder;
  803.     TVertAxis FVertAxis;
  804.     TSeriesRecalcOptions FRecalcOptions;
  805.     TTeeFunction* FTeeFunction;
  806.     TChartSeriesStyle FStyle;
  807.     Classes::TNotifyEvent FAfterDrawValues;
  808.     Classes::TNotifyEvent FBeforeDrawValues;
  809.     TSeriesOnAfterAdd FOnAfterAdd;
  810.     TSeriesOnBeforeAdd FOnBeforeAdd;
  811.     TSeriesOnClear FOnClearValues;
  812.     TSeriesClick FOnClick;
  813.     TSeriesClick FOnDblClick;
  814.     TSeriesOnGetMarkText FOnGetMarkText;
  815.     AnsiString FIdentifier;
  816.     void __fastcall InsertLabel(int ValueIndex, const AnsiString ALabel);
  817.     char * __fastcall GetMemLabel(const AnsiString ALabel);
  818.     void __fastcall FreeXLabel(int ValueIndex);
  819.     double __fastcall GetValue(bool IsX, int ValueIndex);
  820.     void __fastcall ReadData(Classes::TReader* Reader);
  821.     void __fastcall WriteData(Classes::TWriter* Writer);
  822.     void __fastcall ReadIdentifier(Classes::TReader* Reader);
  823.     void __fastcall WriteIdentifier(Classes::TWriter* Writer);
  824.     void __fastcall ReadStyle(Classes::TReader* Reader);
  825.     void __fastcall WriteStyle(Classes::TWriter* Writer);
  826.     void __fastcall InternalAddDataSource(Classes::TComponent* Value);
  827.     void __fastcall RemoveAllLinkedSeries(void);
  828.     void __fastcall SetTitle(AnsiString Value);
  829.     void __fastcall SetValueFormat(const AnsiString Value);
  830.     void __fastcall SetPercentFormat(const AnsiString Value);
  831.     bool __fastcall IsValueFormatStored(void);
  832.     bool __fastcall IsPercentFormatStored(void);
  833.     void __fastcall SetHorizAxis(THorizAxis Value);
  834.     void __fastcall SetVertAxis(TVertAxis Value);
  835.     void __fastcall SetColorSource(const AnsiString Value);
  836.     void __fastcall SetLabelsSource(const AnsiString Value);
  837.     void __fastcall SetShowInLegend(bool Value);
  838.     void __fastcall SetCustomHorizAxis(TChartAxis* Value);
  839.     void __fastcall SetCustomVertAxis(TChartAxis* Value);
  840.     int __fastcall GetZOrder(void);
  841.     void __fastcall SetZOrder(int Value);
  842.     void __fastcall RecalcGetAxis(void);
  843.     
  844. protected:
  845.     int IZOrder;
  846.     virtual int __fastcall AddChartValue(TChartSeries* Source, int ValueIndex);
  847.     virtual void __fastcall AddedValue(TChartSeries* Source, int ValueIndex);
  848.     virtual void __fastcall AddValues(TChartSeries* Source);
  849.     virtual void __fastcall ClearLists(void);
  850.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  851.     virtual void __fastcall DeletedValue(TChartSeries* Source, int ValueIndex);
  852.     virtual void __fastcall DoAfterDrawValues(void);
  853.     virtual void __fastcall DoBeforeDrawChart(void);
  854.     virtual void __fastcall DoBeforeDrawValues(void);
  855.     virtual void __fastcall DrawAllValues(void);
  856.     virtual void __fastcall DrawMark(int ValueIndex, const AnsiString St, TSeriesMarkPosition* APosition
  857.         );
  858.     void __fastcall DrawMarks(void);
  859.     virtual void __fastcall DrawValue(int ValueIndex);
  860.     bool __fastcall FirstInZOrder(void);
  861.     Classes::TComponent* __fastcall GetDataSource(void);
  862.     AnsiString __fastcall GetMarkText(int ValueIndex);
  863.     virtual Graphics::TColor __fastcall GetValueColor(int ValueIndex);
  864.     virtual AnsiString __fastcall GetXLabel(int Index);
  865.     virtual double __fastcall GetxValue(int Index);
  866.     virtual double __fastcall GetyValue(int Index);
  867.     virtual void __fastcall Loaded(void);
  868.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  869.         );
  870.     virtual void __fastcall NotifyNewValue(TChartSeries* Sender, int ValueIndex);
  871.     void __fastcall NotifyValue(TValueEvent ValueEvent, int ValueIndex);
  872.     virtual bool __fastcall MoreSameZOrder(void);
  873.     virtual void __fastcall SetActive(bool Value);
  874.     void __fastcall SetChartValueList(TChartValueList* &AValueList, TChartValueList* Value);
  875.     virtual void __fastcall SetColorEachPoint(bool Value);
  876.     void __fastcall SetDataSource(Classes::TComponent* Value);
  877.     void __fastcall SetMarks(TSeriesMarks* Value);
  878.     virtual void __fastcall SetParentChart(TCustomAxisPanel* Value);
  879.     void __fastcall SetRecalcOptions(TSeriesRecalcOptions Value);
  880.     virtual void __fastcall SetSeriesColor(Graphics::TColor AColor);
  881.     void __fastcall SetValueColor(int ValueIndex, Graphics::TColor AColor);
  882.     void __fastcall SetXLabel(int Index, const AnsiString AXLabel);
  883.     void __fastcall SetXValue(int Index, const double Value);
  884.     void __fastcall SetYValue(int Index, const double Value);
  885.     void __fastcall SetXValues(TChartValueList* Value);
  886.     void __fastcall SetYValues(TChartValueList* Value);
  887.     DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
  888.     DYNAMIC void __fastcall SetParentComponent(Classes::TComponent* AParent);
  889.     
  890. public:
  891.     bool CalcVisiblePoints;
  892.     bool DrawBetweenPoints;
  893.     bool AllowSinglePoint;
  894.     bool HasZValues;
  895.     int StartZ;
  896.     int MiddleZ;
  897.     int EndZ;
  898.     __fastcall virtual TChartSeries(Classes::TComponent* AOwner);
  899.     __fastcall virtual ~TChartSeries(void);
  900.     virtual int __fastcall Add(const double AValue, const AnsiString ALabel, Graphics::TColor AColor);
  901.     int __fastcall AddArray(const double * Values, const int Values_Size);
  902.     void __fastcall AddLinkedSeries(TChartSeries* ASeries);
  903.     virtual int __fastcall AddNull(const AnsiString ALabel);
  904.     virtual int __fastcall AddNullXY(const double X, const double Y, const AnsiString ALabel);
  905.     int __fastcall AddX(const double AXValue, const AnsiString ALabel, Graphics::TColor AColor);
  906.     virtual int __fastcall AddXY(const double AXValue, const double AYValue, const AnsiString ALabel, Graphics::TColor 
  907.         AColor);
  908.     int __fastcall AddY(const double AYValue, const AnsiString ALabel, Graphics::TColor AColor);
  909.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  910.     virtual bool __fastcall AssociatedToAxis(TCustomChartAxis* Axis);
  911.     void __fastcall CalcRandomBounds(int NumValues, double &tmpX, double &StepX, double &tmpY, double &
  912.         MinY, double &DifY);
  913.     virtual void __fastcall Clear(void);
  914.     int __fastcall Count(void);
  915.     virtual int __fastcall CountLegendItems(void);
  916.     virtual void __fastcall Delete(int ValueIndex);
  917.     virtual void __fastcall FillSampleValues(int NumValues);
  918.     virtual void __fastcall GalleryChanged3D(bool Is3D);
  919.     DYNAMIC Classes::TComponent* __fastcall GetParentComponent(void);
  920.     DYNAMIC bool __fastcall HasParent(void);
  921.     bool __fastcall IsNull(int ValueIndex);
  922.     virtual bool __fastcall IsValidSourceOf(TChartSeries* Value);
  923.     virtual bool __fastcall IsValidSeriesSource(TChartSeries* Value);
  924.     virtual int __fastcall LegendToValueIndex(int LegendIndex);
  925.     virtual Graphics::TColor __fastcall LegendItemColor(int LegendIndex);
  926.     virtual AnsiString __fastcall LegendString(int LegendIndex, TLegendTextStyle LegendTextStyle);
  927.     __property Classes::TList* LinkedSeries = {read=FLinkedSeries};
  928.     virtual double __fastcall MaxXValue(void);
  929.     virtual double __fastcall MaxYValue(void);
  930.     virtual double __fastcall MaxZValue(void);
  931.     virtual double __fastcall MinXValue(void);
  932.     virtual double __fastcall MinYValue(void);
  933.     virtual double __fastcall MinZValue(void);
  934.     virtual int __fastcall NumSampleValues(void);
  935.     virtual void __fastcall PrepareForGallery(bool IsEnabled);
  936.     void __fastcall RemoveDataSource(Classes::TComponent* Value);
  937.     void __fastcall RemoveLinkedSeries(TChartSeries* ASeries);
  938.     void __fastcall Repaint(void);
  939.     int __fastcall VisibleCount(void);
  940.     __property TChartValueLists* ValuesLists = {read=FValuesList};
  941.     __property double XValue[int Index] = {read=GetxValue, write=SetXValue};
  942.     __property double YValue[int Index] = {read=GetyValue, write=SetYValue};
  943.     __property int ZOrder = {read=GetZOrder, write=SetZOrder, default=-1};
  944.     int __fastcall MaxMarkWidth(void);
  945.     virtual AnsiString __fastcall GetEditorClass();
  946.     virtual int __fastcall CalcXPos(int ValueIndex);
  947.     int __fastcall CalcXPosValue(const double Value);
  948.     int __fastcall CalcXSizeValue(const double Value);
  949.     virtual int __fastcall CalcYPos(int ValueIndex);
  950.     int __fastcall CalcYPosValue(const double Value);
  951.     int __fastcall CalcYSizeValue(const double Value);
  952.     int __fastcall CalcPosValue(const double Value);
  953.     double __fastcall XScreenToValue(int ScreenPos);
  954.     double __fastcall YScreenToValue(int ScreenPos);
  955.     AnsiString __fastcall XValueToText(const double AValue);
  956.     AnsiString __fastcall YValueToText(const double AValue);
  957.     void __fastcall ColorRange(TChartValueList* AValueList, const double FromValue, const double ToValue
  958.         , Graphics::TColor AColor);
  959.     void __fastcall CheckDataSource(void);
  960.     virtual void __fastcall AddValue(int ValueIndex);
  961.     __property Classes::TList* Labels = {read=FXLabels};
  962.     __property AnsiString XLabel[int Index] = {read=GetXLabel, write=SetXLabel};
  963.     __property AnsiString ValueMarkText[int Index] = {read=GetMarkText};
  964.     __property Graphics::TColor ValueColor[int Index] = {read=GetValueColor, write=SetValueColor};
  965.     __property TChartValueList* XValues = {read=FX, write=SetXValues};
  966.     __property TChartValueList* YValues = {read=FY, write=SetYValues};
  967.     virtual TChartValueList* __fastcall GetYValueList(AnsiString AListName);
  968.     __property TChartAxis* GetVertAxis = {read=FGetVertAxis};
  969.     __property TChartAxis* GetHorizAxis = {read=FGetHorizAxis};
  970.     AnsiString __fastcall MarkPercent(int ValueIndex, bool AddTotal);
  971.     virtual int __fastcall Clicked(int x, int y);
  972.     void __fastcall RefreshSeries(void);
  973.     __property int FirstValueIndex = {read=FFirstVisibleIndex, nodefault};
  974.     __property int LastValueIndex = {read=FLastVisibleIndex, nodefault};
  975.     virtual double __fastcall GetOriginValue(int ValueIndex);
  976.     virtual double __fastcall GetMarkValue(int ValueIndex);
  977.     void __fastcall AssignValues(TChartSeries* Source);
  978.     bool __fastcall SameClass(TChartSeries* tmpSeries);
  979.     virtual double __fastcall PointOrigin(int ValueIndex, bool SumAll);
  980.     bool __fastcall YMandatory(void);
  981.     virtual TChartValueList* __fastcall MandatoryValueList(void);
  982.     virtual bool __fastcall DrawValuesForward(void);
  983.     virtual bool __fastcall DrawSeriesForward(int ValueIndex);
  984.     virtual void __fastcall SwapValueIndex(int a, int b);
  985.     __property TSeriesRecalcOptions RecalcOptions = {read=FRecalcOptions, write=SetRecalcOptions, default=15
  986.         };
  987.     virtual void __fastcall CalcZOrder(void);
  988.     virtual void __fastcall DoSeriesMouseMove(Classes::TShiftState Shift, int X, int Y);
  989.     virtual bool __fastcall DoSeriesClick(TChartSeries* Sender, int ValueIndex, Controls::TMouseButton 
  990.         Button, Classes::TShiftState Shift, int X, int Y);
  991.     virtual void __fastcall DoSeriesMouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, 
  992.         int X, int Y);
  993.     int __fastcall GetCursorValueIndex(void);
  994.     void __fastcall GetCursorValues(double &x, double &y);
  995.     virtual void __fastcall ClearTempValue(TChartValueList* ValueList);
  996.     virtual void __fastcall DrawLegend(int ValueIndex, const Windows::TRect &Rect);
  997.     virtual void __fastcall DrawLegendShape(int ValueIndex, const Windows::TRect &Rect);
  998.     virtual void __fastcall PrepareLegendCanvas(int ValueIndex, Graphics::TColor &BackColor, Graphics::TBrushStyle 
  999.         &BrushStyle);
  1000.     virtual void __fastcall CalcHorizMargins(int &LeftMargin, int &RightMargin);
  1001.     virtual void __fastcall CalcVerticalMargins(int &TopMargin, int &BottomMargin);
  1002.     virtual bool __fastcall UseAxis(void);
  1003.     virtual void __fastcall SetFunction(TTeeFunction* AFunction);
  1004.     void __fastcall CalcFirstLastVisibleIndex(void);
  1005.     Tecanvas::TChartPen* __fastcall CreateChartPen(void);
  1006.     virtual void __fastcall CanvasChanged(System::TObject* Sender);
  1007.     __property Classes::TList* DataSources = {read=FDataSources};
  1008.     __property TTeeFunction* FunctionType = {read=FTeeFunction};
  1009.     void __fastcall SetLongintProperty(int &Variable, int Value);
  1010.     void __fastcall SetIntegerProperty(int &Variable, int Value);
  1011.     void __fastcall SetStringProperty(AnsiString &Variable, const AnsiString Value);
  1012.     void __fastcall SetBooleanProperty(bool &Variable, bool Value);
  1013.     void __fastcall SetColorProperty(Graphics::TColor &Variable, Graphics::TColor Value);
  1014.     void __fastcall SetDoubleProperty(double &Variable, const double Value);
  1015.     void __fastcall CheckOtherSeries(TChartSeries* Source);
  1016.     virtual void __fastcall GetBitmapEditor(Graphics::TBitmap* ABitmap);
  1017.     void __fastcall ReplaceList(TChartValueList* OldList, TChartValueList* NewList);
  1018.     __property AnsiString Identifier = {read=FIdentifier, write=FIdentifier};
  1019.     __property TChartSeriesStyle Style = {read=FStyle, write=FStyle, default=0};
  1020.     __property TChartAxis* CustomHorizAxis = {read=FCustomHorizAxis, write=SetCustomHorizAxis};
  1021.     __property TChartAxis* CustomVertAxis = {read=FCustomVertAxis, write=SetCustomVertAxis};
  1022.     
  1023. __published:
  1024.     __property bool Active = {read=FActive, write=SetActive, default=1};
  1025.     __property bool ColorEachPoint = {read=FColorEachPoint, write=SetColorEachPoint, default=0};
  1026.     __property AnsiString ColorSource = {read=FColorSource, write=SetColorSource};
  1027.     __property Controls::TCursor Cursor = {read=FCursor, write=FCursor, default=0};
  1028.     __property THorizAxis HorizAxis = {read=FHorizAxis, write=SetHorizAxis, default=1};
  1029.     __property TSeriesMarks* Marks = {read=FMarks, write=SetMarks};
  1030.     __property TCustomAxisPanel* ParentChart = {read=FParent, write=SetParentChart, stored=false};
  1031.     __property Classes::TComponent* DataSource = {read=GetDataSource, write=SetDataSource};
  1032.     __property AnsiString PercentFormat = {read=FPercentFormat, write=SetPercentFormat, stored=IsPercentFormatStored
  1033.         };
  1034.     __property Graphics::TColor SeriesColor = {read=FColor, write=SetSeriesColor, nodefault};
  1035.     __property bool ShowInLegend = {read=FShowInLegend, write=SetShowInLegend, default=1};
  1036.     __property AnsiString Title = {read=FTitle, write=SetTitle};
  1037.     __property AnsiString ValueFormat = {read=FValueFormat, write=SetValueFormat, stored=IsValueFormatStored
  1038.         };
  1039.     __property TVertAxis VertAxis = {read=FVertAxis, write=SetVertAxis, default=0};
  1040.     __property AnsiString XLabelsSource = {read=FLabelsSource, write=SetLabelsSource};
  1041.     __property Classes::TNotifyEvent AfterDrawValues = {read=FAfterDrawValues, write=FAfterDrawValues};
  1042.         
  1043.     __property Classes::TNotifyEvent BeforeDrawValues = {read=FBeforeDrawValues, write=FBeforeDrawValues
  1044.         };
  1045.     __property TSeriesOnAfterAdd OnAfterAdd = {read=FOnAfterAdd, write=FOnAfterAdd};
  1046.     __property TSeriesOnBeforeAdd OnBeforeAdd = {read=FOnBeforeAdd, write=FOnBeforeAdd};
  1047.     __property TSeriesOnClear OnClearValues = {read=FOnClearValues, write=FOnClearValues};
  1048.     __property TSeriesClick OnClick = {read=FOnClick, write=FOnClick};
  1049.     __property TSeriesClick OnDblClick = {read=FOnDblClick, write=FOnDblClick};
  1050.     __property TSeriesOnGetMarkText OnGetMarkText = {read=FOnGetMarkText, write=FOnGetMarkText};
  1051. };
  1052.  
  1053.  
  1054. class PASCALIMPLEMENTATION TChartValueList : public Classes::TPersistent 
  1055. {
  1056.     typedef Classes::TPersistent inherited;
  1057.     
  1058. private:
  1059.     bool FDateTime;
  1060.     Classes::TList* FList;
  1061.     double FMaxValue;
  1062.     double FMinValue;
  1063.     double FMultiplier;
  1064.     AnsiString FName;
  1065.     TChartListOrder FOrder;
  1066.     TChartSeries* FOwner;
  1067.     double FTempValue;
  1068.     double FTotal;
  1069.     double FTotalABS;
  1070.     AnsiString FValueSource;
  1071.     double __fastcall GetMaxValue(void);
  1072.     double __fastcall GetMinValue(void);
  1073.     double __fastcall GetTotal(void);
  1074.     double __fastcall GetTotalABS(void);
  1075.     void __fastcall SetDateTime(bool Value);
  1076.     void __fastcall SetMultiplier(const double Value);
  1077.     void __fastcall SetValueSource(const AnsiString Value);
  1078.     
  1079. protected:
  1080.     bool IDirtyStats;
  1081.     virtual double __fastcall GetValue(int ValueIndex);
  1082.     virtual void __fastcall SetValue(int ValueIndex, const double AValue);
  1083.     virtual void __fastcall ClearValues(void);
  1084.     void __fastcall RecalcStats(void);
  1085.     virtual int __fastcall AddChartValue(const double Value);
  1086.     virtual void __fastcall InsertChartValue(int ValueIndex, const double Value);
  1087.     
  1088. public:
  1089.     __fastcall virtual TChartValueList(TChartSeries* AOwner, const AnsiString AName);
  1090.     __fastcall virtual ~TChartValueList(void);
  1091.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  1092.     virtual int __fastcall Count(void);
  1093.     virtual void __fastcall Delete(int ValueIndex);
  1094.     void __fastcall FillSequence(void);
  1095.     double __fastcall First(void);
  1096.     double __fastcall Last(void);
  1097.     int __fastcall Locate(const double Value);
  1098.     virtual void __fastcall Scroll(void);
  1099.     void __fastcall Sort(void);
  1100.     __property double MaxValue = {read=GetMaxValue};
  1101.     __property double MinValue = {read=GetMinValue};
  1102.     __property TChartSeries* Owner = {read=FOwner};
  1103.     __property double TempValue = {read=FTempValue, write=FTempValue};
  1104.     __property double Total = {read=GetTotal};
  1105.     __property double TotalABS = {read=GetTotalABS, write=FTotalABS};
  1106.     __property double Value[int Index] = {read=GetValue, write=SetValue/*, default*/};
  1107.     
  1108. __published:
  1109.     __property bool DateTime = {read=FDateTime, write=SetDateTime, nodefault};
  1110.     __property AnsiString Name = {read=FName, write=FName};
  1111.     __property double Multiplier = {read=FMultiplier, write=SetMultiplier};
  1112.     __property TChartListOrder Order = {read=FOrder, write=FOrder, nodefault};
  1113.     __property AnsiString ValueSource = {read=FValueSource, write=SetValueSource};
  1114. };
  1115.  
  1116.  
  1117. class DELPHICLASS AxisException;
  1118. class PASCALIMPLEMENTATION AxisException : public Sysutils::Exception 
  1119. {
  1120.     typedef Sysutils::Exception inherited;
  1121.     
  1122. public:
  1123.     #pragma option push -w-inl
  1124.     /* Exception.Create */ inline __fastcall AxisException(const AnsiString Msg) : Sysutils::Exception(
  1125.         Msg) { }
  1126.     #pragma option pop
  1127.     #pragma option push -w-inl
  1128.     /* Exception.CreateFmt */ inline __fastcall AxisException(const AnsiString Msg, const System::TVarRec 
  1129.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  1130.     #pragma option pop
  1131.     #pragma option push -w-inl
  1132.     /* Exception.CreateRes */ inline __fastcall AxisException(int Ident)/* overload */ : Sysutils::Exception(
  1133.         Ident) { }
  1134.     #pragma option pop
  1135.     #pragma option push -w-inl
  1136.     /* Exception.CreateResFmt */ inline __fastcall AxisException(int Ident, const System::TVarRec * Args
  1137.         , const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
  1138.     #pragma option pop
  1139.     #pragma option push -w-inl
  1140.     /* Exception.CreateHelp */ inline __fastcall AxisException(const AnsiString Msg, int AHelpContext) : 
  1141.         Sysutils::Exception(Msg, AHelpContext) { }
  1142.     #pragma option pop
  1143.     #pragma option push -w-inl
  1144.     /* Exception.CreateFmtHelp */ inline __fastcall AxisException(const AnsiString Msg, const System::TVarRec 
  1145.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  1146.         ) { }
  1147.     #pragma option pop
  1148.     #pragma option push -w-inl
  1149.     /* Exception.CreateResHelp */ inline __fastcall AxisException(int Ident, int AHelpContext)/* overload */
  1150.          : Sysutils::Exception(Ident, AHelpContext) { }
  1151.     #pragma option pop
  1152.     #pragma option push -w-inl
  1153.     /* Exception.CreateResFmtHelp */ inline __fastcall AxisException(System::PResStringRec ResStringRec
  1154.         , const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
  1155.         ResStringRec, Args, Args_Size, AHelpContext) { }
  1156.     #pragma option pop
  1157.     
  1158. public:
  1159.     #pragma option push -w-inl
  1160.     /* TObject.Destroy */ inline __fastcall virtual ~AxisException(void) { }
  1161.     #pragma option pop
  1162.     
  1163. };
  1164.  
  1165.  
  1166. typedef void __fastcall (__closure *TSeriesMouseMove)(TChartSeries* Sender, Classes::TShiftState Shift
  1167.     , int X, int Y);
  1168.  
  1169. typedef void __fastcall (__closure *TSeriesDblClick)(TChartSeries* Sender, int ValueIndex);
  1170.  
  1171. #pragma option push -b-
  1172. enum TChartClickedPartStyle { cpNone, cpLegend, cpAxis, cpSeries, cpTitle, cpFoot, cpChartRect };
  1173. #pragma option pop
  1174.  
  1175. #pragma pack(push, 1)
  1176. struct TChartClickedPart
  1177. {
  1178.     TChartClickedPartStyle Part;
  1179.     int PointIndex;
  1180.     TChartSeries* ASeries;
  1181.     TCustomChartAxis* AAxis;
  1182. } ;
  1183. #pragma pack(pop)
  1184.  
  1185. class PASCALIMPLEMENTATION TSeriesMarkPosition : public System::TObject 
  1186. {
  1187.     typedef System::TObject inherited;
  1188.     
  1189. public:
  1190.     Windows::TPoint ArrowFrom;
  1191.     Windows::TPoint ArrowTo;
  1192.     bool Custom;
  1193.     int Height;
  1194.     Windows::TPoint LeftTop;
  1195.     int Width;
  1196.     void __fastcall Assign(TSeriesMarkPosition* Source);
  1197.     Windows::TRect __fastcall Bounds();
  1198. public:
  1199.     #pragma option push -w-inl
  1200.     /* TObject.Create */ inline __fastcall TSeriesMarkPosition(void) : System::TObject() { }
  1201.     #pragma option pop
  1202.     #pragma option push -w-inl
  1203.     /* TObject.Destroy */ inline __fastcall virtual ~TSeriesMarkPosition(void) { }
  1204.     #pragma option pop
  1205.     
  1206. };
  1207.  
  1208.  
  1209. typedef TMetaClass*TChartSeriesClass;
  1210.  
  1211. typedef TMetaClass*TTeeFunctionClass;
  1212.  
  1213. //-- var, const, procedure ---------------------------------------------------
  1214. static const int ChartMarkColor = 0x80ffff;
  1215. static const Shortint TeeAllValues = 0xffffffff;
  1216. static const Graphics::TColor clTeeColor = 0x80000000;
  1217. static const Word ChartSamplesMax = 0x3e8;
  1218. extern PACKAGE bool TeeDrawAxisBeforeSeries;
  1219. static const Shortint TeeAutoZOrder = 0xffffffff;
  1220. static const Shortint TeeNoPointClicked = 0xffffffff;
  1221. extern PACKAGE bool TeeCheckMarkArrowColor;
  1222. static const Word TeeMaxAxisTicks = 0x7d0;
  1223. extern PACKAGE int TeeAxisClickGap;
  1224. extern PACKAGE int TeeDefaultCapacity;
  1225.  
  1226. }    /* namespace Teengine */
  1227. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  1228. using namespace Teengine;
  1229. #endif
  1230. #pragma option pop    // -w-
  1231. #pragma option pop    // -Vx
  1232.  
  1233. #pragma delphiheader end.
  1234. //-- end unit ----------------------------------------------------------------
  1235. #endif    // TeEngine
  1236.