/** * @file XTPMarkupInlineUIContainer.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(__XTPMARKUPINLINEUICONTAINER_H__) # define __XTPMARKUPINLINEUICONTAINER_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupObject; class CXTPMarkupUIElement; class CXTPMarkupBuilder; class CXTPMarkupDrawingContext; class _XTP_EXT_CLASS CXTPMarkupInlineUIContainer : public CXTPMarkupInline { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupInlineUIContainer); /** @endcond */ protected: CXTPMarkupInlineUIContainer(); CXTPMarkupInlineUIContainer(CXTPMarkupUIElement* pElement); ~CXTPMarkupInlineUIContainer(); public: void SetChild(CXTPMarkupUIElement* pElement); CXTPMarkupUIElement* GetChild() const; public: virtual POSITION GetContentStartPosition() const; virtual void GetContentNextPosition(POSITION& pos) const; virtual BOOL IsWordBreakPosition(POSITION pos) const; virtual void Render(CXTPMarkupDrawingContext* pDC, CRect rc, POSITION posStart, POSITION posEnd); virtual CSize Measure(CXTPMarkupDrawingContext* pDC, POSITION posStart, POSITION posEnd); virtual void Measure(CXTPMarkupDrawingContext* pDC, POSITION posStart, POSITION posEnd, CXTPSizeF& size); virtual void Arrange(CRect rcFinalRect, POSITION posStart, POSITION posEnd); protected: virtual BOOL HasContentObject() const; virtual void SetContentObject(CXTPMarkupBuilder* pBuilder, CXTPMarkupObject* pContent); virtual int GetLogicalChildrenCount() const; virtual CXTPMarkupObject* GetLogicalChild(int nIndex) const; CXTPMarkupInputElement* InputHitTest(CPoint point) const; /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupInlineUIContainer); # endif afx_msg LPDISPATCH OleGetChild(); afx_msg void OleSetChild(LPDISPATCH lpDisp); /** @endcond */ protected: CXTPMarkupUIElement* m_pChild; }; AFX_INLINE int CXTPMarkupInlineUIContainer::GetLogicalChildrenCount() const { return m_pChild ? 1 : 0; } AFX_INLINE CXTPMarkupObject* CXTPMarkupInlineUIContainer::GetLogicalChild(int nIndex) const { return nIndex == 0 ? (CXTPMarkupObject*)m_pChild : NULL; } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPINLINEUICONTAINER_H__) /** @endcond */