/** * @file XTPChartPyramidSeriesLabelBase.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(__XTPCHARTPYRAMIDSERIESLABELBASE_H__) # define __XTPCHARTPYRAMIDSERIESLABELBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartPyramidSeriesStyleBase; class CXTPPropExchange; class CXTPChartDeviceContext; class CXTPChartSeriesPointView; class CXTPChartElementView; /** * @brief * This enumeration tells the various positions available for the pyramid label. */ enum XTPChartPyramidLabelPosition { xtpChartPyramidLabelLeft, /**< Place label on the left side of a pyramid point*/ xtpChartPyramidLabelRight, /**< Place label on the right side of a pyramid point*/ xtpChartPyramidLabelCenter /**< Place label in the center of a pyramid point*/ }; /** * @brief * This class abstracts the pyramid series label. */ class _XTP_EXT_CLASS CXTPChartPyramidSeriesLabelBase : public CXTPChartSeriesLabel { DECLARE_DYNAMIC(CXTPChartPyramidSeriesLabelBase); public: /** * @brief * Constructs a CXTPChartPyramidSeriesLabelBase object. */ CXTPChartPyramidSeriesLabelBase(); /** * @brief * Destroys a CXTPChartPyramidSeriesLabelBase object, handles cleanup. */ virtual ~CXTPChartPyramidSeriesLabelBase(); public: /** * @brief * Call this function to get the label position. * * @return * A pyramid label position object describing the position of the pyramid label. */ XTPChartPyramidLabelPosition GetPosition() const; /** * @brief * Call this function to set the label position. * * @param nPosition A pyramid label position object describing the position of * the pyramid label. */ void SetPosition(XTPChartPyramidLabelPosition nPosition); /** * @brief * Call this function to get the basic style of the pyramid series. * * @return * A pointer to a CXTPChartPyramidSeriesStyleBase object. */ CXTPChartPyramidSeriesStyleBase* GetStyle() const; /** * @brief * Call this member function to Store/Load the properties of content * using the specified data object. * * @param pPX Source or destination CXTPPropExchange data object reference. * * @details * This member function is used to store property data to or load * property data from storage. */ void DoPropExchange(CXTPPropExchange* pPX); /** * @brief * Call this function to check whether the label is inside the pyramid. * * @return * Returns TRUE if the label is inside the pyramid, FALSE otherwise. */ BOOL IsInside() const; protected: /** * @brief * This function creates the view of the pyramid series. * * @param pDC The chart device context object pointer. * @param pPointView The series point view. * @param pParentView Parent element view. * * @return * Returns a pointer to the associated label view object. */ virtual CXTPChartElementView* CreateView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPointView* pPointView, CXTPChartElementView* pParentView) = 0; protected: XTPChartPyramidLabelPosition m_nPosition; /**< The pyramid label position.*/ # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartPyramidSeriesLabelBase); /** @endcond */ # endif }; AFX_INLINE XTPChartPyramidLabelPosition CXTPChartPyramidSeriesLabelBase::GetPosition() const { return m_nPosition; } AFX_INLINE void CXTPChartPyramidSeriesLabelBase::SetPosition(XTPChartPyramidLabelPosition nPosition) { m_nPosition = nPosition; OnChartChanged(); } /** * @brief * This class abstracts the view of a pyramid series label. */ class CXTPChartPyramidSeriesLabelViewBase : public CXTPChartSeriesLabelView { DECLARE_DYNAMIC(CXTPChartPyramidSeriesLabelViewBase); protected: /** * @brief * Constructs a CXTPChartPyramidSeriesLabelViewBase object. * * @param pLabel Associated label model pointer. * @param pPointView Point view object pointer associated with the label. * @param pParentView Parent view pointer. */ CXTPChartPyramidSeriesLabelViewBase(CXTPChartSeriesLabel* pLabel, CXTPChartSeriesPointView* pPointView, CXTPChartElementView* pParentView); public: /** * @brief * Obtains label position. * * @return * Label position. */ XTPChartPyramidLabelPosition GetPosition() const; /** * @brief * Creates view drawing device command for the device context specified. * * @param pDC Device context pointer for which the drawing command is to be created. * * @return * A new instance of view drawing device command or NULL if no command * is provided. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC) = 0; }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTPYRAMIDSERIESLABELBASE_H__) /** @endcond */