/** * @file XTPChartDiagram2DView.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(__XTPCHARTDIAGRAM2DVIEW_H__) # define __XTPCHARTDIAGRAM2DVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartAxis; class CXTPChartDiagram2DPane; class CXTPChartDiagram2DPaneView; class CXTPChartDiagram2DAppearance; class CXTPChartAxisView; /** * @brief * This class represents the view of a chart 2D diagram, which is a kind of * CXTPChartDiagramView. */ class _XTP_EXT_CLASS CXTPChartDiagram2DView : public CXTPChartDiagramView { public: /** * @brief * Constructs a CXTPChartDiagram2DView object. * * @param pDiagram A pointer to the chart diagram object. * @param pParent A pointer to the parent view object. */ CXTPChartDiagram2DView(CXTPChartDiagram* pDiagram, CXTPChartElementView* pParent); /** * @brief * Call this function to get the diagram pane view object to which this * CXTPChartDiagram2DView object is associated with. * @return Returns diagram pane view object */ CXTPChartDiagram2DPaneView* GetPaneView() const; /** * @brief * Call this function to create the view of the 2D diagram. * * @param pDC A pointer to the chart device context. */ void CreateView(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to calculate the layout based on a rectangular * boundary. * * @param pDC A pointer to the chart device context. * @param rcBounds The diagram boundary. */ void CalculateView(CXTPChartDeviceContext* pDC, CRect rcBounds); void UpdateRange(CXTPChartDeviceContext* pDC); /** * @brief * Use this function to add an axis view to the diagram view. * boundary. * * @param pDC A pointer to the chart device context. * @param pParentView The parent view of the axis view. * @param pAxis A pointer to the axis object whose view is to be * added. */ void AddAxisView(CXTPChartDeviceContext* pDC, CXTPChartElementView* pParentView, CXTPChartAxis* pAxis); virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to get the view for an axis object. * * @param pAxis A pointer to the axis object whose view is to be returned. * * @return The view for the specified axis object. */ CXTPChartAxisView* GetAxisView(CXTPChartAxis* pAxis) const; virtual void OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); virtual void OnLButtonDown(UINT nFlags, CPoint point); virtual BOOL OnSetCursor(CPoint point); public: void CheckLabelBounds(const CXTPChartRectF& rcBounds); public: CXTPChartElementView* m_pAxisViews; /**< The axis view.*/ CXTPChartDiagram2DPaneView* m_pPaneView; /**< The pane view.*/ CRect m_rcLabelPadding; }; AFX_INLINE CXTPChartDiagram2DPaneView* CXTPChartDiagram2DView::GetPaneView() const { return m_pPaneView; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTDIAGRAM2DVIEW_H__) /** @endcond */