/** * @file XTPChartPanel.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(__XTPCHARTPANEL_H__) # define __XTPCHARTPANEL_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartDiagram; class CXTPChartPanelCollection; class CXTPChartTitleCollection; /** * @brief * This class abstracts a chart panel. It is used in panel charts. * * @details * Panel Charts are charts that have multiple regions which compare similar * data sets side by side (in separate panels) rather than right on top of * each other. Essentially a single chart is repeated across a grid, with * different data sets in each instance of the chart. */ class _XTP_EXT_CLASS CXTPChartPanel : public CXTPChartElement { DECLARE_DYNAMIC(CXTPChartPanel); public: /** * @brief * Constructs a CXTPChartPanel object. */ CXTPChartPanel(); /** * @brief * Destroys a CXTPChartMarker object, handles cleanup. */ virtual ~CXTPChartPanel(); public: /** * @brief * Call this function to get the the title collection object. * * @return * A pointer to a CXTPChartTitleCollection object. */ CXTPChartTitleCollection* GetTitles() const; public: void Remove(); virtual void DoPropExchange(CXTPPropExchange* pPX); public: protected: CXTPChartTitleCollection* m_pTitles; protected: friend class CXTPChartPanelCollection; friend class CXTPChartContent; }; /** * @brief * This class abstracts a chart panel collection. It is used in panel charts. * * @details * Panel Charts are charts that have multiple regions which compare similar * data sets side by side (in separate panels) rather than right on top of * each other. Essentially a single chart is repeated across a grid, with * different data sets in each instance of the chart. */ class _XTP_EXT_CLASS CXTPChartPanelCollection : public CXTPChartElementCollection { public: /** * @brief * Constructs a CXTPChartPanelCollection object. * @param pOwner Pointer to an owner element. */ CXTPChartPanelCollection(CXTPChartContent* pOwner); /** * @brief * Destroys a CXTPChartPanelCollection object, handles cleanup. */ virtual ~CXTPChartPanelCollection(); public: /** * @brief * Call this function to add a panel to the collection. * * @param pPanel A pointer to the panel object which is to be added. * @return Adds a panel to collection */ CXTPChartPanel* Add(CXTPChartPanel* pPanel); /** * @brief * Call this function to get the panel at a particular index in the * collection. * * @param nIndex Zero-based index of the panel to be fetched. * * @return * A pointer to the chart panel object. */ CXTPChartPanel* GetAt(int nIndex) const; public: void DoPropExchange(CXTPPropExchange* pPX); protected: # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartPanelCollection); afx_msg long OleGetItemCount(); afx_msg LPDISPATCH OleGetItem(long nIndex); void OleAdd(LPDISPATCH lpDisp); DECLARE_ENUM_VARIANT(CXTPChartPanelCollection) /** @endcond */ # endif protected: friend class CXTPChartContent; }; AFX_INLINE CXTPChartPanel* CXTPChartPanelCollection::GetAt(int nIndex) const { return nIndex >= 0 && nIndex < m_arrElements.GetSize() ? (CXTPChartPanel*)m_arrElements.GetAt(nIndex) : NULL; } AFX_INLINE CXTPChartTitleCollection* CXTPChartPanel::GetTitles() const { return m_pTitles; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTPANEL_H__) /** @endcond */