📄 legendtext.h
字号:
/************************************************************************************************
// $Header: /home/cvsroot/SoccerDoctor/Chart/LegendText.h,v 1.1 2002/09/07 06:03:54 peter Exp $
//***********************************************************************************************
/************************************************************************************************/
/* */
/* File : LegendText.h */
/* */
/* Purpose : interface for the legend text */
/* */
/* Author : Scott Pelger Date Created: 10JUN02 */
/* */
/* Revisions */
/* */
/* Engineer Date Description */
/* */
/* Scott Pelger 10JUN02 initial version */
/* */
/************************************************************************************************/
#if !defined(AFX_LEGENDTEXT_H__D0D914B2_D2EC_11D5_8037_BD680817101A__INCLUDED_)
#define AFX_LEGENDTEXT_H__D0D914B2_D2EC_11D5_8037_BD680817101A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// LegendText.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CLegendText window
#include "Shape.h"
typedef enum {
LT_NORMAL,
LT_BOLD,
LT_ITALIC,
LT_UNDERLINE,
};
#define ITEM_SPACING 5
class CLegendText : public CStatic {
// Construction
public:
CLegendText();
// Attributes
public:
protected:
CShape m_wndShape;
CRect m_rcClientRect;
COLORREF m_crItemColor;
COLORREF m_crBorderColor;
COLORREF m_crLineColor;
COLORREF m_crTextColor;
COLORREF m_crBackgroundColor;
CFont* m_pFont;
BYTE m_byTextStyle;
BYTE m_byItemStyle;
BYTE m_byLineStyle;
private:
BOOL m_bCreate;
// Operations
public:
private:
void _CalculateClientRect(void);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLegendText)
public:
protected:
virtual void PreSubclassWindow();
public:
virtual BOOL Create(LPCTSTR lpszText, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID = 0xffff);
//}}AFX_VIRTUAL
// Implementation
public:
void GetClientRect(LPRECT lpRect) {*lpRect = m_rcClientRect;};
COLORREF SetTextColor(COLORREF crColor);
COLORREF SetBackgroundColor(COLORREF crColor);
BOOL SetFont(BYTE byPointSize, char* psFontName, BYTE byStyle=0);
COLORREF SetItemColor(COLORREF crColor);
COLORREF GetItemColor(void) {return m_wndShape.GetItemColor();};
COLORREF SetBorderColor(COLORREF crColor);
COLORREF SetLineColor(COLORREF crColor);
void SetItemStyle(BYTE byStyle) {m_byItemStyle = byStyle; m_wndShape.SetItemStyle(byStyle);};
void SetLineStyle(BYTE byStyle) {m_byLineStyle = byStyle; m_wndShape.SetLineStyle(byStyle);};
BYTE GetItemStyle(void) {return m_byItemStyle;};
BYTE GetLineStyle(void) {return m_byLineStyle;};
virtual ~CLegendText();
// Generated message map functions
protected:
//{{AFX_MSG(CLegendText)
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_LEGENDTEXT_H__D0D914B2_D2EC_11D5_8037_BD680817101A__INCLUDED_)
//***********************************************************************************************
// END OF FILE
// $Log: LegendText.h,v $
// Revision 1.1 2002/09/07 06:03:54 peter
// 新的chart类,从别的地方拷来的
//
//***********************************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -