⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chartwnd.h

📁 The application wizard has created this SoccerDoctor application for you. This application not onl
💻 H
字号:
/************************************************************************************************
// $Header: /home/cvsroot/SoccerDoctor/Chart/ChartWnd.h,v 1.1 2002/09/07 06:03:54 peter Exp $
//***********************************************************************************************
/************************************************************************************************/
/*                                                                                              */
/* File    : ChartWnd.h                                                                         */
/*                                                                                              */
/* Purpose : interface for the plot area of the CChartCtrl                                      */
/*                                                                                              */
/* Author  : Scott Pelger                                             Date Created: 10JUN02     */
/*                                                                                              */
/* Revisions                                                                                    */
/*                                                                                              */
/* Engineer              Date        Description                                                */
/*                                                                                              */
/* Scott Pelger          10JUN02     initial version                                            */
/*                                                                                              */
/************************************************************************************************/
#if !defined(AFX_CHARTWND_H__457E2A40_CD7D_11D5_8037_8C7A05B7325A__INCLUDED_)
#define AFX_CHARTWND_H__457E2A40_CD7D_11D5_8037_8C7A05B7325A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ChartWndBase.h"
#include "2DScale.h"
#include "DataSeries.h"
#include "PopupWindow.h"

class CChartWnd : public CChartWndBase {
    
    // Construction
    public:
        CChartWnd();

    // Attributes
    public:
        CDataSeriesArray m_DataSeriesArray;

    private:
        C2DScale            m_Axis;
        CFont*              m_pYAxisFont;
        BOOL                m_bRotate;
        enum STYLES         m_eStyle;
        enum CHART_TYPE     m_eChartType;
        
        /****for the popup window****/
        WORD                m_wDataPoint;
        CPopupWindow        m_PopupWindow;
        CDataPoint*         m_pCurrentDataPoint;
        /****for the popup window****/

        /****for fast window updates****/
        CBitmap             m_GraphBitmap;
        CBitmap             m_WholeBitmap;
        BOOL                m_bScrolling;
        BOOL                m_bRefreshDisplayCompletely;
        CRect               m_PlotRect;
        /****for fast window updates****/
        
    // Operations
    public:
        void                SetChartType(enum CHART_TYPE eChartType);
        enum CHART_TYPE     GetChartType(void) {return m_eChartType;};
        void                SetStyle(enum STYLES eStyle) {m_eStyle = eStyle;};
        DWORD               GetStyle(void) {return m_eStyle;};
        void                SetGenericAxisStyle(DWORD dwStyle) {m_Axis.SetStyle(GENERIC_STYLE|dwStyle);};
        DWORD               GetGenericAxisStyle(void) {return m_Axis.GetStyle(GENERIC_STYLE);};

        void                NotifyRemovedDataPoint(BOOL bRemoved) {m_Axis.NotifyRemovedDataPoint(bRemoved);};
        void                DrawChart(void);

    private:
        void                _DisplayPopupWindow(CPoint& Point);
        void                _ExecuteDoubleClick(UINT nFlags, CPoint& Point);
        CDataPoint*         _DataPointHitTest(CPoint& Point);
        
    // Overrides
	    // ClassWizard generated virtual function overrides
	    //{{AFX_VIRTUAL(CChartWnd)
	    //}}AFX_VIRTUAL

    // Implementation
    public:
        BOOL                SetFont(BYTE byPointSize, char* psFontName, BYTE byStyle/*=0*/);
        CDataSeries*        GetDataSeries(int nDataSeries) {return m_DataSeriesArray.GetDataSeries(nDataSeries);};
        /****axis methods****/
        COLORREF            GetLineColor(void) {return m_Axis.GetLineColor();};
        void                SetLineColor(COLORREF LineColor) {m_Axis.SetLineColor(LineColor);};

        COLORREF            GetChartFillColor(void) {return m_Axis.GetChartFillColor();};
        void                SetChartFillColor(COLORREF FillColor) {m_Axis.SetChartFillColor(FillColor);};
                
        void                SetAxisScale(enum AXIS eAxis, double dMin, double dMax) {m_Axis.SetAxisScale(eAxis, dMin, dMax);};
        void                GetAxisScale(enum AXIS eAxis, double& dMin, double& dMax) {m_Axis.GetAxisScale(eAxis, dMin, dMax);};

        void                SetScaleStep(enum AXIS eAxis, double dMin, double dMax) {m_Axis.SetScaleStep(eAxis, dMin, dMax);};
        void                GetScaleStep(enum AXIS eAxis, double& dMin, double& dMax) {m_Axis.GetScaleStep(eAxis, dMin, dMax);};
        
        void                SetAxisFormatString(enum AXIS eAxis, CString& Format) {m_Axis.SetAxisFormatString(eAxis, Format);};
        
        void                SetAxisStyles(enum AXIS eAxis, DWORD dwStyle) {m_Axis.SetStyle(dwStyle|eAxis);};
        DWORD               GetAxisStyles(enum AXIS eAxis) {return m_Axis.GetStyle(eAxis);};

        BYTE                GetDepth(void) {return m_Axis.GetDepth();};
        double              GetHorzRotation(void) {return m_Axis.GetHorzRotation();};
        double              GetVertRotation(void) {return m_Axis.GetVertRotation();};
        void                SetDepth(BYTE yDepth) {m_Axis.SetDepth(yDepth);};
        void                SetHorzRotation(double dHorzRotation) {m_Axis.SetHorzRotation(dHorzRotation);};
        void                SetVertRotation(double dVertRotation) {m_Axis.SetVertRotation(dVertRotation);};
        void                SetPieChartHeight(double dHeight) {m_DataSeriesArray.SetHeight(dHeight);};
        void                SetPieChartElevation(double dElevation) {m_DataSeriesArray.SetElevation(dElevation);};
        
        void                SetAxisText(enum AXIS eAxis, CString* String) {m_Axis.SetAxisText(eAxis, String);};
        /****axis methods****/
        
        virtual             ~CChartWnd();

	    // Generated message map functions
    protected:
	    //{{AFX_MSG(CChartWnd)
	    afx_msg void        OnPaint();
	    afx_msg void        OnLButtonDown(UINT nFlags, CPoint point);
	    afx_msg void        OnLButtonUp(UINT nFlags, CPoint point);
	    afx_msg void        OnMouseMove(UINT nFlags, CPoint point);
	    afx_msg int         OnCreate(LPCREATESTRUCT lpCreateStruct);
	    afx_msg void        OnSize(UINT nType, int cx, int cy);
	    afx_msg void        OnLButtonDblClk(UINT nFlags, CPoint point);
	    //}}AFX_MSG
        DECLARE_MESSAGE_MAP()
    };

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHARTWND_H__457E2A40_CD7D_11D5_8037_8C7A05B7325A__INCLUDED_)


//***********************************************************************************************
// END OF FILE
// $Log: ChartWnd.h,v $
// Revision 1.1  2002/09/07 06:03:54  peter
// 新的chart类,从别的地方拷来的
//
//***********************************************************************************************

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -