/** * @file XTPChartStepLineSeriesStyle.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPCHARTSTEPLINESERIESSTYLE_H__) # define __XTPCHARTSTEPLINESERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartStepLineStyle; /** * @brief * This class represents a StepLine series style, which is a kind of * CXTPChartLineSeriesStyle. * * @details * A Step Line chart or StepLine graph is a type of graph, which displays information * as a series of data points connected by straight Step Line segments. It is a * basic type of chart common in many fields. */ class _XTP_EXT_CLASS CXTPChartStepLineSeriesStyle : public CXTPChartLineSeriesStyle { /** @cond */ DECLARE_SERIAL(CXTPChartStepLineSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartStepLineSeriesStyle object. */ CXTPChartStepLineSeriesStyle(); /** * @brief * Destroys a CXTPChartStepLineSeriesStyle object, handles cleanup. */ virtual ~CXTPChartStepLineSeriesStyle(); public: /** * @brief * Gets inverted step flag. * * @return * Current inverted step flag value. */ BOOL GetInvertedStep() const; /** * @brief * Sets inverted step flag. * * @param bInvertedStep TRUE to invert step, otherwise FALSE. */ void SetInvertedStep(BOOL bInvertedStep); protected: /** * @brief * Call this function to create view of the StepLine series. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. * * @return * Returns a pointer to the associated series view object. */ virtual CXTPChartSeriesView* CreateView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); /** * @brief * Reads this object from or writes this object to an archive. * * @param pPX A CXTPPropExchange object to serialize to or from. */ void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartStepLineSeriesStyle); DECLARE_OLECREATE_EX(CXTPChartStepLineSeriesStyle) LPDISPATCH OleGetStepLineStyle(); /** @endcond */ # endif protected: BOOL m_bInvertedStep; }; /** * @brief * This class represents the view of a StepLine series, which is a kind of * CXTPChartSeriesView. */ class _XTP_EXT_CLASS CXTPChartStepLineSeriesView : public CXTPChartDiagram2DSeriesView { public: /** * @brief * Constructs a CXTPChartStepLineSeriesView object. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. */ CXTPChartStepLineSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: /** * @brief * Call this function to create a view of the StepLine series point. * * @param pDC A pointer to the chart device context. * @param pPoint A pointer to the chart series point object. * @param pParentView Parent view pointer. * * @return * Returns a pointer to the associated series point view object. */ CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of a StepLine series. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns a CXTPChartDeviceCommand object. This object handles * the rendering of an element in the chart. Here it handles * the drawing of the StepLine series. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a label view drawing command object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param rcBounds The rectangular boundary of the legend. * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds); }; /** * @brief * This class represents the view of a step line series point, which is a kind of * CXTPChartSeriesPointView. */ class _XTP_EXT_CLASS CXTPChartStepLineSeriesPointView : public CXTPChartPointSeriesPointView { public: /** * @brief * Constructs a point view object. * * @param pPoint Associated point object pointer. * @param pParentView Parent view object pointer. */ CXTPChartStepLineSeriesPointView(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); public: /** * @brief * This function creates a label view drawing command object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param rcBounds The rectangular boundary of the legend. * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds); }; AFX_INLINE BOOL CXTPChartStepLineSeriesStyle::GetInvertedStep() const { return m_bInvertedStep; } AFX_INLINE void CXTPChartStepLineSeriesStyle::SetInvertedStep(BOOL bInvertedStep) { m_bInvertedStep = bInvertedStep; OnChartChanged(); } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTSTEPLINESERIESSTYLE_H__) /** @endcond */