/** * @file XTPGridBorder.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(__XTPGRIDBORDER_H__) # define __XTPGRIDBORDER_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPGridThickness; /** * @brief * Defines a grid border edge. */ enum XTPGridBorderEdge { xtpGridBorderEdgeLeft, /**< Specifies a left grid border edge */ xtpGridBorderEdgeTop, /**< Specifies a top grid border edge */ xtpGridBorderEdgeRight, /**< Specifies a right grid border edge */ xtpGridBorderEdgeBottom, /**< Specifies a bottom grid border edge */ xtpGridBorderEdgeCount /**< Specifies the number of grid border edges */ }; class _XTP_EXT_CLASS CXTPGridBorderEdge : public CXTPCmdTarget { public: CXTPGridBorderEdge(); /** * @brief * Gets the line style of the border edge. * @return * The line style of the border edge. */ XTPGridLineStyle GetLineStyle() const; void SetLineStyle(XTPGridLineStyle lineStyle); protected: XTPGridLineStyle m_lineStyle; }; class _XTP_EXT_CLASS CXTPGridBorder : public CXTPCmdTarget { public: CXTPGridBorder(); virtual ~CXTPGridBorder(); virtual void Draw(CDC* pDC, CRect rcBorder); virtual void DrawH(CDC* pDC, CRect rcBorder); virtual void DrawV(CDC* pDC, CRect rcBorder); CSize GetSize() const; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Properties public: CXTPGridBorderEdge* GetEdge(const XTPGridBorderEdge edge) const; /** * @brief * Gets the border color. * @return * The border color. */ COLORREF GetBorderColor() const; /** * @brief * Sets the border color. * @param crBorderColor New border color. */ void SetBorderColor(COLORREF crBorder); CXTPGridThickness* GetMargin() const; CXTPGridThickness* GetBorderThickness() const; CXTPGridThickness* GetPadding() const; static CRect AFX_CDECL DeflateRect(CRect rcDeflate, const CXTPGridBorder* pBorder); ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Members protected: COLORREF m_crBackground; /**< Background color. */ COLORREF m_crBorder; /**< Border color. */ CXTPGridBorderEdge* m_pEdgeLeft; /**< Left edge. */ CXTPGridBorderEdge* m_pEdgeTop; /**< Top edge. */ CXTPGridBorderEdge* m_pEdgeRight; /**< Right edge. */ CXTPGridBorderEdge* m_pEdgeBottom; /**< Bottom edge. */ CXTPGridThickness* m_pMargin; /**< Outer margin. */ CXTPGridThickness* m_pBorderThickness; /**< Border thickness. */ CXTPGridThickness* m_pPadding; /**< Inner padding. */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // #if !defined(__XTPGRIDBORDER_H__) /** @endcond */