/** * @file XTPChartFunnelSeriesLabelBase.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(__XTPCHARTFUNNELSERIESLABELBASE_H__) # define __XTPCHARTFUNNELSERIESLABELBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartFunnelSeriesPointView; class CXTPChartFunnelSeriesStyleBase; /** * @brief * This enumeration tells the various positions available for the funnel label. */ enum XTPChartFunnelLabelPosition { xtpChartFunnelLabelLeft, /**< Specifies left chart label direction */ xtpChartFunnelLabelRight, /**< Specifies right chart label direction */ xtpChartFunnelLabelCenter, /**< Specifies center chart label direction */ }; /** * @brief * CXTPChartFunnelSeriesLabelBase is a kind of CXTPChartSeriesLabel. This class * abstracts the label of a funnel series. */ class _XTP_EXT_CLASS CXTPChartFunnelSeriesLabelBase : public CXTPChartSeriesLabel { /** @cond */ DECLARE_DYNAMIC(CXTPChartFunnelSeriesLabelBase) /** @endcond */ public: /** * @brief * Constructs a CXTPChartFunnelSeriesLabelBase object. */ CXTPChartFunnelSeriesLabelBase(); /** * @brief * Destroys a CXTPChartFunnelSeriesLabelBase object, handles cleanup. */ virtual ~CXTPChartFunnelSeriesLabelBase(); public: /** * @brief * Call this function to get the label position. * * @return * A funnel label position object describing the position of the funnel label. */ XTPChartFunnelLabelPosition GetPosition() const; /** * @brief * Call this function to set the label position. * * @param nPosition A funnel label position object describing the position of * the funnel label. */ void SetPosition(XTPChartFunnelLabelPosition nPosition); /** * @brief * Call this function to get the basic style of the funnel series. * * @return * A pointer to a CXTPChartFunnelSeriesStyle object. */ CXTPChartFunnelSeriesStyleBase* GetStyle() const; /** * @brief * Reads this object from or writes this object to an archive. * * @param pPX A CXTPPropExchange object to serialize to or from. */ void DoPropExchange(CXTPPropExchange* pPX); /** * @brief * Call this function to check whether the label is inside the funnel. * * @return * A BOOL value. TRUE if the label is inside the funnel, FALSE otherwise. */ BOOL IsInside() const; protected: /** * @brief * This function creates the view of the funnel series. * * @param pDC The chart device context object pointer. * @param pPointView The series point view. * @param pParentView Parent view pointer. * * @return * Returns a pointer to the associated label view object. */ virtual CXTPChartElementView* CreateView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPointView* pPointView, CXTPChartElementView* pParentView) = 0; XTPChartFunnelLabelPosition m_nPosition; /**< The funnel label position.*/ # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartPunnelSeriesLabelBase); /** @endcond */ # endif }; AFX_INLINE XTPChartFunnelLabelPosition CXTPChartFunnelSeriesLabelBase::GetPosition() const { return m_nPosition; } AFX_INLINE void CXTPChartFunnelSeriesLabelBase::SetPosition(XTPChartFunnelLabelPosition nPosition) { m_nPosition = nPosition; OnChartChanged(); } /** * @brief * This class abstracts the view of a funnel series label. */ class CXTPChartFunnelSeriesLabelViewBase : public CXTPChartSeriesLabelView { DECLARE_DYNAMIC(CXTPChartFunnelSeriesLabelViewBase); protected: /** * @brief * Constructs a CXTPChartFunnelSeriesLabelViewBase object. * * @param pLabel Associated label model pointer. * @param pPointView Point view object pointer associated with the label. * @param pParentView Parent view pointer. */ CXTPChartFunnelSeriesLabelViewBase(CXTPChartSeriesLabel* pLabel, CXTPChartSeriesPointView* pPointView, CXTPChartElementView* pParentView); public: /** * @brief * Obtains label position. * * @return * Label position. */ XTPChartFunnelLabelPosition 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(__XTPCHARTFUNNELSERIESLABELBASE_H__) /** @endcond */