/** * @file XTPMarkupTextElement.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(__XTPMARKUPTEXTELEMENT_H__) # define __XTPMARKUPTEXTELEMENT_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupObject; class CXTPMarkupBrush; class CXTPMarkupDependencyProperty; class _XTP_EXT_CLASS CXTPMarkupTextElement : public CXTPMarkupFrameworkContentElement { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupTextElement) /** @endcond */ protected: CXTPMarkupTextElement(); virtual ~CXTPMarkupTextElement(); public: void SetBackground(CXTPMarkupBrush* pBrush); void SetBackground(COLORREF clr); static void AFX_CDECL SetBackground(CXTPMarkupObject* pObject, CXTPMarkupBrush* pBrush); CXTPMarkupBrush* GetBackground() const; void SetForeground(CXTPMarkupBrush* pBrush); void SetForeground(COLORREF clr); static void AFX_CDECL SetForeground(CXTPMarkupObject* pObject, CXTPMarkupBrush* pBrush); CXTPMarkupBrush* GetForeground() const; void SetFontSize(int nFontSize); int GetFontSize() const; void SetFontWeight(int nFontWeight); int GetFontWeight() const; void SetFontFamily(LPCWSTR lpszFontFamily); LPCWSTR GetFontFamily() const; void SetFontStyle(int nFontStyle); int GetFontStyle() const; void SetTextDecorations(int nTextDecorations); int GetTextDecorations() const; /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupTextElement); # endif afx_msg long OleGetTextDecorations(); afx_msg void OleSetTextDecorations(long nValue); afx_msg long OleGetFontSize(); afx_msg void OleSetFontSize(long nValue); afx_msg long OleGetFontWeight(); afx_msg void OleSetFontWeight(long nValue); afx_msg BSTR OleGetFontFamily(); afx_msg void OleSetFontFamily(LPCTSTR lpszValue); afx_msg long OleGetFontStyle(); afx_msg void OleSetFontStyle(long nValue); afx_msg LPDISPATCH OleGetBackground(); afx_msg void OleSetBackground(LPDISPATCH lpBackground); afx_msg LPDISPATCH OleGetForeground(); afx_msg void OleSetForeground(LPDISPATCH lpBackground); afx_msg VARIANT OleGetTag(); afx_msg void OleSetTag(const VARIANT& va); /** @endcond */ public: static CXTPMarkupDependencyProperty* m_pBackgroundProperty; static CXTPMarkupDependencyProperty* m_pForegroundProperty; static CXTPMarkupDependencyProperty* m_pFontSizeProperty; static CXTPMarkupDependencyProperty* m_pFontWeightProperty; static CXTPMarkupDependencyProperty* m_pFontFamilyProperty; static CXTPMarkupDependencyProperty* m_pFontStyleProperty; static CXTPMarkupDependencyProperty* m_pTextDecorationsProperty; static CXTPMarkupDependencyProperty* m_pFontQualityProperty; static CXTPMarkupDependencyProperty* m_pFontCharsetProperty; }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPTEXTELEMENT_H__) /** @endcond */