00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CHARTAXISLABEL_H__0E5519C8_A2F4_4CED_9681_32A56B25D0C5__INCLUDED_)
00023 #define AFX_CHARTAXISLABEL_H__0E5519C8_A2F4_4CED_9681_32A56B25D0C5__INCLUDED_
00024
00025 #if _MSC_VER > 1000
00026 #pragma once
00027 #endif // _MSC_VER > 1000
00028
00029 #include "ChartString.h"
00030 #include "ChartFont.h"
00031
00032 class CChartCtrl;
00033 class CChartAxis;
00034
00036
00040 class CChartAxisLabel
00041 {
00042 friend CChartAxis;
00043
00044 public:
00046 void SetText(const TChartString& NewText);
00048 TChartString GetText() const { return m_strLabelText; }
00049
00051
00057 void SetFont(int nPointSize, const TChartString& strFaceName);
00059
00065 void SetFont(const CChartFont& newFont);
00066
00068 void SetVisible(bool bVisible);
00070 bool IsVisible() const { return m_bIsVisible; }
00071
00073 COLORREF GetColor() const { return m_TextColor; }
00075 void SetColor(COLORREF NewColor);
00076
00077 private:
00079 CChartAxisLabel();
00081 virtual ~CChartAxisLabel();
00082
00084 void SetHorizontal(bool bHorizontal);
00086 void SetPosition(int LeftBorder, int TopBorder, CDC *pDC);
00088 void Draw(CDC* pDC);
00090 CSize GetSize(CDC* pDC) const;
00091
00092
00094 CChartCtrl* m_pParentCtrl;
00096 bool m_bIsVisible;
00097
00099 CRect m_TextRect;
00101 COLORREF m_TextColor;
00102
00104 bool m_bIsHorizontal;
00106 CChartFont m_Font;
00107
00109 TChartString m_strLabelText;
00110 };
00111
00112 #endif // !defined(AFX_CHARTAXISLABEL_H__0E5519C8_A2F4_4CED_9681_32A56B25D0C5__INCLUDED_)