Version: 0.6.0

#include <labelaxis.h>

Inheritance diagram for LabelAxis:
Collaboration diagram for LabelAxis:

Public Member Functions

 LabelAxis (AXIS_LOCATION location)
 
void SetTitle (const wxString &title)
 
const wxString & GetTitle ()
 
void SetTitleLocation (int location)
 
int GetTitleLocation ()
 
void SetTitleFont (wxFont &font)
 
const wxFont & GetTitleFont ()
 
void SetTitleColour (wxColour &colour)
 
wxColour GetTitleColour ()
 
void SetLabelPen (wxPen labelPen)
 
void SetLabelTextColour (wxColour labelTextColour)
 
wxColour GetLabelTextColour ()
 
void SetLabelTextFont (wxFont labelTextFont)
 
const wxFont & GetLabelTextFont ()
 
void SetVerticalLabelText (bool verticalLabelText)
 
bool GetVerticalLabelText ()
 
void SetMajorLabelSteps (size_t step)
 
void SetLabelSkip (int blankLabels)
 
int GetLabelSkip ()
 
void SetLabelColourer (LabelColourer *labelColourer)
 
LabelColourerGetLabelColourer ()
 
void SetAxisVisible (bool bVisible)
 
virtual void Draw (wxDC &dc, wxRect rc)
 
virtual void DrawGridLines (wxDC &dc, wxRect rc)
 
virtual wxCoord GetExtent (wxDC &dc)
 
- Public Member Functions inherited from Axis
 Axis (AXIS_LOCATION location)
 
AXIS_LOCATION GetLocation ()
 
bool IsVertical ()
 
bool IsHorizontal ()
 
void SetMargins (wxCoord marginMin, wxCoord marginMax)
 
size_t GetDatasetCount ()
 
DatasetGetDataset (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 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
 
- Public Member Functions inherited from Observable< AxisObserver >
void AddObserver (AxisObserver *_observer)
 
void RemoveObserver (AxisObserver *_observer)
 

Protected Member Functions

virtual double GetValue (size_t step)=0
 
virtual void GetLabel (size_t step, wxString &label)=0
 
virtual bool IsEnd (size_t step)=0
 
virtual wxSize GetLongestLabelExtent (wxDC &dc)=0
 
virtual bool HasLabels ()
 
- Protected Member Functions inherited from Axis
virtual bool AcceptDataset (Dataset *dataset)=0
 
 FIRE_WITH_THIS (AxisChanged)
 
 FIRE_WITH_THIS (BoundsChanged)
 

Additional Inherited Members

- Public Types inherited from Observable< AxisObserver >
typedef AxisObserver Observer
 
- Public Attributes inherited from Observable< AxisObserver >
std::vector< AxisObserver * >
::iterator 
OIt
 
- Protected Attributes inherited from Axis
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
 

Detailed Description

Base class for axes for displaying data labels.

Member Function Documentation

void LabelAxis::Draw ( wxDC &  dc,
wxRect  rc 
)
virtual

Performs axis drawing.

Parameters
dcdevice context
rcrectangle where to draw

Implements Axis.

Here is the call graph for this function:

void LabelAxis::DrawGridLines ( wxDC &  dc,
wxRect  rcData 
)
virtual

Draws grid lines for axis.

Parameters
dcdevice context
rcdata area rectangle of plot

Implements Axis.

Here is the call graph for this function:

wxCoord LabelAxis::GetExtent ( wxDC &  dc)
virtual

Used to determine minimal size needed to draw axis contents, minimal width for vertical axes, minimal height for horizontal.

Parameters
dcdevice context
Returns
extent

Implements Axis.

Here is the call graph for this function:

virtual void LabelAxis::GetLabel ( size_t  step,
wxString &  label 
)
protectedpure virtual

Returns label on step.

Parameters
stepstep index
labeloutput label

Implemented in NumberAxis, LogarithmicNumberAxis, DateAxis, CategoryAxis, and JulianDateAxis.

wxColour LabelAxis::GetLabelTextColour ( )
inline

Returns label colour.

Returns
label colour
const wxFont& LabelAxis::GetLabelTextFont ( )
inline

Returns label font.

Returns
label font
const wxString& LabelAxis::GetTitle ( )
inline

Returns axis title.

Returns
axis title
wxColour LabelAxis::GetTitleColour ( )
inline

Returns axis title colour.

Returns
axis title colour
const wxFont& LabelAxis::GetTitleFont ( )
inline

Returns axis title font.

Returns
axis title font
int LabelAxis::GetTitleLocation ( )
inline

Returns axis title location.

Returns
axis title location
virtual double LabelAxis::GetValue ( size_t  step)
protectedpure virtual

Returns value on step.

Parameters
stepstep index
Returns
value on step

Implemented in NumberAxis, LogarithmicNumberAxis, DateAxis, and CategoryAxis.

Here is the caller graph for this function:

bool LabelAxis::GetVerticalLabelText ( )
inline

Returns whether to draw labels text vertical.

Returns
true if labels text will be drawn vertical
virtual bool LabelAxis::IsEnd ( size_t  step)
protectedpure virtual

Check whether step is last.

Parameters
stepstep
Returns
true if step is last

Implemented in NumberAxis, DateAxis, and CategoryAxis.

Here is the caller graph for this function:

void LabelAxis::SetAxisVisible ( bool  bVisible)

Sets visibility of axis

Parameters
bVisible- false if hidden
void LabelAxis::SetLabelPen ( wxPen  labelPen)
inline

Sets pen for label lines.

Parameters
labelPenpen for label lines
void LabelAxis::SetLabelTextColour ( wxColour  labelTextColour)
inline

Sets colour for labels.

Parameters
labelColourcolor for labels
void LabelAxis::SetLabelTextFont ( wxFont  labelTextFont)
inline

Sets font for labels text.

Parameters
labelFontfont for labels text
void LabelAxis::SetMajorLabelSteps ( size_t  step)
inline

Sets major label steps.

Parameters
stepThe step size at which major label should be drawn
void LabelAxis::SetTitle ( const wxString &  title)
inline

Sets axis title.

Parameters
newaxis title
void LabelAxis::SetTitleColour ( wxColour &  colour)
inline

Sets axis title colour.

Parameters
newaxis title colour
void LabelAxis::SetTitleFont ( wxFont &  font)
inline

Sets axis title font.

Parameters
axistitle font
void LabelAxis::SetTitleLocation ( int  location)
inline

Sets axis title location.

Parameters
locationnew location for axis title, acceptable values wxLEFT, wxCENTER, wxRIGHT for horizontal axes, wxTOP, wxCENTER, wxBOTTOM for vertical axes.
void LabelAxis::SetVerticalLabelText ( bool  verticalLabelText)
inline

Sets whether to draw labels text vertical.

Parameters
verticalLabelTexttrue to draw labels text vertical

The documentation for this class was generated from the following files:
  • /home/bishop/work/projects/nextgismanager/include/freechart/wx/axis/labelaxis.h
  • /home/bishop/work/projects/nextgismanager/src/freechart/axis/labelaxis.cpp