/** * @file XTPChartAxisTickMarks.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(__XTPCHARTAXISTICKMARKS_H__) # define __XTPCHARTAXISTICKMARKS_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartAxis; /** * @brief * This class represents the tick marks in an axis. It's a kind of chart element. */ class _XTP_EXT_CLASS CXTPChartAxisTickMarks : public CXTPChartElement { public: /** * @brief * Constructs a CXTPChartAxisTickMarks object. * * @param pAxis A pointer to the chart axis object to which these tick marks * are associated with. */ CXTPChartAxisTickMarks(CXTPChartAxis* pAxis); /** * @brief * Destroys a CXTPChartAxisTickMarks object, handles cleanup. */ virtual ~CXTPChartAxisTickMarks(); public: /** * @brief * This function returns a pointer to the CXTPChartAxis object associated with * the axis tick mark object. * * @return Returns a pointer to the associated chart axis object. */ CXTPChartAxis* GetAxis() const; public: /** * @brief * Call this function to set the visibility for the axis tick marks. * * @param bVisible A BOOL value. TRUE to set the tick marks to visible, * FALSE to hide the tick marks. */ void SetVisible(BOOL bVisible); /** * @brief * Call this function to check the visibility of the axis tick marks. * * @return A BOOL value. TRUE if the tick marks are visible, FALSE otherwise. */ BOOL IsVisible() const; /** * @brief * Call this function to set the visibility for the axis minor tick marks. * * @param bVisible A BOOL value. TRUE to set the minor tick marks to visible, * FALSE to hide the minor tick marks. */ void SetMinorVisible(BOOL bVisible); /** * @brief * Call this function to check the visibility of the axis minor tick marks. * * @return A BOOL value. TRUE if the minor tick marks are visible, FALSE otherwise. */ BOOL IsMinorVisible() const; /** * @brief * Call this function to set the thickness of the tick marks. * * @param nThickness An integer value denoting the thickness of the tick marks. */ void SetThickness(int nThickness); /** * @brief * Call this function to get the thickness of the tick marks. * * @return An integer value denoting the thickness of the tick marks. */ int GetThickness() const; /** * @brief * Call this function to set the thickness of the minor tick marks. * * @param nThickness An integer value denoting the thickness of the minor tick marks. */ void SetMinorThickness(int nThickness); /** * @brief * Call this function to get the thickness of the minor tick marks. * * @return An integer value denoting the thickness of the minor tick marks. */ int GetMinorThickness() const; /** * @brief * Call this function to set the length of the tick marks. * * @param nLength An integer value denoting the length of the tick marks. */ void SetLength(int nLength); /** * @brief * Call this function to get the length of the tick marks. * * @return An integer value denoting the length of the tick marks. */ int GetLength() const; /** * @brief * Call this function to set the length of the minor tick marks. * * @param nLength An integer value denoting the length of the minor tick marks. */ void SetMinorLength(int nLength); /** * @brief * Call this function to get the length of the minor tick marks. * * @return An integer value denoting the length of the minor tick marks. */ int GetMinorLength() const; /** * @brief * Call this function to set the tick marks to cross the axis. * * @param bCrossAxis A BOOL value. TRUE to make the tick marks cross the axis, * FALSE to make the tick marks normal. */ void SetCrossAxis(BOOL bCrossAxis); /** * @brief * Call this function to check if the tick marks cross the axis. * * @return A BOOL value. TRUE if the tick marks are crossing the axis, FALSE otherwise. */ BOOL IsCrossAxis() const; public: void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartAxisTickMarks); /** @endcond */ # endif protected: BOOL m_bVisible; /**< TRUE if the tick marks are visible, FALSE if not.*/ BOOL m_bMinorVisible; /**< TRUE if the minor tick marks are visible, FALSE if not.*/ int m_nThickness; /**< The thickness of the tick marks.*/ int m_nMinorThickness; /**< The thickness of the minor tick marks.*/ int m_nLength; /**< The length of the tick marks.*/ int m_nMinorLength; /**< The length of the minor tick marks.*/ BOOL m_bCrossAxis; /**< TRUE if the tick marks are crossing the axis, FALSE if not.*/ }; AFX_INLINE CXTPChartAxis* CXTPChartAxisTickMarks::GetAxis() const { return (CXTPChartAxis*)m_pOwner; } AFX_INLINE BOOL CXTPChartAxisTickMarks::IsVisible() const { return m_bVisible; } AFX_INLINE BOOL CXTPChartAxisTickMarks::IsMinorVisible() const { return m_bMinorVisible; } AFX_INLINE int CXTPChartAxisTickMarks::GetThickness() const { return m_nThickness; } AFX_INLINE int CXTPChartAxisTickMarks::GetMinorThickness() const { return m_nMinorThickness; } AFX_INLINE int CXTPChartAxisTickMarks::GetLength() const { return m_nLength; } AFX_INLINE int CXTPChartAxisTickMarks::GetMinorLength() const { return m_nMinorLength; } AFX_INLINE BOOL CXTPChartAxisTickMarks::IsCrossAxis() const { return m_bCrossAxis; } AFX_INLINE void CXTPChartAxisTickMarks::SetVisible(BOOL bVisible) { m_bVisible = bVisible; OnChartChanged(); } AFX_INLINE void CXTPChartAxisTickMarks::SetMinorVisible(BOOL bVisible) { m_bMinorVisible = bVisible; OnChartChanged(); } AFX_INLINE void CXTPChartAxisTickMarks::SetThickness(int nThickness) { m_nThickness = nThickness; OnChartChanged(); } AFX_INLINE void CXTPChartAxisTickMarks::SetMinorThickness(int nThickness) { m_nMinorThickness = nThickness; OnChartChanged(); } AFX_INLINE void CXTPChartAxisTickMarks::SetLength(int nLength) { m_nLength = nLength; OnChartChanged(); } AFX_INLINE void CXTPChartAxisTickMarks::SetMinorLength(int nLength) { m_nMinorLength = nLength; OnChartChanged(); } AFX_INLINE void CXTPChartAxisTickMarks::SetCrossAxis(BOOL bCrossAxis) { m_bCrossAxis = bCrossAxis; OnChartChanged(); } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTAXISTICKMARKS_H__) /** @endcond */