/** * @file XTPChartRadarAxisXView.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(__XTPCHARTRADARAXISXVIEW_H__) # define __XTPCHARTRADARAXISXVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartRadarAxisXView; class CXTPChartAxisRange; class CXTPChartAxis; class CXTPChartSeriesView; /** * @brief * This class represents a tick mark in the axis. */ class _XTP_EXT_CLASS CXTPChartRadarAxisXViewTick { public: double m_dValue; /**< The value of the tick mark.*/ CXTPChartString m_strLabel; /**< The tick mark label.*/ CSize m_szBounds; /**< The boundary.*/ CXTPChartSizeF m_szLabel; /**< The size of the label.*/ CXTPChartPointF m_ptLocation; }; /** * @brief * This class abstracts the view of a chart axis and its child items in * a bounding rectangle context. */ class _XTP_EXT_CLASS CXTPChartRadarAxisXView : public CXTPChartRadarAxisView { public: /** * @brief * Constructs a CXTPChartRadarAxisXView object. * * @param pAxis Pointer to a CXTPChartAxis object. * @param pParentView Pointer to a CXTPChartElementView object. */ CXTPChartRadarAxisXView(CXTPChartAxis* pAxis, CXTPChartElementView* pParentView); /** * @brief * Destroys a CXTPChartRadarAxisXView object, handles cleanup and deallocation. */ ~CXTPChartRadarAxisXView(); public: /** * @brief * Override this function to create a CXTPChartDeviceCommand object. This object * represents the rendering of an axis in the chart. * * @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 an axis. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the grid lines in the chart axis. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return Returns a pointer to a CXTPChartDeviceCommand object. This polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the grid lines in an axis. */ virtual CXTPChartDeviceCommand* CreateGridLinesDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the interlaced strips in the chart. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return Returns a pointer to a CXTPChartDeviceCommand object. This polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the interlaced strips in the chart. */ virtual CXTPChartDeviceCommand* CreateInterlacedDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the tick marks in the axis. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return Returns a pointer to a CXTPChartDeviceCommand object. This polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the tick marks in the axis. */ virtual CXTPChartDeviceCommand* CreateTickMarksDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the labels in the axis. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return Returns a pointer to a CXTPChartDeviceCommand object. This polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the labels in the axis. */ virtual CXTPChartDeviceCommand* CreateLabelsDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the constant lines perpendicular to an axis. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param bBehind TRUE for behind * * @return Returns a pointer to a CXTPChartDeviceCommand object. This polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the constant lines perpendicular to an axis. */ virtual CXTPChartDeviceCommand* CreateConstantLinesDeviceCommand(CXTPChartDeviceContext* pDC, BOOL bBehind); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the strips parallel to an axis. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return Returns a pointer to a CXTPChartDeviceCommand object. This polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the strips parallel to an axis. */ virtual CXTPChartDeviceCommand* CreateStripsDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to create a chart axis view. * * @param pDC The chart device context object. * * @details * This function creates the view of an axis and its constituent elements * (e.g. tick marks, labels, axis title, etc.). */ void CreateView(CXTPChartDeviceContext* pDC); /** * @brief * This function calculates the size of an axis, including its constituent elements * (e.g. tick marks, labels, axis title, etc.). * * @param pDC The chart device context object. * @param rcDiagram The rectangle of the diagram. */ void CalcSize(CXTPChartDeviceContext* pDC, CRect rcDiagram); /** * @brief * This function sets the bounds for the axis. * * @param pDC The chart device context object. * @param rcBounds The bounding rectangle. */ void SetBounds(CXTPChartDeviceContext* pDC, CRect rcBounds); double ValueToAngle(double nValue) const; /** * @brief * This function returns the size of the axis. * * @return The last computed axis size value. If the axis size value has not been * computed yet, a value of 0 will be returned instead. */ int GetSize() const; protected: /** * @brief * This function creates the axis tick marks. * * @param pDC The device context. */ void CreateTickMarks(CXTPChartDeviceContext* pDC); public: CArray m_arrTicks; /**< The collection of tick marks.*/ CArray m_arrMinorTicks; protected: CRect m_rcBounds; /**< The diagram boundary.*/ int m_nSize; /**< The axis size;*/ double m_dMinValue; double m_dMaxValue; CXTPPoint2i m_ptCenter; int m_nRadius; }; AFX_INLINE int CXTPChartRadarAxisXView::GetSize() const { return m_nSize; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTRADARAXISXVIEW_H__) /** @endcond */