/** * @file XTPTabManagerNavigateButtons.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(__XTPTABMANAGERNAVIGATEBUTTONS_H__) # define __XTPTABMANAGERNAVIGATEBUTTONS_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPTabManagerNavigateButtons is a class used to represent * a collection of tab navigation buttons. */ class _XTP_EXT_CLASS CXTPTabManagerNavigateButtons { public: /** * @brief * Constructs a CXTPTabManagerNavigateButtons object. */ CXTPTabManagerNavigateButtons(); /** * @brief * Destroys a CXTPTabManagerNavigateButtons object, handles cleanup and deallocation. */ virtual ~CXTPTabManagerNavigateButtons(); public: /** * @brief * Retrieves the tab navigation button at a specified index in the collection. * @param nIndex Zero-based index of the tab navigation button to retrieve. * @return * A pointer to the tab naviation navigation button at the specified index * in the collection if successful, otherwise NULL. */ CXTPTabManagerNavigateButton* GetAt(int nIndex) const; /** * @brief * Retrieves the tab navigation button at a specified index in the collection. * @param nIndex Zero-based index of the tab navigation button to retrieve. * @return * A pointer to the tab naviation navigation button at the specified index * in the collection if successful, otherwise NULL. */ CXTPTabManagerNavigateButton* operator[](int nIndex) const; /** * @brief * Adds a specified tab navigation button to the collection. * @param pButton Pointer to the tab navigation button to be added. * @return * The zero-based index of the newly added tab navigation button. */ int Add(CXTPTabManagerNavigateButton* pButton); /** * @brief * Inserts a specified tab navigation button to the collection. * @param nIndex Zero-based index to insert the tab navigation button at. * @param pButton Pointer to the tab navigation button to be inserted. */ void InsertAt(int nIndex, CXTPTabManagerNavigateButton* pButton); /** * @brief * Removes the tab navigation button at a specified index from the collection. * @param nIndex Index of the tab navigation button to be removed. */ void RemoveAt(int nIndex); /** * @brief * Removes all tab navigation buttons from the collection. */ void RemoveAll(); /** * @brief * Gets the number of tab navigation buttons in the collection. * @return * The number of tab navigation buttons in the collection. */ int GetSize() const; protected: CArray m_arrButtons; /**< Collection of tab navigation buttons. */ }; AFX_INLINE CXTPTabManagerNavigateButton* CXTPTabManagerNavigateButtons::GetAt(int nIndex) const { return m_arrButtons.GetAt(nIndex); } AFX_INLINE int CXTPTabManagerNavigateButtons::Add(CXTPTabManagerNavigateButton* pButton) { return (int)m_arrButtons.Add(pButton); } AFX_INLINE int CXTPTabManagerNavigateButtons::GetSize() const { return (int)m_arrButtons.GetSize(); } AFX_INLINE void CXTPTabManagerNavigateButtons::InsertAt(int nIndex, CXTPTabManagerNavigateButton* pButton) { m_arrButtons.InsertAt(nIndex, pButton); } AFX_INLINE CXTPTabManagerNavigateButton* CXTPTabManagerNavigateButtons::operator[](int nIndex) const { return m_arrButtons.GetAt(nIndex); } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTABMANAGERNAVIGATEBUTTONS_H__) /** @endcond */