/** * @file XTPChartPieSeriesPointViewBase.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(__XTPCHARTPIESERIESPOINTVIEWBASE_H__) # define __XTPCHARTPIESERIESPOINTVIEWBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartPieBase; class CXTPChartSeriesPoint; class CXTPChartElementView; class CXTPChartDeviceCommand; /** * @brief * This class abstracts the view of a pie series point. This class is a kind of * CXTPChartSeriesPointView. * * @details * A pie chart (or a circle graph) is a circular chart divided into sectors, * illustrating percents. In a pie chart, the arc length of each sector (and * consequently its central angle and area), is proportional to the quantity * it represents. Together, the sectors create a full disk. */ class _XTP_EXT_CLASS CXTPChartPieSeriesPointViewBase : public CXTPChartSeriesPointView { DECLARE_DYNAMIC(CXTPChartPieSeriesPointViewBase); protected: /** * @brief * Constructs a CXTPChartPieSeriesPointViewBase object. * * @param pPoint Pointer to the chart series point. * @param pParentView Pointer to the parent view object. */ CXTPChartPieSeriesPointViewBase(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * Constructs a CXTPChartPieSeriesPointViewBase object. * * @param pPoint Pointer to the chart series point. * @param pParentView Pointer to the parent view object. * @param bAddToParent If TRUE the view will be be added to parent's child view list. */ CXTPChartPieSeriesPointViewBase(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView, BOOL bAddToParent); public: /** * @brief * Destroys a CXTPChartPieSeriesPointViewBase object, handle cleanup. */ virtual ~CXTPChartPieSeriesPointViewBase(); public: /** * @brief * Use this function to calculate the layout of the pie series point. * * @param dAngle The swipe angle of the sector(pie). */ virtual void CalculateLayout(double& dAngle) = 0; /** * @brief * Use this function to get the pie for the point. * * @return * A pointer CXTPChartPieBase object which represents a pie. */ CXTPChartPieBase* GetPie() const; /** * @brief * Use this function to obtain the base point value. * * @return * The base point value. */ CXTPChartPointF GetBasePoint() const; /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the pie series point. * * @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 pie series point. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC) = 0; /** * @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) = 0; public: double m_dValue; // The value of the point. protected: CXTPChartPieBase* m_pPie; // The pie for this point. CXTPChartPointF m_basePoint; // The base point. }; AFX_INLINE CXTPChartPieBase* CXTPChartPieSeriesPointViewBase::GetPie() const { return m_pPie; } AFX_INLINE CXTPChartPointF CXTPChartPieSeriesPointViewBase::GetBasePoint() const { return m_basePoint; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTPIESERIESPOINTVIEWBASE_H__) /** @endcond */