Implements the legend to be added to the plot This layer allows you to add a legend to describe the plots in the window. The legend uses the layer name as a label, and displays only layers of type mpLAYER_PLOT. More...
#include <mathplot.h>
Public Member Functions | |
mpInfoLegend () | |
mpInfoLegend (wxRect rect, const wxBrush *brush=wxTRANSPARENT_BRUSH) | |
~mpInfoLegend () | |
virtual void | UpdateInfo (mpWindow &w, wxEvent &event) |
virtual void | Plot (wxDC &dc, mpWindow &w) |
Implements the legend to be added to the plot This layer allows you to add a legend to describe the plots in the window. The legend uses the layer name as a label, and displays only layers of type mpLAYER_PLOT.
mpInfoLegend::mpInfoLegend | ( | ) |
Default constructor
mpInfoLegend::mpInfoLegend | ( | wxRect | rect, | |
const wxBrush * | brush = wxTRANSPARENT_BRUSH | |||
) |
Complete constructor, setting initial rectangle and background brush.
rect | The initial bounding rectangle. | |
brush | The wxBrush to be used for box background: default is transparent |
mpInfoLegend::~mpInfoLegend | ( | ) |
Default destructor
void mpInfoLegend::Plot | ( | wxDC & | dc, | |
mpWindow & | w | |||
) | [virtual] |
Plot method.
dc | the device content where to plot | |
w | the window to plot |
Reimplemented from mpInfoLayer.
References mpWindow::CountAllLayers(), mpWindow::GetLayer(), mpLayer::GetLayerType(), mpLayer::GetName(), mpLayer::GetPen(), mpWindow::GetScrX(), mpWindow::GetScrY(), mpLayer::IsVisible(), mpInfoLayer::m_brush, mpInfoLayer::m_dim, mpLayer::m_font, mpLayer::m_pen, mpLayer::m_visible, mpInfoLayer::m_winX, mpInfoLayer::m_winY, mpLAYER_PLOT, mpLEGEND_LINEWIDTH, mpLEGEND_MARGIN, and mpInfoLayer::UpdateReference().
void mpInfoLegend::UpdateInfo | ( | mpWindow & | w, | |
wxEvent & | event | |||
) | [virtual] |
Updates the content of the info box. Unused in this class.
w | parent mpWindow from which to obtain information | |
event | The event which called the update. |
Reimplemented from mpInfoLayer.