/** * @file XTPChartBorder.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(__XTPCHARTBORDER_H__) # define __XTPCHARTBORDER_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartColor; class CXTPChartDeviceCommand; class CXTPPropExchange; /** * @brief * This class abstracts the border of a chart, it is a kind of chart element. */ class _XTP_EXT_CLASS CXTPChartBorder : public CXTPChartElement { public: /** * @brief * Constructs a CXTPChartBorder object. * * @param pOwner The owner element of this element. */ CXTPChartBorder(CXTPChartElement* pOwner); /** * @brief * Destroys a CXTPChartBorder object, handles cleanup */ virtual ~CXTPChartBorder(); public: /** * @brief * Call this function to check whether the chart border is visible or not. * * @return A BOOL value of TURE if the border is visible and FALSE if the not. */ BOOL IsVisible() const; void SetVisible(BOOL bVisible); /** * @brief * This function returns the color of the border. * * @return A CXTPChartColor object denote the ARGB value of the border. */ CXTPChartColor GetColor() const; void SetColor(const CXTPChartColor& clr); /** * @brief * Call this function to get the thickness of the chart border. * * @return An integer value tells the thickness of the border. */ int GetThickness() const; /** * @brief * Call this function to set the thickness of the chart border. * * @param Thickness Thickness to be set. */ void SetThickness(int Thickness); public: /** * @brief * This function creates a CXTPChartDeviceCommand object, this object * represents the rendering of the border of the chart. * * @param rcBounds The bounding rectange. * @param color Reference to a chart color object. * * @return Returns a pointer to CXTPChartDeviceCommand object, this polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the border of the chart. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(const CXTPChartRectF& rcBounds, const CXTPChartColor& color); /** * @brief * This function creates a CXTPChartDeviceCommand object, this object * represents the rendering of the border of the chart. * * @param rcBounds The bounding rectange. * @param color Reference to a chart color object. * * @return Returns a pointer to CXTPChartDeviceCommand object, this polymorphic object * handles the rendering of an element in the chart. Here it handles the drawing * of the border of the chart. */ virtual CXTPChartDeviceCommand* CreateInnerBorderDeviceCommand(const CXTPChartRectF& rcBounds, const CXTPChartColor& color); /** * @brief * Call this member function to store/Load the properties of chart boundary * object using the specified data object. * * @param pPX Source or destination CXTPPropExchange data object reference. * * @details * This member function is used to store or load property data to or * from a storage. */ void DoPropExchange(CXTPPropExchange* pPX); protected: # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartBorder); void OleSetColor(OLE_COLOR clr); OLE_COLOR OleGetColor(); /** @endcond */ # endif protected: CXTPChartColor m_clrColor; /**< The boundary color.*/ int m_nThickness; /**< The thickness of the boundary.*/ BOOL m_bVisible; /**< TRUE if the boundary is visible, FALSE if invisible.*/ }; AFX_INLINE BOOL CXTPChartBorder::IsVisible() const { return m_bVisible; } AFX_INLINE void CXTPChartBorder::SetVisible(BOOL bVisible) { m_bVisible = bVisible; OnChartChanged(); } AFX_INLINE CXTPChartColor CXTPChartBorder::GetColor() const { return m_clrColor; } AFX_INLINE void CXTPChartBorder::SetColor(const CXTPChartColor& clr) { m_clrColor = clr; OnChartChanged(); } AFX_INLINE int CXTPChartBorder::GetThickness() const { return m_nThickness; } AFX_INLINE void CXTPChartBorder::SetThickness(int nThickness) { m_nThickness = nThickness; OnChartChanged(); } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTBORDER_H__) /** @endcond */