Click here to Skip to main content
15,861,168 members
Articles / Desktop Programming / MFC

High-speed Charting Control

Rate me:
Please Sign up or sign in to vote.
4.95/5 (327 votes)
13 Jul 2010CPOL35 min read 4.1M   99.5K   787  
A flexible charting control to display 2D data
<!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: CChartMouseListener Class Reference</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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>CChartMouseListener Class Reference</h1><!-- doxytag: class="CChartMouseListener" -->Listener for mouse events occuring on the chart control.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_chart_mouse_listener_8h-source.html">ChartMouseListener.h</a>&gt;</code>
<p>

<p>
<a href="class_c_chart_mouse_listener-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a> { <br>
&nbsp;&nbsp;<b>MouseMove</b>, 
<b>LButtonUp</b>, 
<b>LButtonDown</b>, 
<b>LButtonDoubleClick</b>, 
<br>
&nbsp;&nbsp;<b>RButtonUp</b>, 
<b>RButtonDown</b>, 
<b>RButtonDoubleClick</b>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enumeration listing the type of mouse events. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="77ff7968f3679b499c8158973bfa9489"></a><!-- doxytag: member="CChartMouseListener::CChartMouseListener" ref="77ff7968f3679b499c8158973bfa9489" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#77ff7968f3679b499c8158973bfa9489">CChartMouseListener</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="127748a0914f8fdeb391c77912038cc7"></a><!-- doxytag: member="CChartMouseListener::~CChartMouseListener" ref="127748a0914f8fdeb391c77912038cc7" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#127748a0914f8fdeb391c77912038cc7">~CChartMouseListener</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#ccb46591a6ff19b5e789f04988294b81">OnMouseEventTitle</a> (<a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a> mouseEvent, CPoint point)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual function to implement in order to be notified when the title is clicked.  <a href="#ccb46591a6ff19b5e789f04988294b81"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#4a9a76163cd0ed652be5fc516ec5dded">OnMouseEventAxis</a> (<a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a> mouseEvent, CPoint point, <a class="el" href="class_c_chart_axis.html">CChartAxis</a> *pAxisClicked)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual function to implement in order to be notified when an axis is clicked.  <a href="#4a9a76163cd0ed652be5fc516ec5dded"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#64fd6fc4da12a033dc271c2cde31513a">OnMouseEventLegend</a> (<a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a> mouseEvent, CPoint point)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual function to implement in order to be notified when the legend is clicked.  <a href="#64fd6fc4da12a033dc271c2cde31513a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_mouse_listener.html#339729bb430d803412d9705f85be5094">OnMouseEventPlotArea</a> (<a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a> mouseEvent, CPoint point)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual function to implement in order to be notified when the plotting area is clicked.  <a href="#339729bb430d803412d9705f85be5094"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Listener for mouse events occuring on the chart control. 
<p>
This is an interface which must be implemented in order to receive mouse notifications. You can then register your class with the chart control by calling RegisterMouseListener. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4a9a76163cd0ed652be5fc516ec5dded"></a><!-- doxytag: member="CChartMouseListener::OnMouseEventAxis" ref="4a9a76163cd0ed652be5fc516ec5dded" args="(MouseEvent mouseEvent, CPoint point, CChartAxis *pAxisClicked)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CChartMouseListener::OnMouseEventAxis           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a>&nbsp;</td>
          <td class="paramname"> <em>mouseEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&nbsp;</td>
          <td class="paramname"> <em>point</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_chart_axis.html">CChartAxis</a> *&nbsp;</td>
          <td class="paramname"> <em>pAxisClicked</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Virtual function to implement in order to be notified when an axis is clicked. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mouseEvent</em>&nbsp;</td><td>The mouse event which occured </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>The screen point on which the event occured </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pAxisClicked</em>&nbsp;</td><td>The axis on which the event occured </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="64fd6fc4da12a033dc271c2cde31513a"></a><!-- doxytag: member="CChartMouseListener::OnMouseEventLegend" ref="64fd6fc4da12a033dc271c2cde31513a" args="(MouseEvent mouseEvent, CPoint point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CChartMouseListener::OnMouseEventLegend           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a>&nbsp;</td>
          <td class="paramname"> <em>mouseEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&nbsp;</td>
          <td class="paramname"> <em>point</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Virtual function to implement in order to be notified when the legend is clicked. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mouseEvent</em>&nbsp;</td><td>The mouse event which occured </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>The screen point on which the event occured </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="339729bb430d803412d9705f85be5094"></a><!-- doxytag: member="CChartMouseListener::OnMouseEventPlotArea" ref="339729bb430d803412d9705f85be5094" args="(MouseEvent mouseEvent, CPoint point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CChartMouseListener::OnMouseEventPlotArea           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a>&nbsp;</td>
          <td class="paramname"> <em>mouseEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&nbsp;</td>
          <td class="paramname"> <em>point</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Virtual function to implement in order to be notified when the plotting area is clicked. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mouseEvent</em>&nbsp;</td><td>The mouse event which occured </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>The screen point on which the event occured </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="ccb46591a6ff19b5e789f04988294b81"></a><!-- doxytag: member="CChartMouseListener::OnMouseEventTitle" ref="ccb46591a6ff19b5e789f04988294b81" args="(MouseEvent mouseEvent, CPoint point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CChartMouseListener::OnMouseEventTitle           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_chart_mouse_listener.html#cffa1073dca632eca72f7339ecb350d7">MouseEvent</a>&nbsp;</td>
          <td class="paramname"> <em>mouseEvent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CPoint&nbsp;</td>
          <td class="paramname"> <em>point</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Virtual function to implement in order to be notified when the title is clicked. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mouseEvent</em>&nbsp;</td><td>The mouse event which occured </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>The screen point on which the event occured </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>E:/Sources Misc/ChartDemo/ChartCtrl/<a class="el" href="_chart_mouse_listener_8h-source.html">ChartMouseListener.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jan 17 13:33:11 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>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer
Belgium Belgium
I am a 29 years old guy and I live with my girlfriend in Hoegaarden, little city from Belgium well known for its white beer Smile | :) .
I studied as an industrial engineer in electronics but I oriented myself more towards software development when I started to work.
Currently I am working in a research centre in mechatronica. I mainly develop in C++ but I also do a bit of Java.
When I have so spare time, I like to read (mainly fantasy) and play electric guitar.

Comments and Discussions