/** * @file XTPGridRecordItemRange.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(__XTPGRIDRECORDITEMRANGE_H__) # define __XTPGRIDRECORDITEMRANGE_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPGridRecordItem; class _XTP_EXT_CLASS CXTPGridRecordItemId { public: CXTPGridRecordItemId(); CXTPGridRecordItemId(int nColumn, int nRecord); void Set(int nColumn, int nRecord); int GetColumn() const; int GetRecord() const; bool operator==(const CXTPGridRecordItemId& otherId) const; public: int m_nColumn; /**< Column index. */ int m_nRecord; /**< Record index. */ }; class _XTP_EXT_CLASS CXTPGridRecordMergeItemId : public CXTPGridRecordItemId { public: CXTPGridRecordMergeItemId(); CXTPGridRecordMergeItemId(int nColumnPos, int nColumn, int nRecord); public: int m_nColumnPos; /**< Column position. */ }; class _XTP_EXT_CLASS CXTPGridRecordItemRange { public: CXTPGridRecordItemRange(); CXTPGridRecordItemRange(int nColumnFrom, int nColumnTo, int nRecordFrom, int nRecordTo); void SetTopLeft(const CXTPGridRecordItemId topLeft); void SetBottomRight(const CXTPGridRecordItemId bottomRight); void ExpandTo(int nColumn, int nRecord); void ExpandTo(const CXTPGridRecordItemId expand); void Invalidate(); bool IsValid() const; bool IsInRange(const int nColumn, const int nRecord) const; bool IsNeighbour(const int nColumn, const int nRecord) const; bool IsConnected(const int nColumn, const int nRecord) const; public: int m_nColumnFrom; int m_nColumnTo; int m_nRecordFrom; int m_nRecordTo; }; class _XTP_EXT_CLASS CXTPGridRecordMergeItem { public: CXTPGridRecordMergeItem(); CXTPGridRecordMergeItem(const CXTPGridRecordMergeItem& other); CXTPGridRecordMergeItem& operator=(const CXTPGridRecordMergeItem& other); void AddItem(CXTPGridRecordMergeItemId itemId, CRect rcItem); bool FindRange(CXTPGridRecordItemRange& range, CRect& rcItem); struct Item { CXTPGridRecordMergeItemId m_itemId; CRect m_rcItem; }; public: void CopyFrom(const CXTPGridRecordMergeItem& other); CList m_items; }; class _XTP_EXT_CLASS CXTPGridRecordMergeItems : public CMap { }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPGRIDRECORDITEMRANGE_H__) /** @endcond */