#include <axis.h>


Public Member Functions | |
| Axis (AXIS_LOCATION location) | |
| AXIS_LOCATION | GetLocation () |
| bool | IsVertical () |
| bool | IsHorizontal () |
| void | SetMargins (wxCoord marginMin, wxCoord marginMax) |
| size_t | GetDatasetCount () |
| Dataset * | GetDataset (size_t index) |
| void | SetZoomPanMode () |
| void | SetWindowWidth (double winWidth) |
| double | GetWindowWidth () |
| void | SetWindowPosition (double winPos) |
| double | GetWindowPosition () |
| void | SetUseWindow (bool useWin) |
| void | SetWindow (double winPos, double winWidth) |
| bool | IntersectsWindow (double v0, double v1) |
| void | GetWindowBounds (double &winMin, double &winMax) |
| void | AddDataset (Dataset *dataset) |
| virtual void | GetDataBounds (double &minValue, double &maxValue) const =0 |
| virtual wxCoord | GetExtent (wxDC &dc)=0 |
| virtual bool | IsVisible (double value) |
| virtual double | BoundValue (double value) |
| virtual wxCoord | ToGraphics (wxDC &dc, int minCoord, int gRange, double value) |
| virtual double | ToData (wxDC &dc, int minCoord, int gRange, wxCoord g) |
| virtual void | UpdateBounds ()=0 |
| virtual void | Draw (wxDC &dc, wxRect rc)=0 |
| virtual void | DrawGridLines (wxDC &dc, wxRect rcData)=0 |
Public Member Functions inherited from Observable< AxisObserver > | |
| void | AddObserver (AxisObserver *_observer) |
| void | RemoveObserver (AxisObserver *_observer) |
Protected Member Functions | |
| virtual bool | AcceptDataset (Dataset *dataset)=0 |
| FIRE_WITH_THIS (AxisChanged) | |
| FIRE_WITH_THIS (BoundsChanged) | |
Protected Attributes | |
| DatasetArray | m_datasets |
| wxPen | m_gridLinesPen |
| wxCoord | m_marginMin |
| wxCoord | m_marginMax |
| double | m_winPos |
| double | m_winWidth |
| bool | m_useWin |
Protected Attributes inherited from Observable< AxisObserver > | |
| std::vector< AxisObserver * > | observers |
Friends | |
| class | Plot |
| class | AxisShare |
Additional Inherited Members | |
Public Types inherited from Observable< AxisObserver > | |
| typedef AxisObserver | Observer |
Public Attributes inherited from Observable< AxisObserver > | |
|
std::vector< AxisObserver * > ::iterator | OIt |
Base class for all axes. Axis has following attributes:
| Axis::Axis | ( | AXIS_LOCATION | location | ) |
Constructs new axis.
| location | axis location (cannot be changed after axis created) |
|
protectedpure virtual |
Checks whether dataset can be accepted by this axis. Must be implemented by derivative classes. XXX: maybe remove this method later.
| dataset | dataset to be checked |
Implemented in AxisShare, NumberAxis, CompDateAxis, DateAxis, and CategoryAxis.

|
inline |
internal. Don't use from programs.

|
virtual |
Returns nearest boundary value.
| value | out of bounds value, for which will be returned boundary value |
Reimplemented in AxisShare, and LogarithmicNumberAxis.


|
pure virtual |
Performs axis drawing.
| dc | device context |
| rc | rectangle where to draw |
Implemented in AxisShare, LabelAxis, and CompDateAxis.

|
pure virtual |
Draws grid lines for axis.
| dc | device context |
| rc | data area rectangle of plot |
Implemented in AxisShare, LabelAxis, and CompDateAxis.

|
pure virtual |
Returns data bounds.
| minValue | output minimal data value |
| maxValue | output maximal data value |
Implemented in AxisShare, NumberAxis, CompDateAxis, DateAxis, and CategoryAxis.

| Dataset * Axis::GetDataset | ( | size_t | index | ) |
Returns dataset, linked with this axis at specified index.
| index | dataset index |

| size_t Axis::GetDatasetCount | ( | ) |
Returns dataset counts, linked with this axis.
|
pure virtual |
Used to determine minimal size needed to draw axis contents, minimal width for vertical axes, minimal height for horizontal.
| dc | device context |
Implemented in AxisShare, LabelAxis, and CompDateAxis.

|
inline |
Returns axis location.

|
inline |
Returns window bounds. If window is not used, simply returns data bounds.
| winMin | out for window minimal |
| winMax | out for window maximal |

|
inline |
Returns window position.
|
inline |
Returns window width.
| bool Axis::IntersectsWindow | ( | double | v0, |
| double | v1 | ||
| ) |
Checks whether line in data space intersects window.
| v0 | line begin in data space |
| v0 | line end in data space |


|
inline |
Checks whether axis is horizontal.

|
inline |
Checks whether axis is vertical.

|
virtual |
Checks whether data value is visible.
| value | value in data space |
Reimplemented in AxisShare, and LogarithmicNumberAxis.


| void Axis::SetMargins | ( | wxCoord | marginMin, |
| wxCoord | marginMax | ||
| ) |
Sets minimal/maximal margins for axis. Eg bottom/top for vertical axes, left/right for horizontal.
| marginMin | new minimal margin |
| marginMax | new maximal margin |
|
inline |
Sets whether to use window.
| useWin | true to use window |
|
inline |
Sets window params (position and width). Window params are in data space.
| winPos | new window position |
| winWidth | new window width |

|
inline |
Sets window position. Window position is in data space.
| winPos | new window position |

|
inline |
Sets window width. Window width is in data space.
| winWidth | new window width |

|
virtual |
Transforms coordinate from graphics space to data space.
| dc | device context |
| minCoord | minimal graphics space coordinate |
| gRange | graphics space range |
| value | value in data space |
Reimplemented in AxisShare, LogarithmicNumberAxis, and CompDateAxis.


|
virtual |
Transforms coordinate from data space to graphics space.
| dc | device context |
| minCoord | minimal graphics space coordinate |
| gRange | graphics space range |
| value | value in data space |
Reimplemented in AxisShare, CompDateAxis, and LogarithmicNumberAxis.


|
pure virtual |
Performs axis bounds update after dataset/s change.
Implemented in AxisShare, CompDateAxis, DateAxis, CategoryAxis, LogarithmicNumberAxis, and NumberAxis.
