GraphWidget Class Reference

Inheritance diagram for GraphWidget:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GraphWidget (PG_Widget *parent, const PG_Rect &rect)
void setRange (int x, int y)
int addCurve (int color)
int addBar (int pos, int color)
void addVerticalLine (int x, int color)
void clearVerticalLines ()
void eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)

Protected Member Functions

virtual int getPoint (int curve, int x)
virtual int getBarHeight (int bar)
virtual void click (int x, int button)
bool eventMouseMotion (const SDL_MouseMotionEvent *motion)
bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
int mapColor (int col)

Protected Attributes

int xrange
int yrange

Detailed Description

Definition at line 1186 of file cargodialog.cpp.


Constructor & Destructor Documentation

GraphWidget::GraphWidget ( PG_Widget *  parent,
const PG_Rect &  rect 
) [inline]

Definition at line 1231 of file cargodialog.cpp.


Member Function Documentation

virtual int GraphWidget::getPoint ( int  curve,
int  x 
) [inline, protected, virtual]

Reimplemented in ResearchGraph.

Definition at line 1195 of file cargodialog.cpp.

Referenced by eventBlit().

virtual int GraphWidget::getBarHeight ( int  bar  )  [inline, protected, virtual]

Reimplemented in MiningGraph.

Definition at line 1198 of file cargodialog.cpp.

Referenced by eventBlit().

virtual void GraphWidget::click ( int  x,
int  button 
) [inline, protected, virtual]

Reimplemented in ResearchGraph.

Definition at line 1201 of file cargodialog.cpp.

Referenced by eventMouseButtonDown(), and eventMouseMotion().

bool GraphWidget::eventMouseMotion ( const SDL_MouseMotionEvent *  motion  )  [inline, protected]

Definition at line 1203 of file cargodialog.cpp.

References click().

bool GraphWidget::eventMouseButtonDown ( const SDL_MouseButtonEvent *  button  )  [inline, protected]

Definition at line 1214 of file cargodialog.cpp.

References click().

int GraphWidget::mapColor ( int  col  )  [inline, protected]

Definition at line 1225 of file cargodialog.cpp.

Referenced by eventBlit().

void GraphWidget::setRange ( int  x,
int  y 
) [inline]

Definition at line 1232 of file cargodialog.cpp.

References max(), xrange, and yrange.

Referenced by MiningGraph::MiningGraph(), and ResearchGraph::ResearchGraph().

int GraphWidget::addCurve ( int  color  )  [inline]

Definition at line 1237 of file cargodialog.cpp.

Referenced by ResearchGraph::ResearchGraph().

int GraphWidget::addBar ( int  pos,
int  color 
) [inline]

Definition at line 1242 of file cargodialog.cpp.

Referenced by MiningGraph::MiningGraph().

void GraphWidget::addVerticalLine ( int  x,
int  color 
) [inline]

Definition at line 1248 of file cargodialog.cpp.

Referenced by ResearchGraph::addSecondaryLab(), and ResearchGraph::recalc().

void GraphWidget::clearVerticalLines (  )  [inline]

Definition at line 1252 of file cargodialog.cpp.

Referenced by ResearchGraph::recalc().

void GraphWidget::eventBlit ( SDL_Surface *  surface,
const PG_Rect &  src,
const PG_Rect &  dst 
) [inline]

Definition at line 1256 of file cargodialog.cpp.

References getBarHeight(), getPoint(), mapColor(), Surface::Wrap(), xrange, and yrange.


Member Data Documentation

int GraphWidget::xrange [protected]

Definition at line 1193 of file cargodialog.cpp.

Referenced by eventBlit(), setRange(), and ResearchGraph::setResearch().

int GraphWidget::yrange [protected]

Definition at line 1194 of file cargodialog.cpp.

Referenced by eventBlit(), and setRange().


The documentation for this class was generated from the following file:
Generated on Mon May 21 01:46:49 2012 for Advanced Strategic Command by  doxygen 1.5.1