/** * @file XTPMarkupPanel.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(__XTPMARKUPPANEL_H__) # define __XTPMARKUPPANEL_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupBrush; class CXTPMarkupUIElementCollection; class CXTPMarkupVisual; class CXTPMarkupBuilder; class CXTPMarkupObject; class CXTPMarkupDrawingContext; class CXTPMarkupInputElement; class CXTPMarkupDependencyProperty; /** * @brief * CXTPMarkupPanel is a CXTPMarkupFrameworkElement derived class. It * implements a base class for all container objects with multiple children. */ class _XTP_EXT_CLASS CXTPMarkupPanel : public CXTPMarkupFrameworkElement { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupPanel) /** @endcond */ protected: /** * @brief * Constructs a CXTPMarkupPanel object. */ CXTPMarkupPanel(); /** * @brief * Destroys a CXTPMarkupPanel object, handles cleanup and deallocation. */ virtual ~CXTPMarkupPanel(); public: /** * @brief * Retrieves the collection of child elements. * @return * A pointer to a CXTPMarkupUIElementCollection object. */ CXTPMarkupUIElementCollection* GetChildren() const; public: /** * @brief * Sets the background brush for the panel object. * @param pBrush Pointer to a CBrush object. */ void SetBackground(CXTPMarkupBrush* pBrush); /** * @brief * Gets the background brush of the panel object. * @return * A pointer to the background brush of the panel object. */ CXTPMarkupBrush* GetBackground() const; protected: /** @cond */ // Implementation virtual int GetVisualChildrenCount() const; virtual CXTPMarkupVisual* GetVisualChild(int nIndex) const; protected: virtual void SetContentObject(CXTPMarkupBuilder* pBuilder, CXTPMarkupObject* pContent); virtual BOOL HasContentObject() const; virtual void OnRender(CXTPMarkupDrawingContext* drawingContext); virtual CXTPMarkupInputElement* InputHitTestOverride(CPoint point) const; protected: CXTPMarkupUIElementCollection* m_pChildren; public: static CXTPMarkupDependencyProperty* m_pBackgroundProperty; /** @endcond */ /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupPanel); # endif afx_msg LPDISPATCH OleGetChildren(); afx_msg LPDISPATCH OleGetBackground(); afx_msg void OleSetBackground(LPDISPATCH lpBackground); /** @endcond */ }; AFX_INLINE CXTPMarkupUIElementCollection* CXTPMarkupPanel::GetChildren() const { return m_pChildren; } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPPANEL_H__) /** @endcond */