Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SXYAxis Class Reference

#include <sxy_axis.h>

Collaboration diagram for SXYAxis:

Collaboration graph
[legend]
List of all members.

Public Methods

XYAxis * getXyAxis (void)
XYRasterText * getXyTitle (void)
XYRasterText * getXyDecorator (void)
SXYChart * getChart (void)
SXYAxisType getType (void)
SXYAxisOrientation getOrientation (void)
void setLayoutFrom (SXYAxis *other)
int getPixelValue (double position)
double getPositionValue (int pixel)
void setTitle (char *txt)
char * getTitle (void)
void setColor (long int col)
long int getColor (void)
void setTitleColor (long int col)
long int getTitleColor (void)
void setDirection (SXYAxisDirection dir)
SXYAxisDirection getDirection (void)
void setTitleStyle (SXYAxisTitleStyle sty)
SXYAxisTitleStyle getTitleStyle (void)
void setScaleOrientation (SXYAxisScaleOrientation ori)
SXYAxisScaleOrientation getScaleOrientation (void)
void setScaleColor (long int col)
long int getScaleColor (void)
void setPosition (double posx, double posy)
void getPosition (double &posx, double &posy)
void setArrowVisibility (int vis)
int getArrowVisibility (void)
void setSize (double siz)
double getSize (void)
void setVisibility (int flag)
int getVisibility (void)
void setFormat (char *fmt)
char * getFormat (void)
void tryScalesAdjust (void)
void tryStepAdjust (void)
void setScales (double minimum, double maximum)
void setStep (double step)
void calcPrecision ()
void setPrecision (int p)
void getScales (double &minimum, double &maximum)
double getStep (void)
void setZoom (double ratio)
virtual ~SXYAxis ()
 Liberação de todos os objetos XY criados pelo construtor.

 SXYAxis (SXYChart *cht, SXYAxisOrientation ori, SXYAxisType typ, double xpos, double ypos, double size)
 Construtor da classe.


Protected Methods

void updateTitleStyle (void)
void updateScaleOrientation (void)
void buildDecoratorAxis (double angle, double xpos, double ypos, double size)

Private Attributes

SXYChart * chart
 Gráfico.

SXYAxisType type
 Tipo do eixo.

SXYAxisTitleStyle title_style
 Tipo do eixo.

SXYAxisScaleOrientation scale_orientation
 Orientação do texto da escala.

SXYAxisOrientation orientation
 Orientação do eixo.

XYRasterText * xy_label
 Objeto XY que representa o texto do eixo x do gráfico.

XYRasterText * xy_decor_text
 Objeto XY que representa o texto do decorador x do gráfico.

XYScaleDecorator * xy_decor
 Objeto XY que representa o decorador x do gráfico.

XYAxis * xy_axis
 Objeto XY que representa o eixo x do gráfico.

int precision
 Precisao do eixo.


Constructor & Destructor Documentation

SXYAxis::~SXYAxis (    )  [virtual]
 

Liberação de todos os objetos XY criados pelo construtor.

Definition at line 406 of file sxy_axis.cpp.

References xy_axis, xy_decor, xy_decor_text, and xy_label.

SXYAxis::SXYAxis (  SXYChart *    cht,
SXYAxisOrientation    orient,
SXYAxisType    atype,
double    xpos,
double    ypos,
double    size
) 
 

Construtor da classe.

Parameters:
cdcnv handle do canvas CD criado pela classe SXYGraph

Definition at line 34 of file sxy_axis.cpp.

References ALIGNED, AT_MIDDLE, buildDecoratorAxis(), chart, SXYChart::getFontSizeReference(), HORIZONTAL_AXIS, orientation, precision, scale_orientation, title_style, tryScalesAdjust(), type, updateScaleOrientation(), updateTitleStyle(), xy_axis, xy_decor_text, and xy_label.


Member Function Documentation

void SXYAxis::buildDecoratorAxis (  double    angle,
double    xpos,
double    ypos,
double    size
)  [protected]
 

Definition at line 154 of file sxy_axis.cpp.

