home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 March / Chip_1999-03_cd.bin / zkuste / delphi / D / MATEM.ARJ / RCHART.ZIP / cppbld1 / rchart.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-23  |  23.9 KB  |  613 lines

  1. //----------------------------------------------------------------------------
  2. // RChart.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: RChart.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef RChartHPP
  6. #define RChartHPP
  7. //----------------------------------------------------------------------------
  8. #include <Menus.hpp>
  9. #include <DsgnIntf.hpp>
  10. #include <Buttons.hpp>
  11. #include <StdCtrls.hpp>
  12. #include <ExtCtrls.hpp>
  13. #include <Dialogs.hpp>
  14. #include <Forms.hpp>
  15. #include <Controls.hpp>
  16. #include <Graphics.hpp>
  17. #include <Classes.hpp>
  18. #include <Messages.hpp>
  19. #include <Windows.hpp>
  20. #include <SysUtils.hpp>
  21. #include <System.hpp>
  22. namespace Rchart
  23. {
  24. //-- type declarations -------------------------------------------------------
  25. enum YearLengthType { ylNone, ylYY, ylYYYY };
  26.  
  27. enum DateOrderType { doMMDDYY, doDDMMYY, doYYMMDD };
  28.  
  29. enum TimeFormatType { tfHHMMSS, tfHHhMM, tfAMPM };
  30.  
  31. enum TCrossHMode { chOff, chHoriz, chVert, chBoth };
  32.  
  33. enum DateForTimeType { dtNone, dtOnePerChart, dtOnePerDay, dtAllTicks };
  34.  
  35. enum TBkgFill { bfSimple, bfStretch, bfTile };
  36.  
  37. class __declspec(delphiclass) TBakGndImg;
  38. class __declspec(pascalimplementation) TBakGndImg : public Classes::TPersistent
  39. {
  40.     typedef Classes::TPersistent inherited;
  41.     
  42. private:
  43.     System::AnsiString FName;
  44.     Classes::TNotifyEvent FOnChange;
  45.     bool FIncldPath;
  46.     TBkgFill FFillMode;
  47.     void __fastcall SetName( System::AnsiString fn);
  48.     void __fastcall SetIncldPath(bool x);
  49.     void __fastcall SetFillMode(TBkgFill x);
  50.     
  51. public:
  52.     __fastcall TBakGndImg(Classes::TComponent* AOwner);
  53.     __fastcall virtual ~TBakGndImg(void);
  54.     void __fastcall Changed(void);
  55.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  56.     
  57. __published:
  58.     __property System::AnsiString Name = {read=FName, write=SetName, nodefault};
  59.     __property bool IncludePath = {read=FIncldPath, write=SetIncldPath, nodefault};
  60.     __property TBkgFill FillMode = {read=FFillMode, write=SetFillMode, nodefault};
  61. };
  62.  
  63. class __declspec(delphiclass) TrcBakBMPEditor;
  64. class __declspec(pascalimplementation) TrcBakBMPEditor : public Forms::TForm
  65. {
  66.     typedef Forms::TForm inherited;
  67.     
  68. __published:
  69.     Stdctrls::TCheckBox* CBIncldPath;
  70.     Stdctrls::TComboBox* CBFillMode;
  71.     Buttons::TSpeedButton* SBLoadBMP;
  72.     Buttons::TSpeedButton* SBOK;
  73.     Stdctrls::TEdit* EdName;
  74.     Stdctrls::TLabel* Label1;
  75.     Buttons::TSpeedButton* SBCancel;
  76.     Extctrls::TImage* Image1;
  77.     Extctrls::TBevel* Bevel1;
  78.     Stdctrls::TLabel* LblDims;
  79.     void __fastcall SBLoadBMPClick(System::TObject* Sender);
  80.     void __fastcall CBIncldPathClick(System::TObject* Sender);
  81.     void __fastcall SBOKClick(System::TObject* Sender);
  82.     void __fastcall SBCancelClick(System::TObject* Sender);
  83.     
  84. public:
  85.     System::AnsiString FullName;
  86. public:
  87.     /* TForm.Create */ __fastcall virtual TrcBakBMPEditor(Classes::TComponent* AOwner) : Forms::TForm(AOwner
  88.         ) { }
  89.     /* TForm.CreateNew */ __fastcall TrcBakBMPEditor(Classes::TComponent* AOwner, int Dummy) : Forms::TForm(
  90.         AOwner, Dummy) { }
  91.     /* TForm.Destroy */ __fastcall virtual ~TrcBakBMPEditor(void) { }
  92.     
  93. public:
  94.     /* TWinControl.CreateParented */ __fastcall TrcBakBMPEditor(HWND ParentWindow) : Forms::TForm(ParentWindow
  95.         ) { }
  96.     
  97. };
  98.  
  99. class __declspec(delphiclass) TBakGndFileProperty;
  100. class __declspec(pascalimplementation) TBakGndFileProperty : public Dsgnintf::TClassProperty
  101. {
  102.     typedef Dsgnintf::TClassProperty inherited;
  103.     
  104. public:
  105.     virtual void __fastcall Edit(void);
  106.     virtual Dsgnintf::TPropertyAttributes __fastcall GetAttributes(void);
  107. public:
  108.     /* TPropertyEditor.Destroy */ __fastcall virtual ~TBakGndFileProperty(void) { }
  109.     
  110. public:
  111.     /* TObject.Create */ __fastcall TBakGndFileProperty(void) : Dsgnintf::TClassProperty() { }
  112.     
  113. };
  114.  
  115. class __declspec(delphiclass) TDTLabel;
  116. class __declspec(pascalimplementation) TDTLabel : public Classes::TPersistent
  117. {
  118.     typedef Classes::TPersistent inherited;
  119.     
  120. private:
  121.     TimeFormatType FTimeFormat;
  122.     char FDateSeparator;
  123.     char FTimeSeparator;
  124.     YearLengthType FYearLength;
  125.     bool FMonthName;
  126.     DateOrderType FDateOrder;
  127.     DateForTimeType FDateForTime;
  128.     Classes::TNotifyEvent FOnChange;
  129.     void __fastcall SetTimeFormat(TimeFormatType Value);
  130.     void __fastcall SetDateForTime(DateForTimeType value);
  131.     void __fastcall SetDateSeparator(char Value);
  132.     void __fastcall SetTimeSeparator(char Value);
  133.     void __fastcall SetYearLength(YearLengthType value);
  134.     void __fastcall SetMonthName(bool value);
  135.     void __fastcall SetDAteOrder(DateOrderType value);
  136.     
  137. public:
  138.     void __fastcall Changed(void);
  139.     
  140. __published:
  141.     __property TimeFormatType TimeFormat = {read=FTimeFormat, write=SetTimeFormat, nodefault};
  142.     __property char DateSeparator = {read=FDateSeparator, write=SetDateSeparator, nodefault};
  143.     __property char TimeSeparator = {read=FTimeSeparator, write=SetTimeSeparator, nodefault};
  144.     __property YearLengthType YearLength = {read=FYearLength, write=SetYearLength, nodefault};
  145.     __property bool MonthName = {read=FMonthName, write=SetMonthName, nodefault};
  146.     __property DateOrderType DateOrder = {read=FDateOrder, write=SetDAteOrder, nodefault};
  147.     __property DateForTimeType DateForTime = {read=FDateForTime, write=SetDateForTime, nodefault};
  148.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  149. public:
  150.     /* TObject.Create */ __fastcall TDTLabel(void) : Classes::TPersistent() { }
  151.     /* TObject.Destroy */ __fastcall virtual ~TDTLabel(void) { }
  152.     
  153. };
  154.  
  155. enum TRFrameStyle { rbLowered, rbRaised, rbEmbossed, rbEngraved };
  156.  
  157. enum ItemType { tkNone, tkMarkAt, tkLine, tkLineto, tkRect, tkRectFrame, tk3DBar, tkText, tkMoveTo, 
  158.     tkEllipse, tkEverything, tkNotMoveTo };
  159.  
  160. struct TDrawCan;
  161. typedef TDrawCan *PDrawCan;
  162.  
  163. struct TDrawCan
  164. {
  165.     TDrawCan *Next;
  166.     double x;
  167.     double y;
  168.     Graphics::TColor color;
  169.     long tag;
  170.     Byte lwid;
  171.     Byte ItemClass;
  172.     ItemType Element;
  173.     union
  174.     {
  175.         Byte mark;
  176.         struct  foo   // this foo is inserted as a bug fix - SDL May97
  177.         {
  178.             System::SmallString<15>  txt;
  179.             int size;
  180.             
  181.         };
  182.         struct 
  183.         {
  184.             double x3;
  185.             double y3;
  186.             Graphics::TColor fillcol4;
  187.             int depth;
  188.             int angle;
  189.             
  190.         };
  191.         struct 
  192.         {
  193.             double ha;
  194.             double hv;
  195.             Graphics::TColor fillcol3;
  196.             
  197.         };
  198.         struct 
  199.         {
  200.             double x4;
  201.             double y4;
  202.             Graphics::TColor fillcol2;
  203.             TRFrameStyle framest;
  204.             Graphics::TColor shadowcol;
  205.             Graphics::TColor hilightcol;
  206.             
  207.         };
  208.         struct 
  209.         {
  210.             double x2;
  211.             double y2;
  212.             Graphics::TColor fillcol1;
  213.             
  214.         };
  215.         
  216.     };
  217. } ;
  218.  
  219. enum FigType { ftNoFigs, ftNum, ftTime, ftNoScales, ftDateTime, ftUserText };
  220.  
  221. enum GridStyleType { gsNone, gsPoints, gsVertLines, gsHorizLines, gsLines, gsHorizDotLines, gsVertDotLines, 
  222.     gsDotLines };
  223.  
  224. enum TShadowStyle { ssFlying, ssBox };
  225.  
  226. enum TTextBkg { tbClear, tbSolid };
  227.  
  228. typedef SmallString<50>  LabelStr;
  229.  
  230. typedef SmallString<15>  InscriptStr;
  231.  
  232. enum ZoomStateType { zsNormal, zsDrawWin };
  233.  
  234. enum MouseBoxStateType { msNormal, msFirstCorner, msRectDraw, msFinished };
  235.  
  236. enum MouseActMode { maNone, maPan, maZoomWind, maZoomWindPos, maZoomDrag };
  237.  
  238. typedef void __fastcall (__closure *TMouseMoveInChartEvent)(System::TObject* Sender, bool InChart, Classes::TShiftState 
  239.     Shift, double rMousePosX, double rMousePosY);
  240.  
  241. typedef void __fastcall (__closure *TZoomPanEvent)(System::TObject* Sender);
  242.  
  243. class __declspec(delphiclass) TRChart;
  244. class __declspec(pascalimplementation) TRChart : public Controls::TGraphicControl
  245. {
  246.     typedef Controls::TGraphicControl inherited;
  247.     
  248. private:
  249.     bool LButtonWasDown;
  250.     int MouseAnchorScrX;
  251.     int MouseAnchorScrY;
  252.     double MouseAnchorRcLoX;
  253.     double MouseAnchorRcLoY;
  254.     double MouseAnchorRcHiX;
  255.     double MouseAnchorRcHiY;
  256.     ZoomStateType FZoomState;
  257.     MouseBoxStateType MouseBoxState;
  258.     int LastMouseX;
  259.     int LastMouseY;
  260.     int MouseBoxX1;
  261.     int MouseBoxX2;
  262.     int MouseBoxY1;
  263.     int MouseBoxY2;
  264.     int WindAnchorX;
  265.     int WindAnchorY;
  266.     int WindOldCornerX;
  267.     int WindOldCornerY;
  268.     int FXTickPosCnt;
  269.     int FYTickPosCnt;
  270.     double FXScaleTickPos[50];
  271.     double FYScaleTickPos[50];
  272.     bool FItClassVisib[256];
  273.     TMouseMoveInChartEvent FOnMMvInChart;
  274.     TZoomPanEvent FOnZoomPan;
  275.     Graphics::TBitmap* AuxBmp;
  276.     Graphics::TBitmap* AuxCHBmp;
  277.     Graphics::TBitmap* GrafBmp;
  278.     Graphics::TBitmap* ChartBmp;
  279.     TBakGndImg* FBakGndFile;
  280.     long FDataTag;
  281.     GridStyleType RcGridStyle;
  282.     Graphics::TColor RcGridCol;
  283.     double RcGridDx;
  284.     double RcGridDy;
  285.     int RcLRim;
  286.     int RcRRim;
  287.     int RcTRim;
  288.     int RcBRim;
  289.     int Rc3DRim;
  290.     TShadowStyle RcShadowStyle;
  291.     Graphics::TColor RcShadowColor;
  292.     Graphics::TColor RcShadowBakCol;
  293.     bool RcShortTicksX;
  294.     bool RcShortTicksY;
  295.     bool RcXLog;
  296.     bool RcYLog;
  297.     MouseActMode RcMouseAction;
  298.     TDrawCan *RcFrstCan;
  299.     TDrawCan *RcLastCan;
  300.     TDrawCan *RcLastCanOnShow;
  301.     Graphics::TColor RcDataCol;
  302.     Graphics::TColor RcScaleCol;
  303.     Graphics::TColor RcFillCol;
  304.     Graphics::TColor RcChartCol;
  305.     Graphics::TColor RcWindCol;
  306.     Byte RcLineWid;
  307.     System::AnsiString TitStr;
  308.     InscriptStr RcScaleInscrX;
  309.     InscriptStr RcScaleInscrY;
  310.     double RcBndLoX;
  311.     double RcBndLoY;
  312.     double RcBndHiX;
  313.     double RcBndHiY;
  314.     Byte RcClassDefault;
  315.     int RcDecPlcX;
  316.     int RcDecPlcY;
  317.     double Cpkx;
  318.     double Cpdx;
  319.     double Cpky;
  320.     double Cpdy;
  321.     LabelStr RcXUnits;
  322.     LabelStr RcYUnits;
  323.     int RcXNtick;
  324.     int RcYNtick;
  325.     FigType RcXLabelType;
  326.     FigType RcYLabelType;
  327.     System::AnsiString FUserTickTextX;
  328.     System::AnsiString FUserTickTextY;
  329.     double FMousePosX;
  330.     double FMousePosY;
  331.     TDTLabel* FDTXFormat;
  332.     TDTLabel* FDTYFormat;
  333.     bool FMCurFixed;
  334.     double FCrossHPos[4][2];
  335.     Graphics::TColor FCrossHColor[4];
  336.     TCrossHMode FCrossHMode[4];
  337.     TPenStyle FCrossHLineType[4];
  338.     int FCrossHLineWid[4];
  339.     bool FAutoRedraw;
  340.     long FNumPPa;
  341.     Graphics::TFontStyles FTextFontStyle;
  342.     TTextBkg FTextBkStyle;
  343.     Graphics::TColor FTextBkColor;
  344.     TAlignment FTextAlignment;
  345.     bool FIsometric;
  346.     double FZoomStack[8][4];
  347.     int FZStackPoi;
  348.     double FZoomRange[4];
  349.     virtual void __fastcall AdjustScaling(void);
  350.     System::AnsiString __fastcall AddScaleInscription( System::AnsiString Instring,  InscriptStr &Inscr
  351.         );
  352.     void __fastcall ConstructChartBmp(Graphics::TCanvas* cv);
  353.     void __fastcall ConstructDataBmp(Graphics::TCanvas* cv, int PosX, int PosY, bool BlkWhite, PDrawCan 
  354.         FirstItem);
  355.     void __fastcall DrawCrossHairs(int xPos, int yPos, Graphics::TBitmap* SrcBmp);
  356.     System::AnsiString __fastcall ExtractUserText( System::AnsiString TickText, int ix);
  357.     void __fastcall ForceRange(double xLo, double yLo, double xHi, double yHi, bool EnterToZoomStack, bool 
  358.         ConfineRange);
  359.     ItemType __fastcall GetTypeOfFirstItem(void);
  360.     ItemType __fastcall GetTypeOfLastItem(void);
  361.     PDrawCan __fastcall GetFirstItemLL(void);
  362.     bool __fastcall GetClassVisib(Byte cnum);
  363.     double __fastcall GetCHPosX(int chnum);
  364.     double __fastcall GetCHPosY(int chnum);
  365.     void __fastcall InitGraf(Graphics::TCanvas* cv, int PosX, int PosY);
  366.     void __fastcall SetClassVisib(Byte cnum, bool value);
  367.     void __fastcall SetCHPosX(int chnum, double value);
  368.     void __fastcall SetCHPosY(int chnum, double value);
  369.     void __fastcall SetLRim(int r);
  370.     void __fastcall SetRRim(int r);
  371.     void __fastcall SetTRim(int r);
  372.     void __fastcall SetBRim(int r);
  373.     void __fastcall SetRc3DRim(int r);
  374.     void __fastcall SetDataTag(long tag);
  375.     void __fastcall SetShadowStyle(TShadowStyle ss);
  376.     void __fastcall SetShadowColor(Graphics::TColor c);
  377.     void __fastcall SetShadowBakColor(Graphics::TColor c);
  378.     void __fastcall SetClassDefault(Byte DefClass);
  379.     void __fastcall SetDecPlcX(int d);
  380.     void __fastcall SetDecPlcY(int d);
  381.     void __fastcall SetGridStyle(GridStyleType gs);
  382.     void __fastcall SetGridDx(double dx);
  383.     void __fastcall SetGridDy(double dy);
  384.     void __fastcall SetDataCol(Graphics::TColor c);
  385.     void __fastcall SetScaleCol(Graphics::TColor c);
  386.     void __fastcall SetFillCol(Graphics::TColor c);
  387.     void __fastcall SetChartCol(Graphics::TColor c);
  388.     void __fastcall SetWindCol(Graphics::TColor c);
  389.     void __fastcall SetGridCol(Graphics::TColor c);
  390.     void __fastcall SetTitStr( System::AnsiString hstr);
  391.     void __fastcall SetLineWid(Byte w);
  392.     void __fastcall SetXUnits( LabelStr &hstr);
  393.     void __fastcall SetYUnits( LabelStr &hstr);
  394.     void __fastcall SetShortTicksX(bool st);
  395.     void __fastcall SetShortTicksY(bool st);
  396.     void __fastcall SetRcXLog(bool XLog);
  397.     void __fastcall SetRcYLog(bool YLog);
  398.     void __fastcall SetBndLoX(double r);
  399.     void __fastcall SetBndHiX(double r);
  400.     void __fastcall SetBndLoY(double r);
  401.     void __fastcall SetBndHiY(double r);
  402.     void __fastcall SetDTXFormat(TDTLabel* x);
  403.     void __fastcall SetDTYFormat(TDTLabel* x);
  404.     MESSAGE void __fastcall WMMouseMoveInChart(Messages::TWMMouse &Message);
  405.     void __fastcall SetXNTick(int d);
  406.     void __fastcall SetYNTick(int d);
  407.     void __fastcall SetTextFontStyle(Graphics::TFontStyles tfs);
  408.     void __fastcall SetTextBkStyle(TTextBkg bs);
  409.     void __fastcall SetTextBkColor(Graphics::TColor bc);
  410.     void __fastcall SetTextAlignment(Classes::TAlignment al);
  411.     void __fastcall SetXLabType(FigType x);
  412.     void __fastcall SetYLabType(FigType x);
  413.     void __fastcall SetUserTickTextX( System::AnsiString txt);
  414.     void __fastcall SetUserTickTextY( System::AnsiString txt);
  415.     void __fastcall SetScaleInscrX( InscriptStr &x);
  416.     void __fastcall SetScaleInscrY( InscriptStr &x);
  417.     void __fastcall SetBakGndFile(TBakGndImg* x);
  418.     void __fastcall ZoomStateOnStack(void);
  419.     void __fastcall ShowYaxInternal(Graphics::TCanvas* cv, int XPos, double LowRange, double HighRange, 
  420.         int NTicks, int DecPlaces, FigType LabelType, bool LogAx,  InscriptStr &ScaleInscript,  System::AnsiString 
  421.         UserTicktext,  LabelStr &UnitLabel, bool StoreTickPos);
  422.     
  423. protected:
  424.     virtual void __fastcall Paint(void);
  425.     virtual void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
  426.     void __fastcall MouseMoveInChart(bool InChart, Classes::TShiftState Shift, double RMousePosX, double 
  427.         RMousePosY);
  428.     virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
  429.         int Y);
  430.     virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
  431.         Y);
  432.     void __fastcall StyleChanged(System::TObject* Sender);
  433.     void __fastcall DoZoomPanEvent(void);
  434.     
  435. public:
  436.     __fastcall virtual TRChart(Classes::TComponent* AOwner);
  437.     __fastcall virtual ~TRChart(void);
  438.     void __fastcall M2R(long xin, long yin, double &xout, double &yout);
  439.     void __fastcall R2M(double xin, double yin, long &xout, long &yout);
  440.     void __fastcall ClearGraf(void);
  441.     void __fastcall ConfineZoomRange(double xLo, double yLo, double xHi, double yHi);
  442.     void __fastcall ShowGraf(void);
  443.     void __fastcall ShowGrafNewOnly(void);
  444.     virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
  445.     bool __fastcall MouseBox(double &xLo, double &yLo, double &xHi, double &yHi);
  446.     void __fastcall Bar3D(double llx, double lly, double urx, double ury, int Depth, int Angle);
  447.     void __fastcall CopyToBMP( System::AnsiString FName);
  448.     void __fastcall CopyToClipboard(void);
  449.     void __fastcall CopyToOpenPrinter(int &x, int &y, double ScaleF, bool BlkWhite);
  450.     void __fastcall CopyToOpenPrinterHiRes(int &x, int &y, double ScaleF, bool BlkWhite);
  451.     __property double CrossHairPosX[int chnum] = {read=GetCHPosX, write=SetCHPosX};
  452.     __property double CrossHairPosY[int chnum] = {read=GetCHPosY, write=SetCHPosY};
  453.     void __fastcall CrossHairSetPos(int chnum, double x, double y);
  454.     void __fastcall CrossHairSetup(int ch, Graphics::TColor chColor, TCrossHMode Mode, Graphics::TPenStyle 
  455.         LineType, int LineWidth);
  456.     __property long DataTag = {read=FDataTag, write=SetDataTag, nodefault};
  457.     void __fastcall DrawTo(double x, double y);
  458.     void __fastcall Ellipse(double cx, double cy, double HorizAxLeng, double VertAxLeng);
  459.     void __fastcall Line(double x1, double y1, double x2, double y2);
  460.     void __fastcall MoveTo(double x, double y);
  461.     void __fastcall MarkAt(double x, double y, Byte mk);
  462.     void __fastcall PrintIt(double ScaleF, bool BlkWhite);
  463.     void __fastcall PrintItHiRes(double ScaleF, bool BlkWhite);
  464.     void __fastcall Rectangle(double x1, double y1, double x2, double y2);
  465.     void __fastcall RectFrame(double x1, double y1, double x2, double y2, TRFrameStyle FrameStyle, Graphics::TColor 
  466.         ShadowColor, Graphics::TColor HiLightColor);
  467.     void __fastcall SaveLinkedListASC( System::AnsiString FName);
  468.     void __fastcall SaveLinkedList( System::AnsiString FName);
  469.     void __fastcall LoadLinkedList( System::AnsiString FName, bool AppendIt);
  470.     void __fastcall SetRange(double xLo, double yLo, double xHi, double yHi);
  471.     void __fastcall AutoRange(double rim);
  472.     HIDESBASE void __fastcall Text(double x, double y, int size,  System::AnsiString txt);
  473.     void __fastcall RemoveLastItem(void);
  474.     void __fastcall RemoveFirstItem(void);
  475.     void __fastcall RemoveItem(PDrawCan Item);
  476.     void __fastcall FindMinMax(double RangeLoX, double RangeLoY, double RangeHiX, double RangeHiY, double 
  477.         &MinX, double &MinY, double &MaxX, double &MaxY);
  478.     PDrawCan __fastcall FindNearestItemReal(double mx, double my, ItemType ItemID, Byte ClassNumber, double 
  479.         &Dist);
  480.     PDrawCan __fastcall FindNearestItemScreen(double mx, double my, ItemType ItemID, Byte ClassNumber, 
  481.         double &Dist);
  482.     __property PDrawCan FirstItemOfLinkedList = {read=GetFirstItemLL, nodefault};
  483.     TDrawCan __fastcall GetItemParams(PDrawCan Item);
  484.     void __fastcall SetItemParams(PDrawCan Item, const TDrawCan &ItParams);
  485.     void __fastcall ScaleItem(PDrawCan Item, double kx, double dx, double ky, double dy);
  486.     long __fastcall MarkItemsInWindow(double xLo, double YLo, double XHi, double YHi, ItemType ItemID, 
  487.         Byte ClassNumber);
  488.     void __fastcall MarkAllItems(ItemType ItemID, Byte ClassNumber);
  489.     __property bool ClassVisible[Byte cnum] = {read=GetClassVisib, write=SetClassVisib};
  490.     void __fastcall ScaleAllItems(double kx, double dx, double ky, double dy);
  491.     void __fastcall ScaleSelectedItems(double kx, double dx, double ky, double dy, Byte ClassNumber);
  492.     __property ItemType TypeOfLastItem = {read=GetTypeOfLastItem, nodefault};
  493.     __property ItemType TypeOfFirstItem = {read=GetTypeOfFirstItem, nodefault};
  494.     void __fastcall NewColorOfClassItems(Graphics::TColor Newcol, Byte ClassNumber);
  495.     __property ZoomStateType ZoomState = {read=FZoomState, nodefault};
  496.     void __fastcall ZoomHistory(int Index);
  497.     
  498. __published:
  499.     __property Font ;
  500.     __property Align ;
  501.     __property Visible ;
  502.     __property ShowHint ;
  503.     __property PopupMenu ;
  504.     __property bool AutoRedraw = {read=FAutoRedraw, write=FAutoRedraw, nodefault};
  505.     __property int LRim = {read=RcLRim, write=SetLRim, default=50};
  506.     __property int RRim = {read=RcRRim, write=SetRRim, default=10};
  507.     __property int TRim = {read=RcTRim, write=SetTRim, default=16};
  508.     __property int BRim = {read=RcBRim, write=SetBRim, default=32};
  509.     __property TBakGndImg* BackGroundImg = {read=FBakGndFile, write=SetBakGndFile, nodefault};
  510.     __property Byte ClassDefault = {read=RcClassDefault, write=SetClassDefault, nodefault};
  511.     __property int DecPlaceX = {read=RcDecPlcX, write=SetDecPlcX, default=1};
  512.     __property int DecPlaceY = {read=RcDecPlcY, write=SetDecPlcY, default=1};
  513.     __property GridStyleType GridStyle = {read=RcGridStyle, write=SetGridStyle, nodefault};
  514.     __property double GridDx = {read=RcGridDx, write=SetGridDx};
  515.     __property double GridDy = {read=RcGridDy, write=SetGridDy};
  516.     __property double RangeLoX = {read=RcBndLoX, write=SetBndLoX};
  517.     __property double RangeHiX = {read=RcBndHiX, write=SetBndHiX};
  518.     __property double RangeLoY = {read=RcBndLoY, write=SetBndLoY};
  519.     __property double RangeHiY = {read=RcBndHiY, write=SetBndHiY};
  520.     __property Graphics::TColor DataColor = {read=RcDataCol, write=SetDataCol, default=0};
  521.     __property Graphics::TColor ScaleColor = {read=RcScaleCol, write=SetScaleCol, default=0};
  522.     __property Graphics::TColor FillColor = {read=RcFillCol, write=SetFillCol, default=12632256};
  523.     __property Graphics::TColor ChartColor = {read=RcChartCol, write=SetChartCol, default=16777215};
  524.     __property Graphics::TColor WindColor = {read=RcWindCol, write=SetWindCol, default=-2147483633};
  525.     __property Graphics::TColor GridColor = {read=RcGridCol, write=SetGridCol, default=0};
  526.     __property Byte LineWidth = {read=RcLineWid, write=SetLineWid, default=1};
  527.     __property System::AnsiString Caption = {read=TitStr, write=SetTitStr, nodefault};
  528.     __property LabelStr IdAbscissa = {read=RcXUnits, write=SetXUnits};
  529.     __property LabelStr IdOrdinate = {read=RcYUnits, write=SetYUnits};
  530.     __property InscriptStr ScaleInscriptX = {read=RcScaleInscrX, write=SetScaleInscrX};
  531.     __property InscriptStr ScaleInscriptY = {read=RcScaleInscrY, write=SetScaleInscrY};
  532.     __property bool LogScaleX = {read=RcXLog, write=SetRcXLog, nodefault};
  533.     __property bool LogScaleY = {read=RcYLog, write=SetRcYLog, nodefault};
  534.     __property int MinTickX = {read=RcXNtick, write=SetXNTick, default=3};
  535.     __property int MinTickY = {read=RcYNtick, write=SetYNTick, default=3};
  536.     __property double MousePosX = {read=FMousePosX};
  537.     __property double MousePosY = {read=FMousePosY};
  538.     __property MouseActMode MouseAction = {read=RcMouseAction, write=RcMouseAction, nodefault};
  539.     __property bool MouseCursorFixed = {read=FMCurFixed, write=FMCurFixed, nodefault};
  540.     __property int ShadowWidth = {read=Rc3DRim, write=SetRc3DRim, default=0};
  541.     __property TShadowStyle ShadowStyle = {read=RcShadowStyle, write=SetShadowStyle, nodefault};
  542.     __property Graphics::TColor ShadowColor = {read=RcShadowColor, write=SetShadowColor, nodefault};
  543.     __property Graphics::TColor ShadowBakColor = {read=RcShadowBakCol, write=SetShadowBakColor, nodefault
  544.         };
  545.     __property bool ShortTicksX = {read=RcShortTicksX, write=SetShortTicksX, nodefault};
  546.     __property bool ShortTicksY = {read=RcShortTicksY, write=SetShortTicksY, nodefault};
  547.     __property Graphics::TFontStyles TextFontStyle = {read=FTextFontStyle, write=SetTextFontStyle, nodefault
  548.         };
  549.     __property TTextBkg TextBkStyle = {read=FTextBkStyle, write=SetTextBkStyle, nodefault};
  550.     __property Graphics::TColor TextBkColor = {read=FTextBkColor, write=SetTextBkColor, nodefault};
  551.     __property Classes::TAlignment TextAlignment = {read=FTextAlignment, write=SetTextAlignment, nodefault
  552.         };
  553.     __property FigType XLabelType = {read=RcXLabelType, write=SetXLabType, nodefault};
  554.     __property FigType YLabelType = {read=RcYLabelType, write=SetYLabType, nodefault};
  555.     __property System::AnsiString UserTickTextX = {read=FUserTickTextX, write=SetUserTickTextX, nodefault
  556.         };
  557.     __property System::AnsiString UserTickTextY = {read=FUserTickTextY, write=SetUserTickTextY, nodefault
  558.         };
  559.     __property TDTLabel* DTXFormat = {read=FDTXFormat, write=SetDTXFormat, nodefault};
  560.     __property TDTLabel* DTYFormat = {read=FDTYFormat, write=SetDTYFormat, nodefault};
  561.     __property OnClick ;
  562.     __property OnDblClick ;
  563.     __property OnMouseMove ;
  564.     __property OnMouseDown ;
  565.     __property OnMouseUp ;
  566.     __property TMouseMoveInChartEvent OnMouseMoveInChart = {read=FOnMMvInChart, write=FOnMMvInChart};
  567.     __property TZoomPanEvent OnZoomPan = {read=FOnZoomPan, write=FOnZoomPan};
  568. };
  569.  
  570. //-- var, const, procedure ---------------------------------------------------
  571. #define defLRim (Byte)(50)
  572. #define defRRim (Byte)(10)
  573. #define defTRim (Byte)(16)
  574. #define defBRim (Byte)(32)
  575. #define defShadowWidth (Byte)(0)
  576. #define defDataCol (int)(0)
  577. #define defScaleCol (int)(0)
  578. #define defFillCol (int)(12632256)
  579. #define defChartCol (int)(16777215)
  580. #define defWindCol (int)(-2147483633)
  581. #define defGridCol (int)(0)
  582. #define defLineWid (Byte)(1)
  583. #define defRCHeight (Byte)(160)
  584. #define defRCWidth (Byte)(240)
  585. extern double defBndLoX;
  586. extern double defBndLoY;
  587. extern double defBndHiX;
  588. extern double defBndHiY;
  589. #define defDecPlcX (Byte)(1)
  590. #define defDecPlcY (Byte)(1)
  591. #define defNXTick (Byte)(3)
  592. #define defNYTick (Byte)(3)
  593. #define MaxRCMarks (Byte)(25)
  594. #define MinRCWidth (Byte)(50)
  595. #define MinRCHeight (Byte)(10)
  596. #define MaxTickPos (Byte)(50)
  597. #define MaxZoomStack (Byte)(8)
  598. extern Extended RcMaxDouble;
  599. #define MaxCrossH (Byte)(4)
  600. extern TrcBakBMPEditor* rcBakBMPEditor;
  601. extern void __fastcall Register(void);
  602. //-- template instantiations -------------------------------------------------
  603. template class Graphics::TFontStyles ;
  604. template class SmallString<50> ;
  605. template class SmallString<15> ;
  606.  
  607. }    /* namespace Rchart */
  608. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  609. using namespace Rchart;
  610. #endif
  611. //-- end unit ----------------------------------------------------------------
  612. #endif    // RChart
  613.