
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 |
Definition at line 1186 of file cargodialog.cpp.
| GraphWidget::GraphWidget | ( | PG_Widget * | parent, | |
| const PG_Rect & | rect | |||
| ) | [inline] |
Definition at line 1231 of file cargodialog.cpp.
| 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] |
| bool GraphWidget::eventMouseButtonDown | ( | const SDL_MouseButtonEvent * | button | ) | [inline, protected] |
| int GraphWidget::mapColor | ( | int | col | ) | [inline, protected] |
| 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] |
| int GraphWidget::addBar | ( | int | pos, | |
| int | color | |||
| ) | [inline] |
| 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] |
| 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.
int GraphWidget::xrange [protected] |
Definition at line 1193 of file cargodialog.cpp.
Referenced by eventBlit(), setRange(), and ResearchGraph::setResearch().
int GraphWidget::yrange [protected] |
1.5.1