110 lines
11 KiB
HTML
110 lines
11 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|||
|
<title>ChartDemo: E:/Sources Misc/ChartDemo/ChartCtrl/ChartTitle.h Source File</title>
|
|||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|||
|
</head><body>
|
|||
|
<!-- Generated by Doxygen 1.5.8 -->
|
|||
|
<div class="navigation" id="top">
|
|||
|
<div class="tabs">
|
|||
|
<ul>
|
|||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|||
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|||
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div class="tabs">
|
|||
|
<ul>
|
|||
|
<li><a href="files.html"><span>File List</span></a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<h1>E:/Sources Misc/ChartDemo/ChartCtrl/ChartTitle.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
|||
|
<a name="l00002"></a>00002 <span class="comment"> *</span>
|
|||
|
<a name="l00003"></a>00003 <span class="comment"> * ChartTitle.h</span>
|
|||
|
<a name="l00004"></a>00004 <span class="comment"> *</span>
|
|||
|
<a name="l00005"></a>00005 <span class="comment"> * Written by C<>dric Moonen (cedric_moonen@hotmail.com)</span>
|
|||
|
<a name="l00006"></a>00006 <span class="comment"> *</span>
|
|||
|
<a name="l00007"></a>00007 <span class="comment"> *</span>
|
|||
|
<a name="l00008"></a>00008 <span class="comment"> *</span>
|
|||
|
<a name="l00009"></a>00009 <span class="comment"> * This code may be used for any non-commercial and commercial purposes in a compiled form.</span>
|
|||
|
<a name="l00010"></a>00010 <span class="comment"> * The code may be redistributed as long as it remains unmodified and providing that the </span>
|
|||
|
<a name="l00011"></a>00011 <span class="comment"> * author name and this disclaimer remain intact. The sources can be modified WITH the author </span>
|
|||
|
<a name="l00012"></a>00012 <span class="comment"> * consent only.</span>
|
|||
|
<a name="l00013"></a>00013 <span class="comment"> * </span>
|
|||
|
<a name="l00014"></a>00014 <span class="comment"> * This code is provided without any garanties. I cannot be held responsible for the damage or</span>
|
|||
|
<a name="l00015"></a>00015 <span class="comment"> * the loss of time it causes. Use it at your own risks</span>
|
|||
|
<a name="l00016"></a>00016 <span class="comment"> *</span>
|
|||
|
<a name="l00017"></a>00017 <span class="comment"> * An e-mail to notify me that you are using this code is appreciated also.</span>
|
|||
|
<a name="l00018"></a>00018 <span class="comment"> *</span>
|
|||
|
<a name="l00019"></a>00019 <span class="comment"> *</span>
|
|||
|
<a name="l00020"></a>00020 <span class="comment"> */</span>
|
|||
|
<a name="l00021"></a>00021
|
|||
|
<a name="l00022"></a>00022 <span class="preprocessor">#if !defined(AFX_CHARTTITLE_H__49972787_6D28_4F81_A12F_420947456913__INCLUDED_)</span>
|
|||
|
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define AFX_CHARTTITLE_H__49972787_6D28_4F81_A12F_420947456913__INCLUDED_</span>
|
|||
|
<a name="l00024"></a>00024 <span class="preprocessor"></span>
|
|||
|
<a name="l00025"></a>00025 <span class="preprocessor">#if _MSC_VER > 1000</span>
|
|||
|
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
|
|||
|
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#endif // _MSC_VER > 1000</span>
|
|||
|
<a name="l00028"></a>00028 <span class="preprocessor"></span>
|
|||
|
<a name="l00029"></a>00029 <span class="preprocessor">#include <vector></span>
|
|||
|
<a name="l00030"></a>00030 <span class="preprocessor">#include <map></span>
|
|||
|
<a name="l00031"></a>00031 <span class="preprocessor">#include "ChartString.h"</span>
|
|||
|
<a name="l00032"></a>00032 <span class="preprocessor">#include "ChartFont.h"</span>
|
|||
|
<a name="l00033"></a>00033
|
|||
|
<a name="l00034"></a>00034 <span class="keyword">class </span><a class="code" href="class_c_chart_ctrl.html" title="The main chart control class.">CChartCtrl</a>;
|
|||
|
<a name="l00035"></a>00035
|
|||
|
<a name="l00037"></a>00037
|
|||
|
<a name="l00042"></a><a class="code" href="class_c_chart_title.html">00042</a> <span class="keyword">class </span><a class="code" href="class_c_chart_title.html" title="This class is responsible for the titles displayed on the control.">CChartTitle</a>
|
|||
|
<a name="l00043"></a>00043 {
|
|||
|
<a name="l00044"></a>00044 <span class="keyword">friend</span> <a class="code" href="class_c_chart_ctrl.html" title="The main chart control class.">CChartCtrl</a>;
|
|||
|
<a name="l00045"></a>00045
|
|||
|
<a name="l00046"></a>00046 <span class="keyword">public</span>:
|
|||
|
<a name="l00048"></a>00048 <span class="keywordtype">size_t</span> <a class="code" href="class_c_chart_title.html#4c6da1aa950e674d1ecfcef3bef36b9f" title="Returns the number of lines in the title.">GetStringCount</a>() <span class="keyword">const</span>;
|
|||
|
<a name="l00050"></a>00050 TChartString <a class="code" href="class_c_chart_title.html#25bce9dc954b60d9c8342e58f204af2e" title="Returns a specific line, specified by its index.">GetString</a>(<span class="keywordtype">size_t</span> Index) <span class="keyword">const</span>;
|
|||
|
<a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#69d4e3f98237a695bb2450f79a0bbc38" title="Adds a new line to the title.">AddString</a>(<span class="keyword">const</span> TChartString& NewString);
|
|||
|
<a name="l00054"></a>00054 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#d2af48a1708f150d2005efade12112f5" title="Removes all the lines displayed in the title.">RemoveAll</a>();
|
|||
|
<a name="l00055"></a>00055
|
|||
|
<a name="l00057"></a>00057
|
|||
|
<a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#8678f4ec28c0b107971d9d12ec2dde7a" title="Sets the default font.">SetFont</a>(<span class="keywordtype">int</span> iPointSize, <span class="keyword">const</span> TChartString& strFaceName);
|
|||
|
<a name="l00065"></a>00065
|
|||
|
<a name="l00071"></a>00071 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#8678f4ec28c0b107971d9d12ec2dde7a" title="Sets the default font.">SetFont</a>(<span class="keyword">const</span> <a class="code" href="class_c_chart_font.html" title="Wrapper class for fonts with advanced properties (italic, bold or underlined).">CChartFont</a>& newFont);
|
|||
|
<a name="l00073"></a>00073
|
|||
|
<a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#603ef8fb5d8d2dc44d5aef2a368233a0" title="Sets the font for a specific line.">SetLineFont</a>(<span class="keywordtype">int</span> iLineIndex, <span class="keywordtype">int</span> iPointSize, <span class="keyword">const</span> TChartString& strFaceName);
|
|||
|
<a name="l00083"></a>00083
|
|||
|
<a name="l00091"></a>00091 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#603ef8fb5d8d2dc44d5aef2a368233a0" title="Sets the font for a specific line.">SetLineFont</a>(<span class="keywordtype">int</span> iLineIndex, <span class="keyword">const</span> <a class="code" href="class_c_chart_font.html" title="Wrapper class for fonts with advanced properties (italic, bold or underlined).">CChartFont</a>& newFont);
|
|||
|
<a name="l00092"></a>00092
|
|||
|
<a name="l00094"></a><a class="code" href="class_c_chart_title.html#98119120f9f52e81db199e7432f85fae">00094</a> <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#98119120f9f52e81db199e7432f85fae" title="Shows/hides the title.">SetVisible</a>(<span class="keywordtype">bool</span> bVisible) { m_bIsVisible = bVisible; }
|
|||
|
<a name="l00096"></a><a class="code" href="class_c_chart_title.html#c8132d6630b993c49de48a60d8516ad0">00096</a> <span class="keywordtype">bool</span> <a class="code" href="class_c_chart_title.html#c8132d6630b993c49de48a60d8516ad0" title="Returns true if the title is visible.">IsVisible</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_bIsVisible; }
|
|||
|
<a name="l00097"></a>00097
|
|||
|
<a name="l00099"></a><a class="code" href="class_c_chart_title.html#60470c6081653f8299d637ee71da7fcd">00099</a> COLORREF <a class="code" href="class_c_chart_title.html#60470c6081653f8299d637ee71da7fcd" title="Returns the text color.">GetColor</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_TextColor; }
|
|||
|
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_title.html#38d2054deafac57bf7555c21eef99341" title="Sets the text color.">SetColor</a>(COLORREF NewColor);
|
|||
|
<a name="l00102"></a>00102
|
|||
|
<a name="l00104"></a>00104 BOOL <a class="code" href="class_c_chart_title.html#a5c095e2b33f0629efcc11fde2e80bf1" title="Returns true if a screen point is in the region of the title.">IsPointInside</a>(<span class="keyword">const</span> CPoint& screenPoint) <span class="keyword">const</span>;
|
|||
|
<a name="l00105"></a>00105
|
|||
|
<a name="l00106"></a>00106 <span class="keyword">private</span>:
|
|||
|
<a name="l00108"></a>00108 <a class="code" href="class_c_chart_title.html" title="This class is responsible for the titles displayed on the control.">CChartTitle</a>(<a class="code" href="class_c_chart_ctrl.html" title="The main chart control class.">CChartCtrl</a>* pParent);
|
|||
|
<a name="l00110"></a>00110 <span class="keyword">virtual</span> ~<a class="code" href="class_c_chart_title.html" title="This class is responsible for the titles displayed on the control.">CChartTitle</a>();
|
|||
|
<a name="l00111"></a>00111
|
|||
|
<a name="l00113"></a>00113 <span class="keywordtype">void</span> SetTitleRect(<span class="keyword">const</span> CRect& newRect) { m_TitleRect = newRect; }
|
|||
|
<a name="l00115"></a>00115 CSize GetSize(CDC* pDC);
|
|||
|
<a name="l00117"></a>00117 <span class="keywordtype">void</span> Draw(CDC *pDC);
|
|||
|
<a name="l00118"></a>00118
|
|||
|
<a name="l00120"></a>00120 <a class="code" href="class_c_chart_ctrl.html" title="The main chart control class.">CChartCtrl</a>* m_pParentCtrl;
|
|||
|
<a name="l00122"></a>00122 std::vector<TChartString> m_StringArray;
|
|||
|
<a name="l00124"></a>00124 std::map<int, CChartFont> m_mapLineFonts;
|
|||
|
<a name="l00125"></a>00125
|
|||
|
<a name="l00127"></a>00127 <span class="keywordtype">bool</span> m_bIsVisible;
|
|||
|
<a name="l00129"></a>00129 <a class="code" href="class_c_chart_font.html" title="Wrapper class for fonts with advanced properties (italic, bold or underlined).">CChartFont</a> m_DefaultFont;
|
|||
|
<a name="l00131"></a>00131 COLORREF m_TextColor;
|
|||
|
<a name="l00133"></a>00133 CRect m_TitleRect;
|
|||
|
<a name="l00134"></a>00134 };
|
|||
|
<a name="l00135"></a>00135
|
|||
|
<a name="l00136"></a>00136 <span class="preprocessor">#endif // !defined(AFX_CHARTTITLE_H__49972787_6D28_4F81_A12F_420947456913__INCLUDED_)</span>
|
|||
|
</pre></div></div>
|
|||
|
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jan 17 13:33:10 2010 for ChartDemo by
|
|||
|
<a href="http://www.doxygen.org/index.html">
|
|||
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
|||
|
</body>
|
|||
|
</html>
|