References getType(), LINEAR_AXIS, LOG_AXIS, SXYAxisType, TIME_AXIS, type, xy_axis, and xy_decor.

Referenced by SXYAxis().

void SXYAxis::calcPrecision (    ) 
 

Definition at line 467 of file sxy_axis.cpp.

References SXYUtil::calcPrecision(), getScales(), getType(), LINEAR_AXIS, LOG_AXIS, max, min, precision, setFormat(), SXYAxisType, and type.

Referenced by tryScalesAdjust(), and zoom().

int SXYAxis::getArrowVisibility (  void    ) 
 

Definition at line 386 of file sxy_axis.cpp.

References xy_axis.

Referenced by setLayoutFrom().

SXYChart * SXYAxis::getChart (  void    ) 
 

Definition at line 681 of file sxy_axis.cpp.

References chart.

Referenced by SXYCurve::checkAxesConsistency(), SXYCurve::getChart(), SXYArea::SXYArea(), and SXYArea::~SXYArea().

long int SXYAxis::getColor (  void    ) 
 

Definition at line 333 of file sxy_axis.cpp.

References xy_axis.

Referenced by cb_axis_color(), and setLayoutFrom().

SXYAxisDirection SXYAxis::getDirection (  void    ) 
 

Definition at line 306 of file sxy_axis.cpp.

References HORIZONTAL_AXIS, INVERTED_AXIS, NORMAL_AXIS, orientation, SXYAxisDirection, and xy_axis.

Referenced by SXYSimpleGraph::adaptGrid(), SXYSimpleGraph::getHorizontalAxisDirection(), SXYSimpleGraph::getVerticalAxisDirection(), SXYSimpleGraph::revertHorizontalAxis(), SXYSimpleGraph::revertVerticalAxis(), setLayoutFrom(), and SXYChart::tryGridAdjust().

char * SXYAxis::getFormat (  void    ) 
 

Definition at line 607 of file sxy_axis.cpp.

References LINEAR_AXIS, type, and xy_decor.

SXYAxisOrientation SXYAxis::getOrientation (  void    ) 
 

Definition at line 142 of file sxy_axis.cpp.

References orientation, and SXYAxisOrientation.

Referenced by SXYSimpleGraph::adaptGrid(), getPixelValue(), and getPositionValue().

int SXYAxis::getPixelValue (  double    position ) 
 

Definition at line 109 of file sxy_axis.cpp.

References getOrientation(), HORIZONTAL_AXIS, SXYAxisOrientation, VERTICAL_AXIS, and xy_axis.

Referenced by SXYTaskMovePoint::mouseClick().

void SXYAxis::getPosition (  double &    posx,
double &    posy
) 
 

Definition at line 371 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYSimpleGraph::adaptGrid(), SXYSimpleGraph::revertHorizontalAxis(), SXYSimpleGraph::revertVerticalAxis(), and setLayoutFrom().

double SXYAxis::getPositionValue (  int    pixel ) 
 

Definition at line 123 of file sxy_axis.cpp.

References getOrientation(), HORIZONTAL_AXIS, SXYAxisOrientation, VERTICAL_AXIS, and xy_axis.

Referenced by SXYTaskZoomIn::makeZoom(), SXYTaskMovePoint::mouseMotion(), and SXYTaskMovePoint::mouseUnclick().

long int SXYAxis::getScaleColor (  void    ) 
 

Definition at line 357 of file sxy_axis.cpp.

References xy_decor_text.

Referenced by cb_scale_color(), and setLayoutFrom().

SXYAxisScaleOrientation SXYAxis::getScaleOrientation (  void    ) 
 

Definition at line 271 of file sxy_axis.cpp.

References scale_orientation, and SXYAxisScaleOrientation.

Referenced by SXYTaskAdjustAxis::openMenu(), and setLayoutFrom().

void SXYAxis::getScales (  double &    minimum,
double &    maximum
) 
 

Definition at line 434 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYSimpleGraph::adaptGrid(), calcPrecision(), SXYGraph::fitAllAxis(), SXYSimpleGraph::getScales(), setZoom(), SXYChart::tryGridAdjust(), tryScalesAdjust(), and tryStepAdjust().

