/** * @file XTPMarkupUniformGrid.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(__XTPMARKUPUNIFORMGRID_H__) # define __XTPMARKUPUNIFORMGRID_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupDependencyProperty; class CXTPMarkupDrawingContext; /** * @brief * CXTPMarkupUniformGrid is a CXTPMarkupPanel derived class. * It implements the UniformGrid XAML Tag. */ class _XTP_EXT_CLASS CXTPMarkupUniformGrid : public CXTPMarkupPanel { /** @cond */ DECLARE_MARKUPCLASS(CXTPMarkupUniformGrid) /** @endcond */ protected: /** * @brief * Constructs a CXTPMarkupUniformGrid object. */ CXTPMarkupUniformGrid(); /** * @brief * Destroys a CXTPMarkupUniformGrid object, handles cleanup and deallocation. */ virtual ~CXTPMarkupUniformGrid(); public: /** * @brief * Sets the number of columns in the grid. * @param nColumns Number of columns to set. */ void SetColumns(int nColumns); /** * @brief * Gets the number of columns in the grid. * @return * The number of columns in the grid. */ int GetColumns() const; /** * @brief * Sets the number of rows in the grid. * @param nRows Number of rows to set. */ void SetRows(int nRows); /** * @brief * Gets the number of rows in the grid. * @return * The number of rows in the grid. */ int GetRows() const; /** * @brief * Sets the position for the first column of the first row of the grid. * @param nFirstColumn Position to be set. */ void SetFirstColumn(int nFirstColumn); /** * @brief * Gets the position of the first column of the first row of the grid. * The position of the first column of the first row of the grid. * @return Returns position of the first column in the first row of the grid */ int GetFirstColumn() const; protected: /** @cond */ // Implementation virtual CSize MeasureOverride(CXTPMarkupDrawingContext* pDC, CSize szAvailableSize); virtual CSize ArrangeOverride(CSize szFinalSize); private: void UpdateComputedValues(); private: int m_nColumns; int m_nRows; int m_nFirstColumn; public: static CXTPMarkupDependencyProperty* m_pFirstColumnProperty; static CXTPMarkupDependencyProperty* m_pColumnsProperty; static CXTPMarkupDependencyProperty* m_pRowsProperty; /** @endcond */ /** @cond */ public: DECLARE_DISPATCH_MAP() # ifdef _XTP_ACTIVEX DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPMarkupUniformGrid); # endif afx_msg long OleGetColumns(); afx_msg long OleGetRows(); afx_msg long OleGetFirstColumn(); afx_msg void OleSetColumns(long); afx_msg void OleSetRows(long); afx_msg void OleSetFirstColumn(long); /** @endcond */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPMARKUPUNIFORMGRID_H__) /** @endcond */