/** * @file XTPChartDiagram2DPane.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(__XTPCHARTDIAGRAM2DPANE_H__) # define __XTPCHARTDIAGRAM2DPANE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartAxis; class CXTPChartDiagram2D; class CXTPChartElementView; class CXTPChartDeviceContext; class CXTPChartDeviceCommand; class CXTPChartAxisView; class CXTPChartFillStyle; class CXTPChartDiagram2DAppearance; class CXTPChartAxisView; class CXTPChartDiagram2DAxisView; class CXTPChartBoundElementView; class CXTPChartSeriesView; namespace Gdiplus { class Matrix; } class _XTP_EXT_CLASS CXTPChartDiagram2DPane : public CXTPChartElement { DECLARE_DYNAMIC(CXTPChartDiagram2DPane); public: CXTPChartDiagram2DPane(CXTPChartDiagram* pDiagram); virtual ~CXTPChartDiagram2DPane(); public: virtual CXTPChartElementView* CreateView(CXTPChartDeviceContext* pDC, CXTPChartElementView* pParent); CXTPChartDiagram2D* GetDiagram() const; public: CXTPChartColor GetBackgroundColor() const; CXTPChartColor GetBackgroundColor2() const; CXTPChartColor GetBorderColor() const; CXTPChartColor GetActualBackgroundColor() const; CXTPChartColor GetActualBackgroundColor2() const; CXTPChartColor GetActualBorderColor() const; void SetBackgroundColor(const CXTPChartColor& color); void SetBackgroundColor2(const CXTPChartColor& color); void SetBorderColor(const CXTPChartColor& color); CXTPChartFillStyle* GetFillStyle() const; public: void DoPropExchange(CXTPPropExchange* pPX); public: CXTPChartDiagram2DAppearance* GetAppearance() const; CXTPChartFillStyle* GetActualFillStyle() const; protected: CXTPChartColor m_clrBackgroundColor; CXTPChartColor m_clrBackgroundColor2; CXTPChartColor m_clrBorderColor; CXTPChartFillStyle* m_pBackgroundFillStyle; }; class _XTP_EXT_CLASS CXTPChartDiagram2DPaneView : public CXTPChartElementView { public: CXTPChartDiagram2DPaneView(CXTPChartDiagram2DPane* pPane, CXTPChartElementView* pParent); ~CXTPChartDiagram2DPaneView(); public: CRect GetBounds() const; CXTPChartPointF GetScreenPoint(const CXTPChartSeriesView* pView, double x, double y) const; void CalculateView(CRect rcBounds); public: CXTPChartAxisView* GetAxisView(CXTPChartAxis* pAxis) const; CXTPChartElementView* CreateSeriesView(); protected: virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); virtual CXTPChartDeviceCommand* CreateGridLinesDeviceCommand(CXTPChartDeviceContext* pDC, CXTPChartDiagram2DAxisView* pAxis); virtual CXTPChartDeviceCommand* CreateInterlacedDeviceCommand( CXTPChartDeviceContext* pDC, CXTPChartDiagram2DAxisView* pAxis); virtual CXTPChartDeviceCommand* CreateConstantLinesDeviceCommand( CXTPChartDeviceContext* pDC, CXTPChartDiagram2DAxisView* pAxis, BOOL bBehind); virtual CXTPChartDeviceCommand* CreateStripsDeviceCommand(CXTPChartDeviceContext* pDC, CXTPChartDiagram2DAxisView* pAxis); public: virtual void OnLButtonDown(UINT nFlags, CPoint point); virtual void OnMouseMove(UINT nFlags, CPoint point); virtual BOOL OnSetCursor(CPoint point); public: CXTPChartDiagram2DPane* m_pPane; CXTPChartElementView* m_pSeriesView; CRect m_rcBounds; CPoint m_ptOldPosition; }; AFX_INLINE CXTPChartDiagram2D* CXTPChartDiagram2DPane::GetDiagram() const { return (CXTPChartDiagram2D*)m_pOwner; } AFX_INLINE CRect CXTPChartDiagram2DPaneView::GetBounds() const { return m_rcBounds; } AFX_INLINE CXTPChartFillStyle* CXTPChartDiagram2DPane::GetFillStyle() const { return m_pBackgroundFillStyle; } AFX_INLINE void CXTPChartDiagram2DPane::SetBackgroundColor(const CXTPChartColor& color) { m_clrBackgroundColor = color; OnChartChanged(); } AFX_INLINE void CXTPChartDiagram2DPane::SetBackgroundColor2(const CXTPChartColor& color) { m_clrBackgroundColor2 = color; OnChartChanged(); } AFX_INLINE void CXTPChartDiagram2DPane::SetBorderColor(const CXTPChartColor& color) { m_clrBorderColor = color; OnChartChanged(); } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTDIAGRAM2DPANE_H__) /** @endcond */