/** * @file XTPChartPyramidSeriesViewBase.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(__XTPCHARTPYRAMIDSERIESVIEWBASE_H__) # define __XTPCHARTPYRAMIDSERIESVIEWBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartDeviceCommand; class CXTPChartSeriesPointView; class CXTPChartElementView; class CXTPChartSeriesPoint; class CXTPChartDeviceContext; class CXTPChartSeries; class CXTPChartDiagramView; class CXTPChartDiagramDomain; /** * @brief * This class abstracts the view of a pyramid series. */ class _XTP_EXT_CLASS CXTPChartPyramidSeriesViewBase : public CXTPChartSeriesView { DECLARE_DYNAMIC(CXTPChartPyramidSeriesViewBase); public: /** * @brief * Constructs a CXTPChartPyramidSeriesViewBase object. * * @param pSeries Pointer to the pyramid series object. * @param pDiagramView Pointer to the pyramid diagram view. */ CXTPChartPyramidSeriesViewBase(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); /** * @brief * Destroys a CXTPChartPyramidSeriesViewBase object, handles cleanup. */ virtual ~CXTPChartPyramidSeriesViewBase(); public: /** * @brief * Call this function to calculate the pyramid series point layout. * * @param pDC Pointer to the chart device context. * @param rcBounds The rectangular boundary. */ virtual void CalculatePointLayout(CXTPChartDeviceContext* pDC, CRect rcBounds) = 0; /** * @brief * Call this function to calculate the pyramid series label layout. * * @param pDC Pointer to the chart device context. */ void CalculateLabelLayout(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to create the pyramid diagram domain object associated * with this object. * * @param pDC Pointer to the chart device context. * @param rcBounds The rectangular boundary of the diagram. * * @return * A pointer to the chart diagram domain object. */ virtual CXTPChartDiagramDomain* CreateDiagramDomain(CXTPChartDeviceContext* pDC, CRect rcBounds); /** * @brief * Call this function to get the inner bounds of the diagram. * * @return * A chart rect object denoting the rectangular boundary. */ virtual CXTPChartRectF GetInnerBounds() const; /** * @brief * Use this function to get the pyramid diagram domain object associated with * this object. * * @return * A pointer to the chart diagram domain object. */ CXTPChartDiagramDomain* GetDomain() const; /** * @brief * Obtains the maximum allowed label width. * * @return * Maximum allowed label width. */ int GetMaxLabelWidth() const; protected: /** * @brief * Use this function to create the pyramid series point view object. * * @param pDC Pointer to the chart device context. * @param pPoint Pointer to the chart series point. * @param pParentView Parent element view pointer. * * @return * A pointer to the chart series point view. */ virtual CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView) = 0; /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the pyramid 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 pyramid series. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC) = 0; /** * @brief * These functions create 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) = 0; public: /** * @brief * These functions create a label view drawing command object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param rcBounds The rectangular boundary of the legend. * @param color1 1-st gradient fill color. * @param color2 2-nd gradient fill color. * @param clrBorder Border color. * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds, CXTPChartColor color1, CXTPChartColor color2, CXTPChartColor clrBorder) = 0; /** @cond */ void CalculateValues(); /** @endcond */ protected: CXTPChartDiagramDomain* m_pDomain; /**< Pointer to the diagram domain.*/ int m_nMaxLabelWidth; }; AFX_INLINE CXTPChartDiagramDomain* CXTPChartPyramidSeriesViewBase::GetDomain() const { return m_pDomain; } AFX_INLINE int CXTPChartPyramidSeriesViewBase::GetMaxLabelWidth() const { return m_nMaxLabelWidth; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTPYRAMIDSERIESVIEWBASE_H__) /** @endcond */