/** * @file XTPMarkupControl.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(__XTPMARKUPCONTROL_H__) # define __XTPMARKUPCONTROL_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupThickness; class CXTPMarkupBrush; class CXTPMarkupDrawingContext; class CXTPMarkupDependencyProperty; /** * @brief * CXTPMarkupControl is a CXTPMarkupFrameworkElement derived class. * It implements a base class for all control elements. */ class _XTP_EXT_CLASS CXTPMarkupControl : public CXTPMarkupFrameworkElement { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupControl); /** @endcond */ public: /** * @brief * Sets a value that indicates the thickness of the padding space * between the boundaries of the content area and the content * displayed by a control. * @param nLeft Left space. * @param nTop Top space. * @param nRight Right space. * @param nBottom Bottom space. */ void SetPadding(int nLeft, int nTop, int nRight, int nBottom); /** * @brief * Sets a value that indicates the thickness of the padding space * between the boundaries of the content area and the content * displayed by a control. * @param nPadding All borders. */ void SetPadding(int nPadding); /** * @brief * Retrieves a value that indicates the thickness of the padding space * between the boundaries of the content area and the content * displayed by a control. * @return * A pointer to a CXTPMarkupThickness object that indicates the thickness * of the padding space between the boundaries of the content area * and the content displayed by a control. * @see * SetPadding */ CXTPMarkupThickness* GetPadding() const; /** * @brief * Sets the background brush for the control object. * @param pBrush Pointer to a CBrush object. */ void SetBackground(CXTPMarkupBrush* pBrush); /** * @brief * Gets the background brush of the control object. * @return * A pointer to the background brush of the control object. */ CXTPMarkupBrush* GetBackground() const; /** * @brief * Sets the default text brush for the control object. * @param pBrush Pointer to a CBrush object. */ void SetForeground(CXTPMarkupBrush* pBrush); /** * @brief * Gets the default text brush of the control object. * @return * A pointer to the default text brush of the control object. */ CXTPMarkupBrush* GetForeground() const; protected: /** @cond */ // Implementation CSize ArrangeOverride(CSize szFinalSize); CSize MeasureOverride(CXTPMarkupDrawingContext* pDC, CSize szAvailableSize); public: static CXTPMarkupDependencyProperty* m_pPaddingProperty; static CXTPMarkupDependencyProperty* m_pBackgroundProperty; static CXTPMarkupDependencyProperty* m_pForegroundProperty; /** @endcond */ /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupControl); # endif afx_msg LPDISPATCH OleGetBackground(); afx_msg void OleSetBackground(LPDISPATCH lpBackground); afx_msg LPDISPATCH OleGetForeground(); afx_msg void OleSetForeground(LPDISPATCH lpBackground); afx_msg LPDISPATCH OleGetPadding(); afx_msg void OleSetPadding(LPDISPATCH lpThickness); /** @endcond */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPCONTROL_H__) /** @endcond */