mpScaleY Class Reference

#include <mathplot.h>

Inheritance diagram for mpScaleY:

List of all members.

Public Member Functions

 mpScaleY (wxString name=wxT("Y"), int flags=mpALIGN_CENTER, bool ticks=true)
virtual void Plot (wxDC &dc, mpWindow &w)
virtual bool HasBBox ()
void SetAlign (int align)
void SetTicks (bool ticks)
bool GetTicks ()
void SetLabelFormat (const wxString &format)
const wxString & SetLabelFormat ()

Protected Attributes

int m_flags
 Flag for axis alignment.
bool m_ticks
 Flag to toggle between ticks or grid.
wxString m_labelFormat
 Format string used to print labels.

Detailed Description

Plot layer implementing a y-scale ruler. If align is set to mpALIGN_CENTER, the ruler is fixed at X=0 in the coordinate system. If the align is set to mpALIGN_TOP or mpALIGN_BOTTOM, the axis is always drawn respectively at top or bottom of the window. A label is plotted at the top-right hand of the ruler. The scale numbering automatically adjusts to view and zoom factor.

Constructor & Destructor Documentation

mpScaleY::mpScaleY ( wxString  name = wxT("Y"),
int  flags = mpALIGN_CENTER,
bool  ticks = true 
name Label to plot by the ruler
flags Set position of the scale respect to the window.
ticks Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid

References mpLAYER_AXIS.

Member Function Documentation

bool mpScaleY::GetTicks (  )  [inline]

Get Y axis ticks or grid

TRUE if plot is drawing axis ticks, FALSE if the grid is active.
virtual bool mpScaleY::HasBBox (  )  [inline, virtual]

Check whether this layer has a bounding box. This implementation returns FALSE thus making the ruler invisible to the plot layer bounding box calculation by mpWindow.

Reimplemented from mpLayer.

void mpScaleY::Plot ( wxDC &  dc,
mpWindow w 
) [virtual]
void mpScaleY::SetAlign ( int  align  )  [inline]

Set Y axis alignment.

const wxString& mpScaleY::SetLabelFormat (  )  [inline]

Get Y axis Label format.

The format string
void mpScaleY::SetLabelFormat ( const wxString &  format  )  [inline]

Set Y axis Label format.

format The format string
void mpScaleY::SetTicks ( bool  ticks  )  [inline]

Set Y axis ticks or grid

ticks TRUE to plot axis ticks, FALSE to plot grid.

Member Data Documentation

int mpScaleY::m_flags [protected]

Flag for axis alignment.

Referenced by Plot().

wxString mpScaleY::m_labelFormat [protected]

Format string used to print labels.

Referenced by Plot().

bool mpScaleY::m_ticks [protected]

Flag to toggle between ticks or grid.

Referenced by Plot().

The documentation for this class was generated from the following files:

© 2003 David Schalig, 2007-2008 Davide Rondini. Generated on Sun Dec 13 12:39:25 2009 for wxMathPlot with Doxygen. Hosted on Logo