Click here to Skip to main content
15,894,825 members
Articles / Desktop Programming / MFC

The Diffraction Grating Calculator

Rate me:
Please Sign up or sign in to vote.
4.40/5 (5 votes)
30 Oct 2010GPL38 min read 41.5K   678   6  
An MFC Windows program related to Concave Diffraction Gratings using VTK libraries.
/*
 *
 *	ChartSeriesMouseListener.h
 *
 *	Written by C�dric Moonen (cedric_moonen@hotmail.com)
 *
 *
 *
 *	This code may be used for any non-commercial and commercial purposes in a compiled form.
 *	The code may be redistributed as long as it remains unmodified and providing that the 
 *	author name and this disclaimer remain intact. The sources can be modified WITH the author 
 *	consent only.
 *	
 *	This code is provided without any garanties. I cannot be held responsible for the damage or
 *	the loss of time it causes. Use it at your own risks
 *
 *	An e-mail to notify me that you are using this code is appreciated also.
 *
 *
 */

#ifndef _CHARTSERIESMOUSELISTENER_H_
#define _CHARTSERIESMOUSELISTENER_H_

#pragma warning (disable: 4748)

#include "ChartMouseListener.h"

//#pragma warning( disable : 4100 )

template <class PointType>
class CChartSerieBase;

//! Listener for mouse events occuring on a series.
/**
	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.
**/
template <class PointType>
class CChartSeriesMouseListener
{
public:
	//! Constructor
	CChartSeriesMouseListener()  { }
	//! Destructor
	virtual ~CChartSeriesMouseListener()  { }

	//! Virtual function to implement in order to be notified when a mouse event occurs on a series.
	/**
		@param mouseEvent
			The mouse event which occured
		@param point
			The screen point on which the event occured
		@param pSerie
			The series on which the event occured
		@param uPointIndex
			The index of the point on which the event occured. In case the event
			did not occur on a specific point but on the series itself (e.g. clicking
			between two points on a line series), INVALID_POINT is passed for this
			parameter.
	**/
	virtual void OnMouseEventSeries(CChartMouseListener::MouseEvent mouseEvent, CPoint point,
					CChartSerieBase<PointType>* pSerie, unsigned uPointIndex) { }
};

#endif  // _CHARTSERIESMOUSELISTENER_H_

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 GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
Italy Italy
Senior Software Developer in C/C++ and Oracle.
Ex-physicist holding a Ph.D. on x-ray lasers.

Comments and Discussions