home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / VCFIMPRS.PAS < prev    next >
Pascal/Delphi Source File  |  1997-01-16  |  31KB  |  844 lines

  1. unit VCFImprs;
  2.  
  3. interface
  4.  
  5. uses Ole2, OleCtl, Classes, Graphics, OleCtrls;
  6.  
  7. const
  8.  
  9. { FontStyleConstants }
  10.  
  11.   VtFontStyleBold = 1;
  12.   VtFontStyleItalic = 2;
  13.   VtFontStyleOutline = 4;
  14.  
  15. { FontEffectsConstants }
  16.  
  17.   VtFontEffectStrikeThrough = 256;
  18.   VtFontEffectUnderline = 512;
  19.  
  20. { FrameStyleConstants }
  21.  
  22.   VtFrameStyleNull = 0;
  23.   VtFrameStyleSingleLine = 1;
  24.   VtFrameStyleDoubleLine = 2;
  25.   VtFrameStyleThickInner = 3;
  26.   VtFrameStyleThickOuter = 4;
  27.  
  28. { BrushStyleConstants }
  29.  
  30.   VtBrushStyleNull = 0;
  31.   VtBrushStyleSolid = 1;
  32.   VtBrushStylePattern = 2;
  33.   VtBrushStyleHatched = 3;
  34.  
  35. { LabelComponentConstants }
  36.  
  37.   VtChLabelComponentValue = 1;
  38.   VtChLabelComponentPercent = 2;
  39.   VtChLabelComponentSeriesName = 4;
  40.   VtChLabelComponentPointName = 8;
  41.  
  42. { BrushPatternConstants }
  43.  
  44.   VtBrushPattern94Percent = 0;
  45.   VtBrushPattern88Percent = 1;
  46.   VtBrushPattern75Percent = 2;
  47.   VtBrushPattern50Percent = 3;
  48.   VtBrushPattern25Percent = 4;
  49.   VtBrushPatternBoldHorizontal = 5;
  50.   VtBrushPatternBoldVertical = 6;
  51.   VtBrushPatternBoldDownDiagonal = 7;
  52.   VtBrushPatternBoldUpDiagonal = 8;
  53.   VtBrushPatternChecks = 9;
  54.   VtBrushPatternWeave = 10;
  55.   VtBrushPatternHorizontal = 11;
  56.   VtBrushPatternVertical = 12;
  57.   VtBrushPatternDownDiagonal = 13;
  58.   VtBrushPatternUpDiagonal = 14;
  59.   VtBrushPatternGrid = 15;
  60.   VtBrushPatternTrellis = 16;
  61.   VtBrushPatternInvertedTrellis = 17;
  62.  
  63. { BrushHatchConstants }
  64.  
  65.   VtBrushHatchHorizontal = 0;
  66.   VtBrushHatchVertical = 1;
  67.   VtBrushHatchDownDiagonal = 2;
  68.   VtBrushHatchUpDiagonal = 3;
  69.   VtBrushHatchCross = 4;
  70.   VtBrushHatchDiagonalCross = 5;
  71.  
  72. { ShadowStyleConstants }
  73.  
  74.   VtShadowStyleNull = 0;
  75.   VtShadowStyleDrop = 1;
  76.  
  77. { MouseFlagConstants }
  78.  
  79.   VtChMouseFlagShiftKeyDown = 4;
  80.   VtChMouseFlagControlKeyDown = 8;
  81.  
  82. { PenStyleConstants }
  83.  
  84.   VtPenStyleNull = 0;
  85.   VtPenStyleSolid = 1;
  86.   VtPenStyleDashed = 2;
  87.   VtPenStyleDotted = 3;
  88.   VtPenStyleDashDot = 4;
  89.   VtPenStyleDashDotDot = 5;
  90.   VtPenStyleDitted = 6;
  91.   VtPenStyleDashDit = 7;
  92.   VtPenStyleDashDitDit = 8;
  93.  
  94. { PenJoinConstants }
  95.  
  96.   VtPenJoinMiter = 0;
  97.   VtPenJoinRound = 1;
  98.   VtPenJoinBevel = 2;
  99.  
  100. { PenCapConstants }
  101.  
  102.   VtPenCapButt = 0;
  103.   VtPenCapRound = 1;
  104.   VtPenCapSquare = 2;
  105.  
  106. { GradientStyleConstants }
  107.  
  108.   VtGradientStyleHorizontal = 0;
  109.   VtGradientStyleVertical = 1;
  110.   VtGradientStyleRectangle = 2;
  111.   VtGradientStyleOval = 3;
  112.  
  113. { PictureTypeConstants }
  114.  
  115.   VtPictureTypeNull = 0;
  116.   VtPictureTypeBMP = 1;
  117.   VtPictureTypeWMF = 2;
  118.  
  119. { PictureOptionConstants }
  120.  
  121.   VtPictureOptionNoSizeHeader = 0;
  122.   VtPictureOptionTextAsCurves = 1;
  123.  
  124. { PictureMapTypeConstants }
  125.  
  126.   VtPictureMapTypeActual = 0;
  127.   VtPictureMapTypeFitted = 1;
  128.   VtPictureMapTypeStretched = 2;
  129.   VtPictureMapTypeTiled = 3;
  130.   VtPictureMapTypeCropFitted = 4;
  131.  
  132. { FillStyleConstants }
  133.  
  134.   VtFillStyleNull = 0;
  135.   VtFillStyleBrush = 1;
  136.   VtFillStyleGradient = 2;
  137.  
  138. { LocationTypeConstants }
  139.  
  140.   VtChLocationTypeTopLeft = 0;
  141.   VtChLocationTypeTop = 1;
  142.   VtChLocationTypeTopRight = 2;
  143.   VtChLocationTypeLeft = 3;
  144.   VtChLocationTypeRight = 4;
  145.   VtChLocationTypeBottomLeft = 5;
  146.   VtChLocationTypeBottom = 6;
  147.   VtChLocationTypeBottomRight = 7;
  148.   VtChLocationTypeCustom = 8;
  149.  
  150. { AxisIdConstants }
  151.  
  152.   VtChAxisIdX = 0;
  153.   VtChAxisIdY = 1;
  154.   VtChAxisIdY2 = 2;
  155.   VtChAxisIdZ = 3;
  156.  
  157. { AxisTickStyleConstants }
  158.  
  159.   VtChAxisTickStyleNone = 0;
  160.   VtChAxisTickStyleCenter = 1;
  161.   VtChAxisTickStyleInside = 2;
  162.   VtChAxisTickStyleOutside = 3;
  163.  
  164. { DateIntervalTypeConstants }
  165.  
  166.   VtChDateIntervalTypeNone = 0;
  167.   VtChDateIntervalTypeDaily = 1;
  168.   VtChDateIntervalTypeWeekly = 2;
  169.   VtChDateIntervalTypeSemimonthly = 3;
  170.   VtChDateIntervalTypeMonthly = 4;
  171.   VtChDateIntervalTypeYearly = 5;
  172.  
  173. { ScaleTypeConstants }
  174.  
  175.   VtChScaleTypeLinear = 0;
  176.   VtChScaleTypeLogarithmic = 1;
  177.   VtChScaleTypePercent = 2;
  178.  
  179. { PercentAxisBasisConstants }
  180.  
  181.   VtChPercentAxisBasisMaxChart = 0;
  182.   VtChPercentAxisBasisMaxRow = 1;
  183.   VtChPercentAxisBasisMaxColumn = 2;
  184.   VtChPercentAxisBasisSumChart = 3;
  185.   VtChPercentAxisBasisSumRow = 4;
  186.   VtChPercentAxisBasisSumColumn = 5;
  187.  
  188. { PieWeightBasisConstants }
  189.  
  190.   VtChPieWeightBasisNone = 0;
  191.   VtChPieWeightBasisTotal = 1;
  192.   VtChPieWeightBasisSeries = 2;
  193.  
  194. { PieWeightStyleConstants }
  195.  
  196.   VtChPieWeightStyleArea = 0;
  197.   VtChPieWeightStyleDiameter = 1;
  198.  
  199. { SortTypeConstants }
  200.  
  201.   VtSortTypeNone = 0;
  202.   VtSortTypeAscending = 1;
  203.   VtSortTypeDescending = 2;
  204.  
  205. { AngleUnitsConstants }
  206.  
  207.   VtAngleUnitsDegrees = 0;
  208.   VtAngleUnitsRadians = 1;
  209.   VtAngleUnitsGrads = 2;
  210.  
  211. { SubPlotLabelLocationTypeConstants }
  212.  
  213.   VtChSubPlotLabelLocationTypeNone = 0;
  214.   VtChSubPlotLabelLocationTypeAbove = 1;
  215.   VtChSubPlotLabelLocationTypeBelow = 2;
  216.   VtChSubPlotLabelLocationTypeCenter = 3;
  217.  
  218. { LabelLineStyleConstants }
  219.  
  220.   VtChLabelLineStyleNone = 0;
  221.   VtChLabelLineStyleStraight = 1;
  222.   VtChLabelLineStyleBent = 2;
  223.  
  224. { LabelLocationTypeConstants }
  225.  
  226.   VtChLabelLocationTypeNone = 0;
  227.   VtChLabelLocationTypeAbovePoint = 1;
  228.   VtChLabelLocationTypeBelowPoint = 2;
  229.   VtChLabelLocationTypeCenter = 3;
  230.   VtChLabelLocationTypeBase = 4;
  231.   VtChLabelLocationTypeInside = 5;
  232.   VtChLabelLocationTypeOutside = 6;
  233.   VtChLabelLocationTypeLeft = 7;
  234.   VtChLabelLocationTypeRight = 8;
  235.  
  236. { ContourColorTypeConstants }
  237.  
  238.   VtChContourColorTypeAutomatic = 0;
  239.   VtChContourColorTypeGradient = 1;
  240.   VtChContourColorTypeManual = 2;
  241.  
  242. { ContourDisplayTypeConstants }
  243.  
  244.   VtChContourDisplayTypeCBands = 0;
  245.   VtChContourDisplayTypeCLines = 1;
  246.  
  247. { SurfaceBaseTypeConstants }
  248.  
  249.   VtChSurfaceBaseTypePedestal = 0;
  250.   VtChSurfaceBaseTypeStandard = 1;
  251.   VtChSurfaceBaseTypeStandardWithCBands = 2;
  252.   VtChSurfaceBaseTypeStandardWithCLines = 3;
  253.  
  254. { SurfaceDisplayTypeConstants }
  255.  
  256.   VtChSurfaceDisplayTypeNone = 0;
  257.   VtChSurfaceDisplayTypeCBands = 1;
  258.   VtChSurfaceDisplayTypeCLines = 2;
  259.   VtChSurfaceDisplayTypeSolid = 3;
  260.   VtChSurfaceDisplayTypeSolidWithCLines = 4;
  261.  
  262. { SurfaceProjectionTypeConstants }
  263.  
  264.   VtChSurfaceProjectionTypeNone = 0;
  265.   VtChSurfaceProjectionTypeCBands = 1;
  266.   VtChSurfaceProjectionTypeCLines = 2;
  267.  
  268. { SurfaceWireframeTypeConstants }
  269.  
  270.   VtChSurfaceWireframeTypeNone = 0;
  271.   VtChSurfaceWireframeTypeMajor = 1;
  272.   VtChSurfaceWireframeTypeMajorAndMinor = 2;
  273.  
  274. { MarkerStyleConstants }
  275.  
  276.   VtMarkerStyleDash = 0;
  277.   VtMarkerStylePlus = 1;
  278.   VtMarkerStyleX = 2;
  279.   VtMarkerStyleStar = 3;
  280.   VtMarkerStyleCircle = 4;
  281.   VtMarkerStyleSquare = 5;
  282.   VtMarkerStyleDiamond = 6;
  283.   VtMarkerStyleUpTriangle = 7;
  284.   VtMarkerStyleDownTriangle = 8;
  285.   VtMarkerStyleFilledCircle = 9;
  286.   VtMarkerStyleFilledSquare = 10;
  287.   VtMarkerStyleFilledDiamond = 11;
  288.   VtMarkerStyleFilledUpTriangle = 12;
  289.   VtMarkerStyleFilledDownTriangle = 13;
  290.   VtMarkerStyle3dBall = 14;
  291.  
  292. { ProjectionTypeConstants }
  293.  
  294.   VtProjectionTypePerspective = 0;
  295.   VtProjectionTypeOblique = 1;
  296.   VtProjectionTypeOrthogonal = 2;
  297.  
  298. { SmoothingTypeConstants }
  299.  
  300.   VtSmoothingTypeNone = 0;
  301.   VtSmoothingTypeQuadraticBSpline = 1;
  302.   VtSmoothingTypeCubicBSpline = 2;
  303.  
  304. { HorizontalAlignmentConstants }
  305.  
  306.   VtHorizontalAlignmentLeft = 0;
  307.   VtHorizontalAlignmentRight = 1;
  308.   VtHorizontalAlignmentCenter = 2;
  309.  
  310. { VerticalAlignmentConstants }
  311.  
  312.   VtVerticalAlignmentTop = 0;
  313.   VtVerticalAlignmentBottom = 1;
  314.   VtVerticalAlignmentCenter = 2;
  315.  
  316. { OrientationConstants }
  317.  
  318.   VtOrientationHorizontal = 0;
  319.   VtOrientationVertical = 1;
  320.   VtOrientationUp = 2;
  321.   VtOrientationDown = 3;
  322.  
  323. { DcTypeConstants }
  324.  
  325.   VtDcTypeNull = 0;
  326.   VtDcTypeDisplay = 1;
  327.   VtDcTypePrinter = 2;
  328.   VtDcTypeMetafile = 3;
  329.  
  330. { PrintScaleTypeConstants }
  331.  
  332.   VtPrintScaleTypeActual = 0;
  333.   VtPrintScaleTypeFitted = 1;
  334.   VtPrintScaleTypeStretched = 2;
  335.  
  336. { StatTypeConstants }
  337.  
  338.   VtChStatsMinimum = 1;
  339.   VtChStatsMaximum = 2;
  340.   VtChStatsMean = 4;
  341.   VtChStatsStddev = 8;
  342.   VtChStatsRegression = 16;
  343.  
  344. { PrintOrientationTypeConstants }
  345.  
  346.   VtPrintOrientationPortrait = 0;
  347.   VtPrintOrientationLandscape = 1;
  348.  
  349. { TextOutputTypeConstants }
  350.  
  351.   VtTextOutputTypeHardware = 0;
  352.   VtTextOutputTypePolygon = 1;
  353.  
  354. { TextLengthTypeConstants }
  355.  
  356.   VtTextLengthTypeVirtual = 0;
  357.   VtTextLengthTypeDevice = 1;
  358.  
  359. { PartTypeConstants }
  360.  
  361.   VtChPartTypeChart = 0;
  362.   VtChPartTypeTitle = 1;
  363.   VtChPartTypeFootnote = 2;
  364.   VtChPartTypeLegend = 3;
  365.   VtChPartTypePlot = 4;
  366.   VtChPartTypeSeries = 5;
  367.   VtChPartTypeSeriesLabel = 6;
  368.   VtChPartTypePoint = 7;
  369.   VtChPartTypePointLabel = 8;
  370.   VtChPartTypeAxis = 9;
  371.   VtChPartTypeAxisLabel = 10;
  372.   VtChPartTypeAxisTitle = 11;
  373.  
  374. { DrawModeConstants }
  375.  
  376.   VtChDrawModeDraw = 0;
  377.   VtChDrawModeBlit = 1;
  378.  
  379. { SsLinkModeConstants }
  380.  
  381.   VtChSsLinkModeOff = 0;
  382.   VtChSsLinkModeOn = 1;
  383.   VtChSsLinkModeAutoParse = 2;
  384.  
  385. { SeriesTypeConstants }
  386.  
  387.   VtChSeriesTypeDefault = -1;
  388.   VtChSeriesType3dBar = 0;
  389.   VtChSeriesType2dBar = 1;
  390.   VtChSeriesType3dHorizontalBar = 2;
  391.   VtChSeriesType2dHorizontalBar = 3;
  392.   VtChSeriesType3dClusteredBar = 4;
  393.   VtChSeriesType3dLine = 5;
  394.   VtChSeriesType2dLine = 6;
  395.   VtChSeriesType3dArea = 7;
  396.   VtChSeriesType2dArea = 8;
  397.   VtChSeriesType3dStep = 9;
  398.   VtChSeriesType2dStep = 10;
  399.   VtChSeriesType2dXY = 11;
  400.   VtChSeriesType2dPolar = 12;
  401.   VtChSeriesType2dRadarLine = 13;
  402.   VtChSeriesType2dRadarArea = 14;
  403.   VtChSeriesType2dBubble = 15;
  404.   VtChSeriesType2dHiLo = 16;
  405.   VtChSeriesType2dHLC = 17;
  406.   VtChSeriesType2dHLCRight = 18;
  407.   VtChSeriesType2dOHLC = 19;
  408.   VtChSeriesType2dOHLCBar = 20;
  409.   VtChSeriesType2dGantt = 21;
  410.   VtChSeriesType3dGantt = 22;
  411.   VtChSeriesType3dPie = 23;
  412.   VtChSeriesType2dPie = 24;
  413.   VtChSeriesType3dDoughnut = 25;
  414.   VtChSeriesType2dDates = 26;
  415.   VtChSeriesType3dBarHiLo = 27;
  416.   VtChSeriesType2dBarHiLo = 28;
  417.   VtChSeriesType3dHorizontalBarHiLo = 29;
  418.   VtChSeriesType2dHorizontalBarHiLo = 30;
  419.   VtChSeriesType3dClusteredBarHiLo = 31;
  420.   VtChSeriesType3dSurface = 32;
  421.   VtChSeriesType2dContour = 33;
  422.   VtChSeriesType3dXYZ = 34;
  423.  
  424. { ChartTypeConstants }
  425.  
  426.   VtChChartType3dBar = 0;
  427.   VtChChartType2dBar = 1;
  428.   VtChChartType3dLine = 2;
  429.   VtChChartType2dLine = 3;
  430.   VtChChartType3dArea = 4;
  431.   VtChChartType2dArea = 5;
  432.   VtChChartType3dStep = 6;
  433.   VtChChartType2dStep = 7;
  434.   VtChChartType3dCombination = 8;
  435.   VtChChartType2dCombination = 9;
  436.   VtChChartType3dHorizontalBar = 10;
  437.   VtChChartType2dHorizontalBar = 11;
  438.   VtChChartType3dClusteredBar = 12;
  439.   VtChChartType3dPie = 13;
  440.   VtChChartType2dPie = 14;
  441.   VtChChartType3dDoughnut = 15;
  442.   VtChChartType2dXY = 16;
  443.   VtChChartType2dPolar = 17;
  444.   VtChChartType2dRadar = 18;
  445.   VtChChartType2dBubble = 19;
  446.   VtChChartType2dHiLo = 20;
  447.   VtChChartType2dGantt = 21;
  448.   VtChChartType3dGantt = 22;
  449.   VtChChartType3dSurface = 23;
  450.   VtChChartType2dContour = 24;
  451.   VtChChartType3dScatter = 25;
  452.   VtChChartType3dXYZ = 26;
  453.  
  454. type
  455.  
  456.   TVCFirstImpressionChartSelected = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  457.   TVCFirstImpressionTitleSelected = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  458.   TVCFirstImpressionFootnoteSelected = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  459.   TVCFirstImpressionLegendSelected = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  460.   TVCFirstImpressionPlotSelected = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  461.   TVCFirstImpressionAxisSelected = procedure(Sender: TObject; var AxisId, AxisIndex, MouseFlags, Cancel: Smallint) of object;
  462.   TVCFirstImpressionAxisLabelSelected = procedure(Sender: TObject; var AxisId, AxisIndex, labelSetIndex, LabelIndex, MouseFlags, Cancel: Smallint) of object;
  463.   TVCFirstImpressionAxisTitleSelected = procedure(Sender: TObject; var AxisId, AxisIndex, MouseFlags, Cancel: Smallint) of object;
  464.   TVCFirstImpressionPointSelected = procedure(Sender: TObject; var Series, DataPoint, MouseFlags, Cancel: Smallint) of object;
  465.   TVCFirstImpressionPointLabelSelected = procedure(Sender: TObject; var Series, DataPoint, MouseFlags, Cancel: Smallint) of object;
  466.   TVCFirstImpressionSeriesSelected = procedure(Sender: TObject; var Series, MouseFlags, Cancel: Smallint) of object;
  467.   TVCFirstImpressionSeriesLabelSelected = procedure(Sender: TObject; var Series, MouseFlags, Cancel: Smallint) of object;
  468.   TVCFirstImpressionChartActivated = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  469.   TVCFirstImpressionTitleActivated = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  470.   TVCFirstImpressionFootnoteActivated = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  471.   TVCFirstImpressionLegendActivated = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  472.   TVCFirstImpressionPlotActivated = procedure(Sender: TObject; var MouseFlags, Cancel: Smallint) of object;
  473.   TVCFirstImpressionAxisActivated = procedure(Sender: TObject; var AxisId, AxisIndex, MouseFlags, Cancel: Smallint) of object;
  474.   TVCFirstImpressionAxisLabelActivated = procedure(Sender: TObject; var AxisId, AxisIndex, labelSetIndex, LabelIndex, MouseFlags, Cancel: Smallint) of object;
  475.   TVCFirstImpressionAxisTitleActivated = procedure(Sender: TObject; var AxisId, AxisIndex, MouseFlags, Cancel: Smallint) of object;
  476.   TVCFirstImpressionPointActivated = procedure(Sender: TObject; var Series, DataPoint, MouseFlags, Cancel: Smallint) of object;
  477.   TVCFirstImpressionPointLabelActivated = procedure(Sender: TObject; var Series, DataPoint, MouseFlags, Cancel: Smallint) of object;
  478.   TVCFirstImpressionSeriesActivated = procedure(Sender: TObject; var Series, MouseFlags, Cancel: Smallint) of object;
  479.   TVCFirstImpressionSeriesLabelActivated = procedure(Sender: TObject; var Series, MouseFlags, Cancel: Smallint) of object;
  480.  
  481.   TVCFirstImpression = class(TOleControl)
  482.   private
  483.     FOnChartSelected: TVCFirstImpressionChartSelected;
  484.     FOnTitleSelected: TVCFirstImpressionTitleSelected;
  485.     FOnFootnoteSelected: TVCFirstImpressionFootnoteSelected;
  486.     FOnLegendSelected: TVCFirstImpressionLegendSelected;
  487.     FOnPlotSelected: TVCFirstImpressionPlotSelected;
  488.     FOnAxisSelected: TVCFirstImpressionAxisSelected;
  489.     FOnAxisLabelSelected: TVCFirstImpressionAxisLabelSelected;
  490.     FOnAxisTitleSelected: TVCFirstImpressionAxisTitleSelected;
  491.     FOnPointSelected: TVCFirstImpressionPointSelected;
  492.     FOnPointLabelSelected: TVCFirstImpressionPointLabelSelected;
  493.     FOnSeriesSelected: TVCFirstImpressionSeriesSelected;
  494.     FOnSeriesLabelSelected: TVCFirstImpressionSeriesLabelSelected;
  495.     FOnChartActivated: TVCFirstImpressionChartActivated;
  496.     FOnTitleActivated: TVCFirstImpressionTitleActivated;
  497.     FOnFootnoteActivated: TVCFirstImpressionFootnoteActivated;
  498.     FOnLegendActivated: TVCFirstImpressionLegendActivated;
  499.     FOnPlotActivated: TVCFirstImpressionPlotActivated;
  500.     FOnAxisActivated: TVCFirstImpressionAxisActivated;
  501.     FOnAxisLabelActivated: TVCFirstImpressionAxisLabelActivated;
  502.     FOnAxisTitleActivated: TVCFirstImpressionAxisTitleActivated;
  503.     FOnPointActivated: TVCFirstImpressionPointActivated;
  504.     FOnPointLabelActivated: TVCFirstImpressionPointLabelActivated;
  505.     FOnSeriesActivated: TVCFirstImpressionSeriesActivated;
  506.     FOnSeriesLabelActivated: TVCFirstImpressionSeriesLabelActivated;
  507.     FOnApplyChanges: TNotifyEvent;
  508.     function Get_GetBitmap(const options: Variant): Integer; stdcall;
  509.   protected
  510.     procedure InitControlData; override;
  511.   public
  512.     procedure EditPaste; stdcall;
  513.     procedure EditCopy; stdcall;
  514.     procedure ActivateSelectionDialog; stdcall;
  515.     procedure Layout; stdcall;
  516.     procedure ToDefaults; stdcall;
  517.     procedure PrintSetupDialog; stdcall;
  518.     procedure PrintChart; stdcall;
  519.     procedure SelectPart(part, index1, index2, index3, index4: Smallint); stdcall;
  520.     procedure GetSelectedPart(var part, index1, index2, index3, index4: Smallint); stdcall;
  521.     procedure GetDLLVersion(var major, minor: Smallint); stdcall;
  522.     procedure TwipsToChartPart(xVal, yVal: Integer; var part, index1, index2, index3, index4: Smallint); stdcall;
  523.     procedure ReadFromFile(const FileName: string); stdcall;
  524.     procedure WritePictureToFile(const FileName: string; pictureType, options: Smallint); stdcall;
  525.     procedure WriteToFile(const FileName: string); stdcall;
  526.     procedure ActivateFormatMenu(X, Y: Integer); stdcall;
  527.     procedure GetMetafile(options: Smallint; var Handle, Width, Height: Integer); stdcall;
  528.     procedure CopyDataFromArray(Top, Left, Bottom, Right: Smallint; const Array_: Variant); stdcall;
  529.     procedure CopyDataToArray(Top, Left, Bottom, Right: Smallint; const Array_: Variant); stdcall;
  530.     procedure Draw(hDC: Integer; hDCType: Smallint; Top, Left, Bottom, Right: Integer; Layout, Stretch: TOleBool); stdcall;
  531.     procedure UseWizard; stdcall;
  532.     procedure EditChartData; stdcall;
  533.     procedure Refresh; stdcall;
  534.     procedure AboutBox; stdcall;
  535.     property SsLinkSheet: string index 22 read GetStringProp write SetStringProp;
  536.     property Handle: Integer index 24 read GetIntegerProp;
  537.     property Picture: Variant index 25 read GetVariantProp;
  538.     property GetBitmap[const options: Variant]: Integer read Get_GetBitmap;
  539.   published
  540.     property TabStop;
  541.     property DragCursor;
  542.     property DragMode;
  543.     property ParentShowHint;
  544.     property PopupMenu;
  545.     property ShowHint;
  546.     property TabOrder;
  547.     property Visible;
  548.     property OnDragDrop;
  549.     property OnDragOver;
  550.     property OnEndDrag;
  551.     property OnEnter;
  552.     property OnExit;
  553.     property OnStartDrag;
  554.     property OnClick;
  555.     property OnDblClick;
  556.     property OnKeyDown;
  557.     property OnKeyPress;
  558.     property OnKeyUp;
  559.     property OnMouseDown;
  560.     property OnMouseMove;
  561.     property OnMouseUp;
  562.     property AutoIncrement: TOleBool index 1 read GetOleBoolProp write SetOleBoolProp stored False;
  563.     property RandomFill: TOleBool index 2 read GetOleBoolProp write SetOleBoolProp stored False;
  564.     property ChartType: Smallint index 3 read GetSmallintProp write SetSmallintProp stored False;
  565.     property Column: Smallint index 4 read GetSmallintProp write SetSmallintProp stored False;
  566.     property ColumnCount: Smallint index 5 read GetSmallintProp write SetSmallintProp stored False;
  567.     property ColumnLabel: string index 6 read GetStringProp write SetStringProp stored False;
  568.     property ColumnLabelCount: Smallint index 7 read GetSmallintProp write SetSmallintProp stored False;
  569.     property ColumnLabelIndex: Smallint index 8 read GetSmallintProp write SetSmallintProp stored False;
  570.     property Data: string index 9 read GetStringProp write SetStringProp stored False;
  571.     property FootnoteText: string index 10 read GetStringProp write SetStringProp stored False;
  572.     property Repaint: TOleBool index 11 read GetOleBoolProp write SetOleBoolProp stored False;
  573.     property Row: Smallint index 12 read GetSmallintProp write SetSmallintProp stored False;
  574.     property RowCount: Smallint index 13 read GetSmallintProp write SetSmallintProp stored False;
  575.     property RowLabel: string index 14 read GetStringProp write SetStringProp stored False;
  576.     property RowLabelCount: Smallint index 15 read GetSmallintProp write SetSmallintProp stored False;
  577.     property RowLabelIndex: Smallint index 16 read GetSmallintProp write SetSmallintProp stored False;
  578.     property SeriesColumn: Smallint index 17 read GetSmallintProp write SetSmallintProp stored False;
  579.     property SeriesType: Smallint index 18 read GetSmallintProp write SetSmallintProp stored False;
  580.     property ShowLegend: TOleBool index 19 read GetOleBoolProp write SetOleBoolProp stored False;
  581.     property SsLinkMode: Smallint index 20 read GetSmallintProp write SetSmallintProp stored False;
  582.     property SsLinkRange: string index 21 read GetStringProp write SetStringProp stored False;
  583.     property DrawMode: Smallint index 23 read GetSmallintProp write SetSmallintProp stored False;
  584.     property BorderStyle: Smallint index -504 read GetSmallintProp write SetSmallintProp stored False;
  585.     property Enabled: TOleBool index -514 read GetOleBoolProp write SetOleBoolProp stored False;
  586.     property hWnd: Smallint index -515 read GetSmallintProp write SetSmallintProp stored False;
  587.     property Title: Variant index 26 read GetVariantProp write SetVariantProp stored False;
  588.     property Footnote: Variant index 27 read GetVariantProp write SetVariantProp stored False;
  589.     property TitleText: string index 28 read GetStringProp write SetStringProp stored False;
  590.     property Stacking: TOleBool index 29 read GetOleBoolProp write SetOleBoolProp stored False;
  591.     property TextLengthType: Smallint index 30 read GetSmallintProp write SetSmallintProp stored False;
  592.     property AllowUserChanges: TOleBool index 31 read GetOleBoolProp write SetOleBoolProp stored False;
  593.     property AllowSelections: TOleBool index 32 read GetOleBoolProp write SetOleBoolProp stored False;
  594.     property AllowSeriesSelection: TOleBool index 33 read GetOleBoolProp write SetOleBoolProp stored False;
  595.     property AllowDynamicRotation: TOleBool index 34 read GetOleBoolProp write SetOleBoolProp stored False;
  596.     property ActiveSeriesCount: Smallint index 35 read GetSmallintProp write SetSmallintProp stored False;
  597.     property Backdrop: Variant index 36 read GetVariantProp write SetVariantProp stored False;
  598.     property PrintInformation: Variant index 37 read GetVariantProp write SetVariantProp stored False;
  599.     property Legend: Variant index 38 read GetVariantProp write SetVariantProp stored False;
  600.     property DataGrid: Variant index 39 read GetVariantProp write SetVariantProp stored False;
  601.     property Plot: Variant index 40 read GetVariantProp write SetVariantProp stored False;
  602.     property TwipsWidth: Integer index 41 read GetIntegerProp write SetIntegerProp stored False;
  603.     property TwipsHeight: Integer index 42 read GetIntegerProp write SetIntegerProp stored False;
  604.     property AllowDithering: TOleBool index 43 read GetOleBoolProp write SetOleBoolProp stored False;
  605.     property ErrorOffset: Smallint index 44 read GetSmallintProp write SetSmallintProp stored False;
  606.     property DoSetCursor: TOleBool index 45 read GetOleBoolProp write SetOleBoolProp stored False;
  607.     property FileName: string index 46 read GetStringProp write SetStringProp stored False;
  608.     property Chart3d: TOleBool index 47 read GetOleBoolProp write SetOleBoolProp stored False;
  609.     property SsLinkBook: string index 48 read GetStringProp write SetStringProp stored False;
  610.     property OnChartSelected: TVCFirstImpressionChartSelected read FOnChartSelected write FOnChartSelected;
  611.     property OnTitleSelected: TVCFirstImpressionTitleSelected read FOnTitleSelected write FOnTitleSelected;
  612.     property OnFootnoteSelected: TVCFirstImpressionFootnoteSelected read FOnFootnoteSelected write FOnFootnoteSelected;
  613.     property OnLegendSelected: TVCFirstImpressionLegendSelected read FOnLegendSelected write FOnLegendSelected;
  614.     property OnPlotSelected: TVCFirstImpressionPlotSelected read FOnPlotSelected write FOnPlotSelected;
  615.     property OnAxisSelected: TVCFirstImpressionAxisSelected read FOnAxisSelected write FOnAxisSelected;
  616.     property OnAxisLabelSelected: TVCFirstImpressionAxisLabelSelected read FOnAxisLabelSelected write FOnAxisLabelSelected;
  617.     property OnAxisTitleSelected: TVCFirstImpressionAxisTitleSelected read FOnAxisTitleSelected write FOnAxisTitleSelected;
  618.     property OnPointSelected: TVCFirstImpressionPointSelected read FOnPointSelected write FOnPointSelected;
  619.     property OnPointLabelSelected: TVCFirstImpressionPointLabelSelected read FOnPointLabelSelected write FOnPointLabelSelected;
  620.     property OnSeriesSelected: TVCFirstImpressionSeriesSelected read FOnSeriesSelected write FOnSeriesSelected;
  621.     property OnSeriesLabelSelected: TVCFirstImpressionSeriesLabelSelected read FOnSeriesLabelSelected write FOnSeriesLabelSelected;
  622.     property OnChartActivated: TVCFirstImpressionChartActivated read FOnChartActivated write FOnChartActivated;
  623.     property OnTitleActivated: TVCFirstImpressionTitleActivated read FOnTitleActivated write FOnTitleActivated;
  624.     property OnFootnoteActivated: TVCFirstImpressionFootnoteActivated read FOnFootnoteActivated write FOnFootnoteActivated;
  625.     property OnLegendActivated: TVCFirstImpressionLegendActivated read FOnLegendActivated write FOnLegendActivated;
  626.     property OnPlotActivated: TVCFirstImpressionPlotActivated read FOnPlotActivated write FOnPlotActivated;
  627.     property OnAxisActivated: TVCFirstImpressionAxisActivated read FOnAxisActivated write FOnAxisActivated;
  628.     property OnAxisLabelActivated: TVCFirstImpressionAxisLabelActivated read FOnAxisLabelActivated write FOnAxisLabelActivated;
  629.     property OnAxisTitleActivated: TVCFirstImpressionAxisTitleActivated read FOnAxisTitleActivated write FOnAxisTitleActivated;
  630.     property OnPointActivated: TVCFirstImpressionPointActivated read FOnPointActivated write FOnPointActivated;
  631.     property OnPointLabelActivated: TVCFirstImpressionPointLabelActivated read FOnPointLabelActivated write FOnPointLabelActivated;
  632.     property OnSeriesActivated: TVCFirstImpressionSeriesActivated read FOnSeriesActivated write FOnSeriesActivated;
  633.     property OnSeriesLabelActivated: TVCFirstImpressionSeriesLabelActivated read FOnSeriesLabelActivated write FOnSeriesLabelActivated;
  634.     property OnApplyChanges: TNotifyEvent read FOnApplyChanges write FOnApplyChanges;
  635.   end;
  636.  
  637. procedure Register;
  638.  
  639. implementation
  640.  
  641. {$J+}
  642.  
  643. procedure TVCFirstImpression.InitControlData;
  644. const
  645.   CEventDispIDs: array[0..24] of Integer = (
  646.     $00000001, $00000002, $00000003, $00000004, $00000005, $00000006,
  647.     $00000007, $00000008, $00000009, $0000000A, $0000000B, $0000000C,
  648.     $0000000D, $0000000E, $0000000F, $00000010, $00000011, $00000012,
  649.     $00000013, $00000014, $00000015, $00000016, $00000017, $00000018,
  650.     $00000019);
  651.   CLicenseKey: array[0..42] of Word = (
  652.     $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020,
  653.     $0028, $0063, $0029, $0020, $0031, $0039, $0039, $0035, $0020, $0056,
  654.     $0069, $0073, $0075, $0061, $006C, $0020, $0043, $006F, $006D, $0070,
  655.     $006F, $006E, $0065, $006E, $0074, $0073, $002C, $0020, $0049, $006E,
  656.     $0063, $002E, $0000);
  657.   CControlData: TControlData = (
  658.     ClassID: (
  659.       D1:$5A721580;D2:$5AF0;D3:$11CE;D4:($83,$84,$00,$20,$AF,$23,$37,$F2));
  660.     EventIID: (
  661.       D1:$5A721582;D2:$5AF0;D3:$11CE;D4:($83,$84,$00,$20,$AF,$23,$37,$F2));
  662.     EventCount: 25;
  663.     EventDispIDs: @CEventDispIDs;
  664.     LicenseKey: @CLicenseKey;
  665.     Flags: $00000008);
  666. begin
  667.   ControlData := @CControlData;
  668. end;
  669.  
  670. procedure TVCFirstImpression.EditPaste;
  671. const
  672.   DispInfo: array[0..7] of Byte = ($31,$00,$00,$00,$00,$01,$00,$00);
  673. begin
  674.   InvokeMethod(DispInfo, nil);
  675. end;
  676.  
  677. procedure TVCFirstImpression.EditCopy;
  678. const
  679.   DispInfo: array[0..7] of Byte = ($32,$00,$00,$00,$00,$01,$00,$00);
  680. begin
  681.   InvokeMethod(DispInfo, nil);
  682. end;
  683.  
  684. procedure TVCFirstImpression.ActivateSelectionDialog;
  685. const
  686.   DispInfo: array[0..7] of Byte = ($33,$00,$00,$00,$00,$01,$00,$00);
  687. begin
  688.   InvokeMethod(DispInfo, nil);
  689. end;
  690.  
  691. procedure TVCFirstImpression.Layout;
  692. const
  693.   DispInfo: array[0..7] of Byte = ($34,$00,$00,$00,$00,$01,$00,$00);
  694. begin
  695.   InvokeMethod(DispInfo, nil);
  696. end;
  697.  
  698. procedure TVCFirstImpression.ToDefaults;
  699. const
  700.   DispInfo: array[0..7] of Byte = ($35,$00,$00,$00,$00,$01,$00,$00);
  701. begin
  702.   InvokeMethod(DispInfo, nil);
  703. end;
  704.  
  705. procedure TVCFirstImpression.PrintSetupDialog;
  706. const
  707.   DispInfo: array[0..7] of Byte = ($36,$00,$00,$00,$00,$01,$00,$00);
  708. begin
  709.   InvokeMethod(DispInfo, nil);
  710. end;
  711.  
  712. procedure TVCFirstImpression.PrintChart;
  713. const
  714.   DispInfo: array[0..7] of Byte = ($37,$00,$00,$00,$00,$01,$00,$00);
  715. begin
  716.   InvokeMethod(DispInfo, nil);
  717. end;
  718.  
  719. procedure TVCFirstImpression.SelectPart;
  720. const
  721.   DispInfo: array[0..12] of Byte = ($38,$00,$00,$00,$00,$01,$05,$00,$02,$02,$02,$02,$02);
  722. begin
  723.   InvokeMethod(DispInfo, nil);
  724. end;
  725.  
  726. procedure TVCFirstImpression.GetSelectedPart;
  727. const
  728.   DispInfo: array[0..12] of Byte = ($39,$00,$00,$00,$00,$01,$05,$00,$82,$82,$82,$82,$82);
  729. begin
  730.   InvokeMethod(DispInfo, nil);
  731. end;
  732.  
  733. procedure TVCFirstImpression.GetDLLVersion;
  734. const
  735.   DispInfo: array[0..9] of Byte = ($3A,$00,$00,$00,$00,$01,$02,$00,$82,$82);
  736. begin
  737.   InvokeMethod(DispInfo, nil);
  738. end;
  739.  
  740. procedure TVCFirstImpression.TwipsToChartPart;
  741. const
  742.   DispInfo: array[0..14] of Byte = ($3B,$00,$00,$00,$00,$01,$07,$00,$03,$03,$82,$82,$82,$82,$82);
  743. begin
  744.   InvokeMethod(DispInfo, nil);
  745. end;
  746.  
  747. procedure TVCFirstImpression.ReadFromFile;
  748. const
  749.   DispInfo: array[0..8] of Byte = ($3C,$00,$00,$00,$00,$01,$01,$00,$08);
  750. begin
  751.   InvokeMethod(DispInfo, nil);
  752. end;
  753.  
  754. procedure TVCFirstImpression.WritePictureToFile;
  755. const
  756.   DispInfo: array[0..10] of Byte = ($3D,$00,$00,$00,$00,$01,$03,$00,$08,$02,$02);
  757. begin
  758.   InvokeMethod(DispInfo, nil);
  759. end;
  760.  
  761. procedure TVCFirstImpression.WriteToFile;
  762. const
  763.   DispInfo: array[0..8] of Byte = ($3E,$00,$00,$00,$00,$01,$01,$00,$08);
  764. begin
  765.   InvokeMethod(DispInfo, nil);
  766. end;
  767.  
  768. procedure TVCFirstImpression.ActivateFormatMenu;
  769. const
  770.   DispInfo: array[0..9] of Byte = ($3F,$00,$00,$00,$00,$01,$02,$00,$03,$03);
  771. begin
  772.   InvokeMethod(DispInfo, nil);
  773. end;
  774.  
  775. procedure TVCFirstImpression.GetMetafile;
  776. const
  777.   DispInfo: array[0..11] of Byte = ($40,$00,$00,$00,$00,$01,$04,$00,$02,$83,$83,$83);
  778. begin
  779.   InvokeMethod(DispInfo, nil);
  780. end;
  781.  
  782. procedure TVCFirstImpression.CopyDataFromArray;
  783. const
  784.   DispInfo: array[0..12] of Byte = ($41,$00,$00,$00,$00,$01,$05,$00,$02,$02,$02,$02,$0C);
  785. begin
  786.   InvokeMethod(DispInfo, nil);
  787. end;
  788.  
  789. procedure TVCFirstImpression.CopyDataToArray;
  790. const
  791.   DispInfo: array[0..12] of Byte = ($42,$00,$00,$00,$00,$01,$05,$00,$02,$02,$02,$02,$0C);
  792. begin
  793.   InvokeMethod(DispInfo, nil);
  794. end;
  795.  
  796. procedure TVCFirstImpression.Draw;
  797. const
  798.   DispInfo: array[0..15] of Byte = ($43,$00,$00,$00,$00,$01,$08,$00,$03,$02,$03,$03,$03,$03,$0B,$0B);
  799. begin
  800.   InvokeMethod(DispInfo, nil);
  801. end;
  802.  
  803. procedure TVCFirstImpression.UseWizard;
  804. const
  805.   DispInfo: array[0..7] of Byte = ($44,$00,$00,$00,$00,$01,$00,$00);
  806. begin
  807.   InvokeMethod(DispInfo, nil);
  808. end;
  809.  
  810. procedure TVCFirstImpression.EditChartData;
  811. const
  812.   DispInfo: array[0..7] of Byte = ($45,$00,$00,$00,$00,$01,$00,$00);
  813. begin
  814.   InvokeMethod(DispInfo, nil);
  815. end;
  816.  
  817. procedure TVCFirstImpression.Refresh;
  818. const
  819.   DispInfo: array[0..7] of Byte = ($DA,$FD,$FF,$FF,$00,$01,$00,$00);
  820. begin
  821.   InvokeMethod(DispInfo, nil);
  822. end;
  823.  
  824. procedure TVCFirstImpression.AboutBox;
  825. const
  826.   DispInfo: array[0..7] of Byte = ($D8,$FD,$FF,$FF,$00,$01,$00,$00);
  827. begin
  828.   InvokeMethod(DispInfo, nil);
  829. end;
  830.  
  831. function TVCFirstImpression.Get_GetBitmap;
  832. const
  833.   DispInfo: array[0..8] of Byte = ($46,$00,$00,$00,$03,$02,$01,$00,$0C);
  834. begin
  835.   InvokeMethod(DispInfo, @Result);
  836. end;
  837.  
  838. procedure Register;
  839. begin
  840.   RegisterComponents('ActiveX', [TVCFirstImpression]);
  841. end;
  842.  
  843. end.
  844.