/** * @file XTPMarkupDockPanel.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(__XTPMARKUPDOCKPANEL_H__) # define __XTPMARKUPDOCKPANEL_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupUIElement; class CXTPMarkupDrawingContext; class CXTPMarkupObject; class CXTPMarkupPropertyChangedEventArgs; class CXTPMarkupBuilder; class CXTPMarkupDependencyProperty; /** * @brief * Defines markup docking direction. */ enum XTPMarkupDock { xtpMarkupDockLeft, /**< Specifies docking to the left. */ xtpMarkupDockTop, /**< Specifies docking to the top. */ xtpMarkupDockRight, /**< Specifies docking to the right. */ xtpMarkupDockBottom /**< Specifies docking to the bottom. */ }; /** * @brief * CXTPMarkupDockPanel is a CXTPMarkupPanel derived class. * It implements the DockPanel XAML Tag. */ class _XTP_EXT_CLASS CXTPMarkupDockPanel : public CXTPMarkupPanel { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupDockPanel) /** @endcond */ protected: /** * @brief * Constructs a CXTPMarkupDockPanel object. */ CXTPMarkupDockPanel(); /** * @brief * Destroys a CXTPMarkupDockPanel object, handles cleanup and deallocation. */ virtual ~CXTPMarkupDockPanel(); public: /** * @brief * Sets the dock position for a child element. * @param pElement Pointer to the child element whose dock position * must be set. * @param dock New dock position for the child element; must be one of * the values defined by the XTPMarkupDock enumeration. * @return */ static void AFX_CDECL SetDock(CXTPMarkupUIElement* pElement, XTPMarkupDock dock); /** * @brief * Retrieves the dock position of a child element. * @param pElement Pointer to the child element whose dock position * must be retrieved. * @return * The dock position of the child element; returns one of the values * defined by the XTPMarkupDock enumeration. */ static XTPMarkupDock AFX_CDECL GetDock(CXTPMarkupUIElement* pElement); public: /** * @brief * Specifies if the last child element inside the whole client area * of DockPanel should be filled. * @param bLastChildFill TRUE to fill the last child element, FALSE otherwise. */ void SetLastChildFill(BOOL bLastChildFill); /** * @brief * Determines if the last child element inside the whole client area * of DockPanel is filled. * @return * TRUE if the last child element is filled, otherwise FALSE. */ BOOL GetLastChildFill() const; protected: /** @cond */ // Implementation virtual CSize MeasureOverride(CXTPMarkupDrawingContext* pDC, CSize szAvailableSize); virtual CSize ArrangeOverride(CSize szFinalSize); private: static void AFX_CDECL OnDockChanged(CXTPMarkupObject* d, CXTPMarkupPropertyChangedEventArgs* e); static CXTPMarkupObject* AFX_CDECL ConvertDock(CXTPMarkupBuilder* pBuilder, CXTPMarkupObject* pObject, CXTPMarkupDependencyProperty* pAssociatedProperty = NULL); public: static CXTPMarkupDependencyProperty* m_pLastChildFillProperty; static CXTPMarkupDependencyProperty* m_pDockProperty; /** @endcond */ /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupDockPanel); # endif afx_msg BOOL OleGetLastChildFill(); afx_msg void OleSetLastChildFill(BOOL nValue); afx_msg int OleGetDock(LPDISPATCH lpElementDisp); afx_msg void OleSetDock(LPDISPATCH lpElementDisp, int nValue); /** @endcond */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPDOCKPANEL_H__) /** @endcond */