double SXYAxis::getSize (  void    ) 
 

Definition at line 399 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYSimpleGraph::adaptGrid(), SXYSimpleGraph::getHorizontalAxisSize(), SXYSimpleGraph::getVerticalAxisSize(), and setLayoutFrom().

double SXYAxis::getStep (  void    ) 
 

Definition at line 484 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYSimpleGraph::getAxesSteps(), and SXYChart::tryGridAdjust().

char * SXYAxis::getTitle (  void    ) 
 

Definition at line 428 of file sxy_axis.cpp.

References xy_label.

Referenced by SXYSimpleGraph::getHorizontalAxisTitle(), SXYSimpleGraph::getVerticalAxisTitle(), and setLayoutFrom().

long int SXYAxis::getTitleColor (  void    ) 
 

Definition at line 345 of file sxy_axis.cpp.

References xy_label.

Referenced by cb_title_color(), and setLayoutFrom().

SXYAxisTitleStyle SXYAxis::getTitleStyle (  void    ) 
 

Definition at line 327 of file sxy_axis.cpp.

References SXYAxisTitleStyle, and title_style.

Referenced by SXYTaskAdjustAxis::openMenu(), and setLayoutFrom().

SXYAxisType SXYAxis::getType (  void    ) 
 

Definition at line 96 of file sxy_axis.cpp.

References SXYAxisType, and type.

Referenced by buildDecoratorAxis(), calcPrecision(), SXYChart::fitScale(), SXYSimpleGraph::inferGridType(), setZoom(), tryScalesAdjust(), and tryStepAdjust().

int SXYAxis::getVisibility (  void    ) 
 

Definition at line 584 of file sxy_axis.cpp.

References xy_axis.

Referenced by setLayoutFrom().

XYAxis * SXYAxis::getXyAxis (  void    ) 
 

Definition at line 654 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYCurve::createLegend(), pick_axis(), and SXYArea::SXYArea().

XYRasterText * SXYAxis::getXyDecorator (  void    ) 
 

Definition at line 642 of file sxy_axis.cpp.

References xy_decor_text.

Referenced by pick_axis().

XYRasterText * SXYAxis::getXyTitle (  void    ) 
 

Definition at line 648 of file sxy_axis.cpp.

References xy_label.

Referenced by pick_axis().

void SXYAxis::setArrowVisibility (  int    vis ) 
 

Definition at line 380 of file sxy_axis.cpp.

References xy_axis.

Referenced by setLayoutFrom().

void SXYAxis::setColor (  long int    col ) 
 

Definition at line 148 of file sxy_axis.cpp.

References xy_axis.

Referenced by cb_axis_color(), and setLayoutFrom().

void SXYAxis::setDirection (  SXYAxisDirection    dir ) 
 

Definition at line 277 of file sxy_axis.cpp.

References HORIZONTAL_AXIS, NORMAL_AXIS, orientation, updateScaleOrientation(), and xy_axis.

Referenced by SXYSimpleGraph::revertHorizontalAxis(), SXYSimpleGraph::revertVerticalAxis(), SXYSimpleGraph::setHorizontalAxisDirection(), setLayoutFrom(), and SXYSimpleGraph::setVerticalAxisDirection().

void SXYAxis::setFormat (  char *    fmt ) 
 

Definition at line 591 of file sxy_axis.cpp.

References LINEAR_AXIS, LOG_AXIS, type, and xy_decor.

Referenced by calcPrecision(), and tryScalesAdjust().

void SXYAxis::setLayoutFrom (  SXYAxis *    other ) 
 

Definition at line 660 of file sxy_axis.cpp.

References getArrowVisibility(), getColor(), getDirection(), getPosition(), getScaleColor(), getScaleOrientation(), getSize(), getTitle(), getTitleColor(), getTitleStyle(), getVisibility(), setArrowVisibility(), setColor(), setDirection(), setPosition(), setScaleColor(), setScaleOrientation(), setSize(), setTitle(), setTitleColor(), setTitleStyle(), and setVisibility().

