Main MRPT website > C++ reference
MRPT logo

mpInfoCoords Class Reference

Implements an overlay box which shows the mouse coordinates in plot units. More...

#include <mrpt/otherlibs/mathplot/mathplot.h>

Inheritance diagram for mpInfoCoords:
Inheritance graph
[legend]
Collaboration diagram for mpInfoCoords:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mpInfoCoords ()
 Default constructor.
 mpInfoCoords (wxRect rect, const wxBrush *brush=wxTRANSPARENT_BRUSH)
 Complete constructor, setting initial rectangle and background brush.
 ~mpInfoCoords ()
 Default destructor.
virtual void UpdateInfo (mpWindow &w, wxEvent &event)
 Updates the content of the info box.
virtual void Plot (wxDC &dc, mpWindow &w)
 Plot method.

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.

Definition at line 413 of file mathplot.h.


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

virtual 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.

virtual 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.


Member Data Documentation

wxString mpInfoCoords::m_content [protected]

string holding the coordinates to be drawn.

Definition at line 438 of file mathplot.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010