/** * @file XTPChart3dFunnelSeriesLabel.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(__XTPCHART3DFUNNELSERIESLABEL_H__) # define __XTPCHART3DFUNNELSERIESLABEL_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartFunnelSeriesPointViewBase; class CXTPChartFunnelSeriesStyleBase; class CXTPChart3dFunnelSeriesPointView; class CXTPChart3dFunnelSeriesStyle; /** * @brief * CXTPChartFunnelSeriesLabelBase is a kind of CXTPChart3dFunnelSeriesLabel. This class * abstracts the label of a funnel series. */ class _XTP_EXT_CLASS CXTPChart3dFunnelSeriesLabel : public CXTPChartFunnelSeriesLabelBase { DECLARE_SERIAL(CXTPChart3dFunnelSeriesLabel); public: /** * @brief * Constructs a CXTPChart3dFunnelSeriesLabel object. */ CXTPChart3dFunnelSeriesLabel(); 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 element view pointer. * * @return * Returns a pointer to the associated label view object. */ virtual CXTPChartElementView* CreateView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPointView* pPointView, CXTPChartElementView* pParentView); }; /** * @brief * Represents a series label view object. */ class _XTP_EXT_CLASS CXTPChart3dFunnelSeriesLabelView : public CXTPChartFunnelSeriesLabelViewBase { DECLARE_DYNAMIC(CXTPChart3dFunnelSeriesLabelView); public: /** * @brief * Constructs a view object. * * @param pLabel Label model object pointer. * @param pPointView Related point view object pointer. * @param pParentView Parent view object pointer. */ CXTPChart3dFunnelSeriesLabelView(CXTPChartSeriesLabel* pLabel, CXTPChartSeriesPointView* pPointView, CXTPChartElementView* pParentView); /** * @brief * Handles view object destruction. */ ~CXTPChart3dFunnelSeriesLabelView(); /** * @brief * Creates a label transposition device command object. * * @param pDC Target device context. * * @return * New label transposition device command object. */ virtual CXTPChartDeviceCommand* CreateTranspositionDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * Creates a label drawing device command object. * * @param pDC Target device context. * * @return * New label drawing device command object. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * Creates a label connector drawing device command object. * * @param pDC Target device context. * * @return * New label connector drawing device command object. */ virtual CXTPChartDeviceCommand* CreateConnectorDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * Obtains a previously set connector start point. * * @return * Connector start point or NULL if not set. * * @see * SetConnectorStartPoint */ const CXTPPoint3d* GetConnectorStartPoint() const; /** * @brief * Sets the connector start point. * * @param point New value of the connector start point. * * @see * GetConnectorStartPoint */ void SetConnectorStartPoint(const CXTPPoint3d& point); /** * @brief * Obtains a previously set connector bend point. * * @return * Connector bend point or NULL if not set. * * @see * SetConnectorBendPoint */ const CXTPPoint3d* GetConnectorBendPoint() const; /** * @brief * Sets the connector bend point. * * @param point New value of the connector bend point. * * @see * GetConnectorBendPoint */ void SetConnectorBendPoint(const CXTPPoint3d& point); /** * @brief * Obtains a previously set connector end point. * * @return * Connector end point or NULL if not set. * * @see * SetConnectorEndPoint */ const CXTPPoint3d* GetConnectorEndPoint() const; /** * @brief * Sets the connector end point. * * @param point New value of the connector end point. * * @see * GetConnectorEndPoint */ void SetConnectorEndPoint(const CXTPPoint3d& point); /** * @brief * Obtains a previously set label anchor point. * * @return * Label anchor point or NULL if not set. * * @see * SetLabelAnchorPoint */ const CPoint* GetLabelAnchorPoint() const; /** * @brief * Sets the label anchor point. * * @param ptAnchor New value of the label anchor point. * * @see * GetLabelAnchorPoint */ void SetLabelAnchorPoint(CPoint ptAnchor); /** * @brief * Obtains a previously set label anchor origin point. * * @return * Label anchor origin point or NULL if not set. * * @see * SetLabelAnchorOrigin */ const CPoint* GetLabelAnchorOrigin() const; /** * @brief * Sets the label anchor origin point. * * @param ptAnchorOrigin New value of the label anchor origin point. * * @see * GetLabelAnchorOrigin */ void SetLabelAnchorOrigin(CPoint ptAnchorOrigin); /** * @brief * Makes the label left directed. * * @see * IsLeftDirected */ void SetLeftDirected(); /** * @brief * Determies if the label is left directed. * * @return * TRUE if left directed, FALSE otherwise. * * @see * SetLeftDirected */ BOOL IsLeftDirected() const; /** * @brief * Makes the label right directed. * * @see * IsRightDirected */ void SetRightDirected(); /** * @brief * Determies if the label is right directed. * * @return * TRUE if right directed, FALSE otherwise. * * @see * SetRightDirected */ BOOL IsRightDirected() const; /** * @brief * Determines if the connector is visible. * * @return * TRUE if connector is visible, FALSE otherwise. * * @see * SetConnectorVisible */ BOOL IsConnectorVisible() const; /** * @brief * Sets connector visibility. * * @param bVisible TRUE to set the connector to visible, * FALSE to hide the connector. * * @see * SetConnectorVisible */ void SetConnectorVisible(BOOL bVisible = TRUE); protected: CXTPPoint3d* m_ptStart; /**< Connector start point or NULL if not set.*/ CXTPPoint3d* m_ptBend; /**< Connector bend point or NULL if not set.*/ CXTPPoint3d* m_ptEnd; /**< Connector end point or NULL if not set.*/ CPoint m_ptLabelAnchor; /**< Label anchor point.*/ CPoint m_ptLabelAnchorOrigin; /**< Label anchor point origin.*/ CXTPChart3dFunnelSeriesPointView* m_p3dPointView; /**< Point view.*/ BOOL m_bLeftDirected; /**< TRUE if label is to be left directed.*/ BOOL m_bConnectorVisible; /**< TRUE if connector is visible.*/ friend class CXTPChart3dFunnelSeriesLabelsView; }; AFX_INLINE const CXTPPoint3d* CXTPChart3dFunnelSeriesLabelView::GetConnectorStartPoint() const { return m_ptStart; } AFX_INLINE const CXTPPoint3d* CXTPChart3dFunnelSeriesLabelView::GetConnectorBendPoint() const { return m_ptBend; } AFX_INLINE const CXTPPoint3d* CXTPChart3dFunnelSeriesLabelView::GetConnectorEndPoint() const { return m_ptEnd; } AFX_INLINE void CXTPChart3dFunnelSeriesLabelView::SetLabelAnchorPoint(CPoint ptAnchor) { m_ptLabelAnchor = ptAnchor; } AFX_INLINE void CXTPChart3dFunnelSeriesLabelView::SetLabelAnchorOrigin(CPoint ptAnchorOrigin) { m_ptLabelAnchorOrigin = ptAnchorOrigin; } AFX_INLINE void CXTPChart3dFunnelSeriesLabelView::SetLeftDirected() { m_bLeftDirected = TRUE; } AFX_INLINE BOOL CXTPChart3dFunnelSeriesLabelView::IsLeftDirected() const { return m_bLeftDirected; } AFX_INLINE void CXTPChart3dFunnelSeriesLabelView::SetRightDirected() { m_bLeftDirected = FALSE; } AFX_INLINE BOOL CXTPChart3dFunnelSeriesLabelView::IsRightDirected() const { return !m_bLeftDirected; } AFX_INLINE BOOL CXTPChart3dFunnelSeriesLabelView::IsConnectorVisible() const { return m_bConnectorVisible; } AFX_INLINE void CXTPChart3dFunnelSeriesLabelView::SetConnectorVisible(BOOL bVisible /*= TRUE*/) { m_bConnectorVisible = bVisible; } /** * @brief * Represents a view object for all funnel series labels. */ class _XTP_EXT_CLASS CXTPChart3dFunnelSeriesLabelsView : public CXTPChartElementView { DECLARE_DYNAMIC(CXTPChart3dFunnelSeriesLabelsView); public: /** * @brief * Constructs a view object. * * @param pParentView Parent view pointer. */ CXTPChart3dFunnelSeriesLabelsView(CXTPChartElementView* pParentView); public: /** * @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); /** * @brief * Resolves label overlapping in an implementation specific way. */ void ResolveOverlapping(); private: CXTPChart3dFunnelSeriesStyle* GetStyle() const; }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHART3DFUNNELSERIESLABEL_H__) /** @endcond */