High-speed-Charting-Control/ChartDemo/Doc/html/_chart_date_time_axis_8h-so...

110 lines
9.2 KiB
HTML
Raw Permalink Normal View History

2020-06-10 10:11:21 +00:00
<!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/ChartDateTimeAxis.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&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
</ul>
</div>
<h1>E:/Sources Misc/ChartDemo/ChartCtrl/ChartDateTimeAxis.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"> * ChartDateTimeAxis.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">#ifndef _CHARTDATETIMEAXIS_H_</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define _CHARTDATETIMEAXIS_H_</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "ChartAxis.h"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "ChartString.h"</span>
<a name="l00027"></a>00027
<a name="l00029"></a><a class="code" href="class_c_chart_date_time_axis.html">00029</a> <span class="keyword">class </span><a class="code" href="class_c_chart_date_time_axis.html" title="A specialization of the CChartAxis class for displaying date and time data.">CChartDateTimeAxis</a> : <span class="keyword">public</span> <a class="code" href="class_c_chart_axis.html" title="Base class that takes care of the management of a chart axis.">CChartAxis</a>
<a name="l00030"></a>00030 {
<a name="l00031"></a>00031 <span class="keyword">friend</span> <a class="code" href="class_c_chart_ctrl.html" title="The main chart control class.">CChartCtrl</a>;
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="keyword">public</span>:
<a name="l00035"></a><a class="code" href="class_c_chart_date_time_axis.html#783a3bd7291b25d95d05514150434c8f">00035</a> <span class="keyword">enum</span> <a class="code" href="class_c_chart_date_time_axis.html#783a3bd7291b25d95d05514150434c8f" title="Enum listing the different base intervals.">TimeInterval</a>
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 tiSecond,
<a name="l00038"></a>00038 tiMinute,
<a name="l00039"></a>00039 tiHour,
<a name="l00040"></a>00040 tiDay,
<a name="l00041"></a>00041 tiMonth,
<a name="l00042"></a>00042 tiYear
<a name="l00043"></a>00043 };
<a name="l00044"></a>00044
<a name="l00046"></a>00046
<a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_date_time_axis.html#fc19163a7fa7d95276852c0b6c58af7e" title="Sets the tick increment.">SetTickIncrement</a>(<span class="keywordtype">bool</span> bAuto, <a class="code" href="class_c_chart_date_time_axis.html#783a3bd7291b25d95d05514150434c8f" title="Enum listing the different base intervals.">TimeInterval</a> Interval, <span class="keywordtype">int</span> Multiplier);
<a name="l00066"></a>00066
<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_date_time_axis.html#9cdd6aa9c910a7ff159e07387fb5e06a" title="Sets the format of the tick labels.">SetTickLabelFormat</a>(<span class="keywordtype">bool</span> bAutomatic, <span class="keyword">const</span> TChartString&amp; strFormat);
<a name="l00076"></a>00076
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="class_c_chart_date_time_axis.html#672859f53992cf52e6763661c2271a85" title="Sets the reference tick.">SetReferenceTick</a>(COleDateTime referenceTick);
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="keyword">private</span>:
<a name="l00093"></a>00093 <a class="code" href="class_c_chart_date_time_axis.html" title="A specialization of the CChartAxis class for displaying date and time data.">CChartDateTimeAxis</a>();
<a name="l00095"></a>00095 ~<a class="code" href="class_c_chart_date_time_axis.html" title="A specialization of the CChartAxis class for displaying date and time data.">CChartDateTimeAxis</a>();
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="keywordtype">double</span> GetFirstTickValue() <span class="keyword">const</span>;
<a name="l00098"></a>00098 <span class="keywordtype">bool</span> GetNextTickValue(<span class="keywordtype">double</span> dCurrentTick, <span class="keywordtype">double</span>&amp; dNextTick) <span class="keyword">const</span>;
<a name="l00099"></a>00099 TChartString GetTickLabel(<span class="keywordtype">double</span> TickValue) <span class="keyword">const</span>;
<a name="l00100"></a>00100 <span class="keywordtype">long</span> ValueToScreenDiscrete(<span class="keywordtype">double</span> Value) <span class="keyword">const</span>;
<a name="l00101"></a>00101 <span class="keywordtype">long</span> GetTickPos(<span class="keywordtype">double</span> TickVal) <span class="keyword">const</span>;
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="keywordtype">void</span> RefreshTickIncrement();
<a name="l00104"></a>00104 <span class="keywordtype">void</span> RefreshFirstTick();
<a name="l00106"></a>00106 <span class="keywordtype">void</span> RefreshDTTickFormat();
<a name="l00107"></a>00107
<a name="l00109"></a>00109
<a name="l00118"></a>00118 COleDateTime AddMonthToDate(<span class="keyword">const</span> COleDateTime&amp; Date,
<a name="l00119"></a>00119 <span class="keywordtype">int</span> iMonthsToAdd) <span class="keyword">const</span>;
<a name="l00120"></a>00120
<a name="l00121"></a>00121 <span class="keywordtype">double</span> GetTickBeforeVal(<span class="keywordtype">double</span> dValue) <span class="keyword">const</span>;
<a name="l00122"></a>00122
<a name="l00124"></a>00124 TChartString m_strDTTickFormat;
<a name="l00126"></a>00126 <span class="keywordtype">bool</span> m_bAutoTickFormat;
<a name="l00128"></a>00128
<a name="l00134"></a>00134 <a class="code" href="class_c_chart_date_time_axis.html#783a3bd7291b25d95d05514150434c8f" title="Enum listing the different base intervals.">TimeInterval</a> m_BaseInterval;
<a name="l00136"></a>00136
<a name="l00141"></a>00141 <span class="keywordtype">int</span> m_iDTTickIntervalMult;
<a name="l00142"></a>00142
<a name="l00144"></a>00144 <span class="keywordtype">double</span> m_dFirstTickValue;
<a name="l00145"></a>00145
<a name="l00147"></a>00147 COleDateTime m_ReferenceTick;
<a name="l00148"></a>00148 };
<a name="l00149"></a>00149
<a name="l00150"></a>00150 <span class="preprocessor">#endif // _CHARTDATETIMEAXIS_H_</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jan 17 13:33:09 2010 for ChartDemo by&nbsp;
<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>