#include <chart.h>
Public Member Functions | |
Chart (Plot *plot, const wxString &title=wxEmptyString, const wxColour &bgColor=wxColour(220, 220, 220)) | |
Chart (Plot *plot, Header *header=NULL, Footer *footer=NULL, const wxColour &bgColor=wxColour(220, 220, 220)) | |
Plot * | GetPlot () |
void | Draw (wxDC &dc, wxRect &rc) |
void | SetBackground (AreaDraw *background) |
void | SetTitle (wxString title) |
void | SetHeader (Header *header) |
void | SetFooter (Footer *footer) |
void | SetMargin (wxCoord margin) |
void | SetScrolledAxis (Axis *axis) |
Axis * | GetHorizScrolledAxis () |
Axis * | GetVertScrolledAxis () |
wxChartPanel * | GetChartPanel () |
void | SetChartPanel (wxChartPanel *chartPanel) |
virtual void | PlotNeedRedraw (Plot *plot) |
virtual void | AxisChanged (Axis *axis) |
virtual void | BoundsChanged (Axis *axis) |
Public Member Functions inherited from Observable< ChartObserver > | |
void | AddObserver (ChartObserver *_observer) |
void | RemoveObserver (ChartObserver *_observer) |
Additional Inherited Members | |
Public Types inherited from Observable< ChartObserver > | |
typedef ChartObserver | Observer |
Public Attributes inherited from Observable< ChartObserver > | |
std::vector< ChartObserver * > ::iterator | OIt |
Protected Attributes inherited from Observable< ChartObserver > | |
std::vector< ChartObserver * > | observers |
Chart. Contains plot, title and chart attributes.
Chart::Chart | ( | Plot * | plot, |
const wxString & | title = wxEmptyString , |
||
const wxColour & | bgColor = wxColour(220, 220, 220) |
||
) |
Constructs new chart.
plot | plot |
title | chart title (empty string - no title) |
|
virtual |
|
virtual |
Called when axis bounds are changed.
axis | axis that bounds are changed |
Implements AxisObserver.
void Chart::Draw | ( | wxDC & | dc, |
wxRect & | rc | ||
) |
Draws chart.
dc | device context |
rc | rectangle where to draw chart |
|
inline |
Returns plot associated with chart.
|
virtual |
Called when plot has been changed and need to be redrawn.
_plot | plot |
Implements PlotObserver.
|
inline |
Sets chart background.
background | chart background |
|
inline |
Calcalate plot area rectangle.
dc | device context |
rc | entire chart rectangle |
title | chart title |