/** * @file XTPChartAxisGridLines.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(__XTPCHARTAXISGRIDLINES_H__) # define __XTPCHARTAXISGRIDLINES_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartAxis; class CXTPChartLineStyle; /** * @brief * CXTPChartAxisGridLines is a kind of CXTPChartElement, * This class represents the grid lines parallel to an axis. */ class _XTP_EXT_CLASS CXTPChartAxisGridLines : public CXTPChartElement { public: /** * @brief * Constructs a CXTPChartAxisGridLines object. * * @param pAxis Pointer to a chart axis object. */ CXTPChartAxisGridLines(CXTPChartAxis* pAxis); /** * @brief * Destroys a CXTPChartAxisGridLines object, handles cleanup. */ virtual ~CXTPChartAxisGridLines(); public: /** * @brief * Call this function to check the visibility of the grid lines. * * @return A BOOL value. TRUE if the grid lines are visible, FALSE otherwise. */ BOOL IsVisible() const; /** * @brief * Call this function to set the visibility of the grid lines. * * @param bVisible A BOOL value. TRUE to set the grid lines to visible, * FALSE to hide the grid lines. */ void SetVisible(BOOL bVisible); /** * @brief * Call this function to check the visibility of the minor grid lines. * * @return A BOOL value. TRUE if the minor grid lines are visible, FALSE otherwise. */ BOOL IsMinorVisible() const; /** * @brief * Call this function to set the visibility of the minor grid lines. * * @param bMinorVisible A BOOL value. TRUE to set the minor grid lines to visible, * FALSE to hide the minor grid lines. */ void SetMinorVisible(BOOL bMinorVisible); /** * @brief * Use this function to get the color of the grid lines. * * @return A CXTPChartColor object representing the ARGB color value selected. */ CXTPChartColor GetColor() const; /** * @brief * Use this function to get the color of the minor grid lines. * * @return A CXTPChartColor object representing the ARGB color value selected. */ CXTPChartColor GetMinorColor() const; /** * @brief * Use this function to get the grid line style used. * * @return A pointer to the CXTPChartLineStyle object representing the grid line style * selected. */ CXTPChartLineStyle* GetLineStyle() const; /** * @brief * Use this function to get the minor grid line style used. * * @return A pointer to the CXTPChartLineStyle object representing the minor grid line * style selected. */ CXTPChartLineStyle* GetMinorLineStyle() const; public: /** * @brief * Call this function to get the axis object to which the grid lines * are associated. * * @return A pointer to the CXTPChartAxis object representing the chart axis. */ CXTPChartAxis* GetAxis() const; public: void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartAxisGridLines); LPDISPATCH OleGetLineStyle(); LPDISPATCH OleGetMinorLineStyle(); /** @endcond */ # endif protected: BOOL m_bVisible; /**< TRUE if the grid lines are visible, FALSE if not.*/ BOOL m_bMinorVisible; /**< TRUE if the minor grid lines are visible, FALSE if not.*/ CXTPChartColor m_clrColor; /**< ARGB value of the grid lines color.*/ CXTPChartColor m_clrMinorColor; /**< ARGB value of the minor grid lines color.*/ CXTPChartLineStyle* m_pLineStyle; /**< The grid line style.*/ CXTPChartLineStyle* m_pMinorLineStyle; /**< The minor grid line style.*/ }; AFX_INLINE CXTPChartAxis* CXTPChartAxisGridLines::GetAxis() const { return (CXTPChartAxis*)m_pOwner; } AFX_INLINE BOOL CXTPChartAxisGridLines::IsVisible() const { return m_bVisible; } AFX_INLINE BOOL CXTPChartAxisGridLines::IsMinorVisible() const { return m_bMinorVisible; } AFX_INLINE void CXTPChartAxisGridLines::SetVisible(BOOL bVisible) { m_bVisible = bVisible; OnChartChanged(); } AFX_INLINE CXTPChartLineStyle* CXTPChartAxisGridLines::GetLineStyle() const { return m_pLineStyle; } AFX_INLINE CXTPChartLineStyle* CXTPChartAxisGridLines::GetMinorLineStyle() const { return m_pMinorLineStyle; } AFX_INLINE void CXTPChartAxisGridLines::SetMinorVisible(BOOL bMinorVisible) { m_bMinorVisible = bMinorVisible; OnChartChanged(); } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTAXISGRIDLINES_H__) /** @endcond */