Referenced by SXYSimpleGraph::remountGraph().

void SXYAxis::setPosition (  double    posx,
double    posy
) 
 

Definition at line 363 of file sxy_axis.cpp.

References updateScaleOrientation(), updateTitleStyle(), and xy_axis.

Referenced by SXYSimpleGraph::revertHorizontalAxis(), SXYSimpleGraph::revertVerticalAxis(), SXYSimpleGraph::setHorizontalAxisPosition(), setLayoutFrom(), and SXYSimpleGraph::setVerticalAxisPosition().

void SXYAxis::setPrecision (  int    p ) 
 

Definition at line 102 of file sxy_axis.cpp.

References precision.

void SXYAxis::setScaleColor (  long int    col ) 
 

Definition at line 351 of file sxy_axis.cpp.

References xy_decor_text.

Referenced by cb_scale_color(), and setLayoutFrom().

void SXYAxis::setScaleOrientation (  SXYAxisScaleOrientation    ori ) 
 

Definition at line 264 of file sxy_axis.cpp.

References scale_orientation, and updateScaleOrientation().

Referenced by cb_scale_aligned(), cb_scale_rotated(), and setLayoutFrom().

void SXYAxis::setScales (  double    minimum,
double    maximum
) 
 

Definition at line 621 of file sxy_axis.cpp.

References LOG_AXIS, type, and xy_axis.

Referenced by SXYChart::fitScale(), SXYChart::setAllAxis(), SXYSimpleGraph::setScales(), setZoom(), tryScalesAdjust(), and zoom().

void SXYAxis::setSize (  double    siz ) 
 

Definition at line 393 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYSimpleGraph::setHorizontalAxisSize(), setLayoutFrom(), and SXYSimpleGraph::setVerticalAxisSize().

void SXYAxis::setStep (  double    step ) 
 

Definition at line 635 of file sxy_axis.cpp.

References xy_axis.

Referenced by SXYSimpleGraph::setAxesSteps(), and tryStepAdjust().

void SXYAxis::setTitle (  char *    txt ) 
 

Definition at line 422 of file sxy_axis.cpp.

References xy_label.

Referenced by SXYSimpleGraph::setHorizontalAxisTitle(), setLayoutFrom(), and SXYSimpleGraph::setVerticalAxisTitle().

void SXYAxis::setTitleColor (  long int    col ) 
 

Definition at line 339 of file sxy_axis.cpp.

References xy_label.

Referenced by cb_title_color(), and setLayoutFrom().

void SXYAxis::setTitleStyle (  SXYAxisTitleStyle    sty ) 
 

Definition at line 320 of file sxy_axis.cpp.

References title_style, and updateTitleStyle().

Referenced by cb_title_end(), cb_title_end_rotated(), cb_title_middle(), and setLayoutFrom().

void SXYAxis::setVisibility (  int    flag ) 
 

Definition at line 577 of file sxy_axis.cpp.

References xy_axis.

Referenced by setLayoutFrom().

void SXYAxis::setZoom (  double    ratio ) 
 

Definition at line 444 of file sxy_axis.cpp.

References getScales(), getType(), LOG_AXIS, and setScales().

Referenced by SXYChart::setZoom().

void SXYAxis::tryScalesAdjust (  void    ) 
 

Definition at line 517 of file sxy_axis.cpp.

References A_DAY, A_HOUR, A_MINUTE, calcPrecision(), getScales(), getType(), LINEAR_AXIS, LOG_AXIS, precision, setFormat(), setScales(), SXYAxisType, TIME_AXIS, tryStepAdjust(), and type.

Referenced by SXYChart::fitScale(), SXYChart::setAllAxis(), SXYAxis(), and zoom().

void SXYAxis::tryStepAdjust (  void    ) 
 

Definition at line 491 of file sxy_axis.cpp.

References A_DAY, A_HOUR, A_MINUTE, A_MONTH, A_YEAR, getScales(), getType(), LINEAR_AXIS, LOG_AXIS, setStep(), SXYAxisType, TIME_AXIS, and type.

