/** * @file XTPGridThickness.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(__XTPGRIDTHICKNESS_H__) # define __XTPGRIDTHICKNESS_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * The CXTPGridThickness class describes the thickness of the * left, top, right, and bottom sides of a rectangle. */ class _XTP_EXT_CLASS CXTPGridThickness : public CXTPCmdTarget { public: /** * @brief * Constructs a CXTPGridThickness object and sets * the left, top, right, and bottom thickness to 0. */ CXTPGridThickness(); /** * @brief * Constructs a CXTPGridThickness object and sets * the left, top, right, and bottom thickness. * @param thickness The left, top, right, and bottom thickness. */ CXTPGridThickness(const CXTPGridThickness& thickness); /** * @brief * Constructs a CXTPGridThickness object and sets * the left, top, right, and bottom thickness. * @param nThickness The left, top, right, and bottom thickness. */ CXTPGridThickness(const int nThickness); /** * @brief * Constructs a CXTPGridThickness object and sets * the left, top, right, and bottom thickness. * @param nLeft The left thickness. * @param nTop The top thickness. * @param nRight The right thickness. * @param nBottom The bottom thickness. */ CXTPGridThickness(const int nLeft, const int nTop, const int nRight, const int nBottom); /** * @brief * Sets the left, top, right, and bottom thickness. * @param thickness The left, top, right, and bottom thickness. */ void Set(const CXTPGridThickness& thickness); /** * @brief * Sets the left, top, right, and bottom thickness. * @param nThickness The left, top, right, and bottom thickness. */ void Set(const int nThickness); /** * @brief * Sets the left, top, right, and bottom thickness. * @param nLeft The left thickness. * @param nTop The top thickness. * @param nRight The right thickness. * @param nBottom The bottom thickness. */ void Set(const int nLeft, const int nTop, const int nRight, const int nBottom); /** * @brief * Gets the left thickness. * @return * The left thickness. */ int GetLeft() const; /** * @brief * Sets the left thickness. * @param nThickness New left thickness. */ void SetLeft(const int nThickness); /** * @brief * Gets the top thickness. * @return * The top thickness. */ int GetTop() const; /** * @brief * Sets the top thickness. * @param nThickness New top thickness. */ void SetTop(const int nThickness); /** * @brief * Gets the right thickness. * @return * The right thickness. */ int GetRight() const; /** * @brief * Sets the right thickness. * @param nThickness New right thickness. */ void SetRight(const int nThickness); /** * @brief * Gets the bottom thickness. * @return * The bottom thickness. */ int GetBottom() const; /** * @brief * Sets the bottom thickness. * @param nThickness New bottom thickness. */ void SetBottom(const int nThickness); CSize GetSize() const; /** * @brief * Sets the left, top, right, and bottom thickness. * @param thickness The left, top, right, and bottom thickness. * @return Self reference. */ CXTPGridThickness& operator=(const CXTPGridThickness& thickness); /** * @brief * Sets the left, top, right, and bottom thickness. * @param nThickness The left, top, right, and bottom thickness. * @return Self reference. */ CXTPGridThickness& operator=(const int nThickness); static CRect AFX_CDECL DeflateRect(CRect rcDeflate, const CXTPGridThickness* pThickness); protected: int m_nLeft; /**< Left thickness. */ int m_nTop; /**< Top thickness. */ int m_nRight; /**< Right thickness. */ int m_nBottom; /**< Bottom thickness. */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // #if !defined(__XTPGRIDTHICKNESS_H__) /** @endcond */