/** * @file XTPMarkupWrapPanel.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(__XTPMARKUPWRAPPANEL_H__) # define __XTPMARKUPWRAPPANEL_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupDependencyProperty; class CXTPMarkupDrawingContext; /** * @brief * CXTPMarkupWrapPanel is a CXTPMarkupPanel derived class. * It implements the WrapPanel XAML Tag. */ class _XTP_EXT_CLASS CXTPMarkupWrapPanel : public CXTPMarkupPanel { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupWrapPanel) /** @endcond */ protected: /** * @brief * Constructs a CXTPMarkupWrapPanel object. */ CXTPMarkupWrapPanel(); /** * @brief * Destroys a CXTPMarkupWrapPanel object, handles cleanup and deallocation. */ virtual ~CXTPMarkupWrapPanel(); public: /** * @brief * Sets the orientation of child elements inside WrapPanel. * @param orientation An XTPMarkupOrientation enumeration value; * xtpMarkupOrientationHorizontal to position elements horizontally, * xtpMarkupOrientationVertical to position elements vertically. */ void SetOrientation(XTPMarkupOrientation orientation); /** * @brief * Retrieves the current orientation of child elements inside WrapPanel. * @return * An XTPMarkupOrientation enumeration value; * xtpMarkupOrientationHorizontal if elements are positioned horizontally, * xtpMarkupOrientationVertical if elements are positioned vertically. */ XTPMarkupOrientation GetOrientation() const; protected: /** @cond */ // Implementation virtual CSize MeasureOverride(CXTPMarkupDrawingContext* pDC, CSize szAvailableSize); virtual CSize ArrangeOverride(CSize szFinalSize); protected: void ArrangeLine(int nPanelHeight, int nLineHeight, int nFirstElement, int nCount); public: static CXTPMarkupDependencyProperty* m_pOrientationProperty; static CXTPMarkupDependencyProperty* m_pItemHeightProperty; static CXTPMarkupDependencyProperty* m_pItemWidthProperty; /** @endcond */ /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupWrapPanel); # endif afx_msg long OleGetOrientation(); afx_msg void OleSetOrientation(long nValue); /** @endcond */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPWRAPPANEL_H__) /** @endcond */