Referenced by tryScalesAdjust(), and zoom().

void SXYAxis::updateScaleOrientation (  void    )  [protected]
 

Definition at line 195 of file sxy_axis.cpp.

References ALIGNED, HORIZONTAL_AXIS, orientation, scale_orientation, and xy_decor_text.

Referenced by setDirection(), setPosition(), setScaleOrientation(), and SXYAxis().

void SXYAxis::updateTitleStyle (  void    )  [protected]
 

Definition at line 220 of file sxy_axis.cpp.

References AT_END, AT_END_ROTATED, AT_MIDDLE, HORIZONTAL_AXIS, orientation, title_style, xy_axis, and xy_label.

Referenced by setPosition(), setTitleStyle(), and SXYAxis().


Member Data Documentation

SXYChart* SXYAxis::chart [private]
 

Gráfico.

Definition at line 59 of file sxy_axis.h.

Referenced by getChart(), and SXYAxis().

SXYAxisOrientation SXYAxis::orientation [private]
 

Orientação do eixo.

Definition at line 71 of file sxy_axis.h.

Referenced by getDirection(), getOrientation(), setDirection(), SXYAxis(), updateScaleOrientation(), and updateTitleStyle().

int SXYAxis::precision [private]
 

Precisao do eixo.

Caso seja 0, é calculada automaticamente

Definition at line 86 of file sxy_axis.h.

Referenced by calcPrecision(), setPrecision(), SXYAxis(), and tryScalesAdjust().

SXYAxisScaleOrientation SXYAxis::scale_orientation [private]
 

Orientação do texto da escala.

Definition at line 68 of file sxy_axis.h.

Referenced by getScaleOrientation(), setScaleOrientation(), SXYAxis(), and updateScaleOrientation().

SXYAxisTitleStyle SXYAxis::title_style [private]
 

Tipo do eixo.

Definition at line 65 of file sxy_axis.h.

Referenced by getTitleStyle(), setTitleStyle(), SXYAxis(), and updateTitleStyle().

SXYAxisType SXYAxis::type [private]
 

Tipo do eixo.

Definition at line 62 of file sxy_axis.h.

Referenced by buildDecoratorAxis(), calcPrecision(), getFormat(), getType(), setFormat(), setScales(), SXYAxis(), tryScalesAdjust(), and tryStepAdjust().

XYAxis* SXYAxis::xy_axis [private]
 

Objeto XY que representa o eixo x do gráfico.

Definition at line 83 of file sxy_axis.h.

Referenced by buildDecoratorAxis(), getArrowVisibility(), getColor(), getDirection(), getPixelValue(), getPosition(), getPositionValue(), getScales(), getSize(), getStep(), getVisibility(), getXyAxis(), setArrowVisibility(), setColor(), setDirection(), setPosition(), setScales(), setSize(), setStep(), setVisibility(), SXYAxis(), updateTitleStyle(), and ~SXYAxis().

XYScaleDecorator* SXYAxis::xy_decor [private]
 

Objeto XY que representa o decorador x do gráfico.

Definition at line 80 of file sxy_axis.h.

Referenced by buildDecoratorAxis(), getFormat(), setFormat(), and ~SXYAxis().

XYRasterText* SXYAxis::xy_decor_text [private]
 

Objeto XY que representa o texto do decorador x do gráfico.

Definition at line 77 of file sxy_axis.h.

Referenced by getScaleColor(), getXyDecorator(), setScaleColor(), SXYAxis(), updateScaleOrientation(), and ~SXYAxis().

XYRasterText* SXYAxis::xy_label [private]
 

Objeto XY que representa o texto do eixo x do gráfico.

Definition at line 74 of file sxy_axis.h.

Referenced by getTitle(), getTitleColor(), getXyTitle(), setTitle(), setTitleColor(), SXYAxis(), updateTitleStyle(), and ~SXYAxis().


The documentation for this class was generated from the following files:
SXY
Tecgraf / PUC-Rio - Computer Graphics Technology Group