/** * @file XTPMarkupCanvas.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(__XTPMARKUPCANVAS_H__) # define __XTPMARKUPCANVAS_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupUIElement; class CXTPMarkupDrawingContext; class CXTPMarkupDependencyProperty; class _XTP_EXT_CLASS CXTPMarkupCanvas : public CXTPMarkupPanel { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupCanvas) /** @endcond */ protected: CXTPMarkupCanvas(); virtual ~CXTPMarkupCanvas(); public: static void AFX_CDECL SetLeft(CXTPMarkupUIElement* pElement, int nLeft); static void AFX_CDECL SetTop(CXTPMarkupUIElement* pElement, int nTop); static void AFX_CDECL SetRight(CXTPMarkupUIElement* pElement, int nRight); static void AFX_CDECL SetBottom(CXTPMarkupUIElement* pElement, int nBottom); static int AFX_CDECL GetLeft(CXTPMarkupUIElement* pElement); static int AFX_CDECL GetTop(CXTPMarkupUIElement* pElement); static int AFX_CDECL GetRight(CXTPMarkupUIElement* pElement); static int AFX_CDECL GetBottom(CXTPMarkupUIElement* pElement); static BOOL AFX_CDECL TryGetLeft(CXTPMarkupUIElement* pElement, int& nValue); static BOOL AFX_CDECL TryGetTop(CXTPMarkupUIElement* pElement, int& nValue); static BOOL AFX_CDECL TryGetRight(CXTPMarkupUIElement* pElement, int& nValue); static BOOL AFX_CDECL TryGetBottom(CXTPMarkupUIElement* pElement, int& nValue); protected: /** * @brief * Determines the size required for this element during layout, based * on the size of its child elements. * @param pDC Pointer to a valid device context. * @param availableSize Available size for this element. * @return * The size required for this element during layout, based on the size * of its child elements. */ virtual CSize MeasureOverride(CXTPMarkupDrawingContext* pDC, CSize availableSize); virtual CSize ArrangeOverride(CSize arrangeSize); /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupTextBlock); # endif afx_msg void OleSetLeft(LPDISPATCH lpElementDisp, int nValue); afx_msg void OleSetRight(LPDISPATCH lpElementDisp, int nValue); afx_msg void OleSetTop(LPDISPATCH lpElementDisp, int nValue); afx_msg void OleSetBottom(LPDISPATCH lpElementDisp, int nValue); afx_msg int OleGetLeft(LPDISPATCH lpElementDisp); afx_msg int OleGetTop(LPDISPATCH lpElementDisp); afx_msg int OleGetRight(LPDISPATCH lpElementDisp); afx_msg int OleGetBottom(LPDISPATCH lpElementDisp); /** @endcond */ public: static CXTPMarkupDependencyProperty* m_pTopProperty; static CXTPMarkupDependencyProperty* m_pLeftProperty; static CXTPMarkupDependencyProperty* m_pRightProperty; static CXTPMarkupDependencyProperty* m_pBottomProperty; }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPCANVAS_H__) /** @endcond */