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

📄 legendwnd.h

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

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LegendWnd.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CLegendWnd window

#include "ChartWndBase.h"
#include "LegendText.h"

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

// Attributes
public:
private:
    CPtrArray               m_PointArray;
    CPtrArray               m_SeriesArray;

    BOOL                    m_bShowPointLegend;
    BYTE                    m_yPointSize;
    CString                 m_sFontName;

    CHART_WINDOW_POSITION   m_eLegendPosition;

    int                     m_yAutoHideWidth;
    int                     m_yAutoHideHeight;

// Operations
public:
    void                    SetAutoHide(BYTE yWidth, BYTE yHeight);
    void                    SetLegendPosition(CHART_WINDOW_POSITION eLegendPosition=eRIGHT) {m_eLegendPosition = eLegendPosition;};
    void                    SetInitialWindowSize(CRect* pRect) {m_rcClientRect = *pRect;};
    void                    ShowPointLegend(void) {m_bShowPointLegend = TRUE;};
    void                    ShowSeriesLegend(void) {m_bShowPointLegend = FALSE;};
    void                    AddPointItem(CString& Caption, COLORREF Color);
    void                    RemovePointItem(int nItem);
    void                    AddSeriesItem(CString& Caption, COLORREF Color);
    void                    RemoveSeriesItem(int nItem);
    void                    Purge(void);
    int                     _GetWindowMaxWidth(void);
    int                     _GetWindowMaxHeight(void);
    void                    GetMinimumWindowRect(CRect* pRect);
    void                    GetMinimumWindowRect(CRect& Rect) {GetMinimumWindowRect(&Rect);};
    virtual BOOL            SetFont(BYTE byPointSize, char* psFontName, BYTE byStyle=0);
    virtual COLORREF        SetWindowColor(COLORREF crColor);
    virtual void            SetLegendTextColor(COLORREF Color);
    virtual void            SetLegendSeriesItemColor(COLORREF Color, int nDataSeries=0);
    virtual COLORREF        GetLegendSeriesItemColor(int nDataSeries=0);
    virtual void            SetLegendPointItemColor(COLORREF Color, int nDataPoint=0);
    virtual COLORREF        GetLegendPointItemColor(int nDataPoint=0);

private:
    CLegendText*            _CreateNewLegendItem(CString& Caption, COLORREF Color);
    void                    _ArrangeVertical(void);
    void                    _ArrangeHorizontal(void);
    CPtrArray*              _GetLegendList(void);

public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLegendWnd)
	//}}AFX_VIRTUAL
    
// Implementation
public:
	virtual                 ~CLegendWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CLegendWnd)
	afx_msg void            OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_LEGENDWND_H__E4D51A3A_CD70_11D5_8037_8C7A05B7325A__INCLUDED_)


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

⌨️ 快捷键说明

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