/** * @file XTPSyntaxEditColorSampleText.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(__XTPSYNTAXEDITPROPERTIESSAMPLETEXT_H__) # define __XTPSYNTAXEDITPROPERTIESSAMPLETEXT_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * This class, derived from CStatic, is used to display a sample of colored text. */ class _XTP_EXT_CLASS CXTPSyntaxEditColorSampleText : public CStatic { public: /** * @brief * Default object constructor. */ CXTPSyntaxEditColorSampleText(); /** * @brief * Default object destructor. */ virtual ~CXTPSyntaxEditColorSampleText(); public: /** * @brief * Sets the text color. * @param crText Text color to be set. */ void SetTextColor(COLORREF crText); /** * @brief * Gets the text color. * @return * The text color. */ COLORREF GetTextColor() const; /** * @brief * Sets the background color. * @param crBack Background color to be set. */ void SetBackColor(COLORREF crBack); /** * @brief * Gets the background color. * @return * The background color. */ COLORREF GetBackColor() const; /** * @brief * Sets the border color. * @param crBorder Border color to be set. */ void SetBorderColor(COLORREF crBorder); /** * @brief * Gets the border color. * @return * The border color. */ COLORREF GetBorderColor() const; /** * @brief * Redraws the control. */ void Refresh(); //{{AFX_VIRTUAL(CXTPSyntaxEditColorSampleText) //}}AFX_VIRTUAL //{{AFX_MSG(CXTPSyntaxEditColorSampleText) /** @cond */ afx_msg void OnNcPaint(); afx_msg void OnPaint(); afx_msg void OnSysColorChange(); afx_msg void OnEnable(BOOL bEnable); /** @endcond */ //}}AFX_MSG /** @cond */ DECLARE_MESSAGE_MAP() /** @endcond */ private: CXTPPaintManagerColor m_crBack; CXTPPaintManagerColor m_crText; CXTPPaintManagerColor m_crBorder; }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSYNTAXEDITPROPERTIESSAMPLETEXT_H__) /** @endcond */