mpInfoCoords Class Reference

Implements an overlay box which shows the mouse coordinates in plot units. When an mpInfoCoords layer is activated, when mouse is moved over the mpWindow, its coordinates (in mpWindow units, not pixels) are continuously reported inside the layer box. More...

#include <mathplot.h>

Inheritance diagram for mpInfoCoords:
mpInfoLayer mpLayer

List of all members.

Public Member Functions

 mpInfoCoords ()
 mpInfoCoords (wxRect rect, const wxBrush *brush=wxTRANSPARENT_BRUSH)
 ~mpInfoCoords ()
virtual void UpdateInfo (mpWindow &w, wxEvent &event)
virtual void Plot (wxDC &dc, mpWindow &w)

Protected Attributes

wxString m_content
 string holding the coordinates to be drawn.

Detailed Description

Implements an overlay box which shows the mouse coordinates in plot units. When an mpInfoCoords layer is activated, when mouse is moved over the mpWindow, its coordinates (in mpWindow units, not pixels) are continuously reported inside the layer box.


Constructor & Destructor Documentation

mpInfoCoords::mpInfoCoords (  ) 

Default constructor

mpInfoCoords::mpInfoCoords ( wxRect  rect,
const wxBrush *  brush = wxTRANSPARENT_BRUSH 
)

Complete constructor, setting initial rectangle and background brush.

Parameters:
rect The initial bounding rectangle.
brush The wxBrush to be used for box background: default is transparent
mpInfoCoords::~mpInfoCoords (  ) 

Default destructor


Member Function Documentation

void mpInfoCoords::Plot ( wxDC &  dc,
mpWindow w 
) [virtual]

Plot method.

Parameters:
dc the device content where to plot
w the window to plot
See also:
mpLayer::Plot

Reimplemented from mpInfoLayer.

References mpWindow::GetScrX(), mpWindow::GetScrY(), mpInfoLayer::m_brush, m_content, mpInfoLayer::m_dim, mpLayer::m_font, mpLayer::m_pen, mpLayer::m_visible, mpInfoLayer::m_winX, mpInfoLayer::m_winY, and mpInfoLayer::UpdateReference().

void mpInfoCoords::UpdateInfo ( mpWindow w,
wxEvent &  event 
) [virtual]

Updates the content of the info box. It is used to update coordinates.

Parameters:
w parent mpWindow from which to obtain information
event The event which called the update.

Reimplemented from mpInfoLayer.

References m_content, mpWindow::p2x(), and mpWindow::p2y().


Member Data Documentation

wxString mpInfoCoords::m_content [protected]

string holding the coordinates to be drawn.

Referenced by Plot(), and UpdateInfo().


The documentation for this class was generated from the following files:

© 2003 David Schalig, 2007-2008 Davide Rondini. Generated on Sun Dec 13 12:39:25 2009 for wxMathPlot with Doxygen. Hosted on SourceForge.net Logo