/** * @file XTPChartBarSeriesView.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(__XTPCHARTBARSERIESVIEW_H__) # define __XTPCHARTBARSERIESVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; /** * @brief * This class represents the view of a bar series, which is a kind of * CXTPChartSeriesView. */ class _XTP_EXT_CLASS CXTPChartBarSeriesView : public CXTPChartDiagram2DSeriesView { public: /** * @brief * Constructs a CXTPChartBarSeriesView object. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. */ CXTPChartBarSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: /** * @brief * Call this function to create a view of the bar 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 * A pointer to CXTPChartSeriesPointView, which refers to the newly created * CXTPChartBarSeriesPointView object. */ CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * Call this function to calculate the layout of the bar series. * * @param pDC A pointer to the chart device context. */ void BeforeUpdateRange(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); protected: int m_nBarCount; /**< The bar count in the series.*/ int m_nBarIndex; /**< The index of the bar series.*/ BOOL m_bFirstStack; friend class CXTPChartBarSeriesPointView; }; /** * @brief * This class represents the view of a bar series point, which is a kind of * CXTPChartPointSeriesPointView. */ class _XTP_EXT_CLASS CXTPChartBarSeriesPointView : public CXTPChartSeriesPointView { public: /** * @brief * Constructs a CXTPChartBarSeriesPointView object. * * @param pPoint A pointer to the chart series point object. * @param pParentView Parent view pointer. */ CXTPChartBarSeriesPointView(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); public: virtual CXTPChartRectF GetScreenRect() const; public: /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of a bar series point. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns a CXTPChartDeviceCommand object. This object handles the * rendering of the bar series point. */ 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); }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTBARSERIESVIEW_H__) /** @endcond */