Base class to create small rectangular info boxes mpInfoLayer is the base class to create a small rectangular info box in transparent overlay over plot layers.
It is used to implement objects like legends.
Definition at line 342 of file mathplot.h.
#include <mrpt/otherlibs/mathplot/mathplot.h>

Public Member Functions | |
| mpInfoLayer () | |
| Default constructor. | |
| mpInfoLayer (wxRect rect, const wxBrush *brush=wxTRANSPARENT_BRUSH) | |
| Complete constructor. | |
| virtual | ~mpInfoLayer () |
| Destructor. | |
| virtual void | UpdateInfo (mpWindow &w, wxEvent &event) |
| Updates the content of the info box. | |
| virtual bool | HasBBox () |
| mpInfoLayer has not bounding box. | |
| virtual void | Plot (wxDC &dc, mpWindow &w) |
| Plot method. | |
| virtual bool | IsInfo () |
| Specifies that this is an Info box layer. | |
| virtual bool | Inside (wxPoint &point) |
| Checks whether a point is inside the info box rectangle. | |
| virtual void | Move (wxPoint delta) |
| Moves the layer rectangle of given pixel deltas. | |
| virtual void | UpdateReference () |
| Updates the rectangle reference point. | |
| wxPoint | GetPosition () |
| Returns the position of the upper left corner of the box (in pixels) | |
| wxSize | GetSize () |
| Returns the size of the box (in pixels) | |
| const wxRect & | GetRectangle () |
| Returns the current rectangle coordinates. | |
Protected Attributes | |
| wxRect | m_dim |
| The bounding rectangle of the box. It may be resized dynamically by the Plot method. | |
| wxPoint | m_reference |
| Holds the reference point for movements. | |
| wxBrush | m_brush |
| The brush to be used for the background. | |
| int | m_winX |
| int | m_winY |
| Holds the mpWindow size. Used to rescale position when window is resized. | |
| mpInfoLayer::mpInfoLayer | ( | ) |
Default constructor.
| mpInfoLayer::mpInfoLayer | ( | wxRect | rect, |
| const wxBrush * | brush = wxTRANSPARENT_BRUSH |
||
| ) |
Complete constructor.
| rect | Sets the initial size rectangle of the layer. |
| brush | pointer to a fill brush. Default is transparent |
| virtual mpInfoLayer::~mpInfoLayer | ( | ) | [virtual] |
Destructor.
| wxPoint mpInfoLayer::GetPosition | ( | ) |
Returns the position of the upper left corner of the box (in pixels)
| const wxRect& mpInfoLayer::GetRectangle | ( | ) | [inline] |
Returns the current rectangle coordinates.
Definition at line 399 of file mathplot.h.
| wxSize mpInfoLayer::GetSize | ( | ) |
Returns the size of the box (in pixels)
| virtual bool mpInfoLayer::HasBBox | ( | ) | [inline, virtual] |
mpInfoLayer has not bounding box.
Reimplemented from mpLayer.
Definition at line 364 of file mathplot.h.
| virtual bool mpInfoLayer::Inside | ( | wxPoint & | point ) | [virtual] |
Checks whether a point is inside the info box rectangle.
| point | The point to be checked |
| virtual bool mpInfoLayer::IsInfo | ( | ) | [inline, virtual] |
Specifies that this is an Info box layer.
Reimplemented from mpLayer.
Definition at line 375 of file mathplot.h.
| virtual void mpInfoLayer::Move | ( | wxPoint | delta ) | [virtual] |
Moves the layer rectangle of given pixel deltas.
| delta | The wxPoint container for delta coordinates along x and y. Units are in pixels. |
| virtual void mpInfoLayer::Plot | ( | wxDC & | dc, |
| mpWindow & | w | ||
| ) | [virtual] |
Plot method.
Can be overidden by derived classes.
| dc | the device content where to plot |
| w | the window to plot |
Implements mpLayer.
Reimplemented in mpInfoCoords, and mpInfoLegend.
| virtual void mpInfoLayer::UpdateInfo | ( | mpWindow & | w, |
| wxEvent & | event | ||
| ) | [virtual] |
Updates the content of the info box.
Should be overidden by derived classes. Update may behave in different ways according to the type of event which called it.
| w | parent mpWindow from which to obtain informations |
| event | The event which called the update. |
Reimplemented in mpInfoCoords, and mpInfoLegend.
| virtual void mpInfoLayer::UpdateReference | ( | ) | [virtual] |
Updates the rectangle reference point.
Used by internal methods of mpWindow to correctly move mpInfoLayers.
wxBrush mpInfoLayer::m_brush [protected] |
The brush to be used for the background.
Reimplemented from mpLayer.
Definition at line 404 of file mathplot.h.
wxRect mpInfoLayer::m_dim [protected] |
The bounding rectangle of the box. It may be resized dynamically by the Plot method.
Definition at line 399 of file mathplot.h.
wxPoint mpInfoLayer::m_reference [protected] |
Holds the reference point for movements.
Definition at line 403 of file mathplot.h.
int mpInfoLayer::m_winX [protected] |
Definition at line 405 of file mathplot.h.
int mpInfoLayer::m_winY [protected] |
Holds the mpWindow size. Used to rescale position when window is resized.
Definition at line 405 of file mathplot.h.
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |