
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) |
| overridable eventhandler to blit the widget contents to the screen | |
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) |
| Overridable Eventhandler for a SDL_MouseMotionEvent message. | |
| bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
| Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
| int | mapColor (int col) |
Protected Attributes | |
| int | xrange |
| int | yrange |
|
||||||||||||
|
Definition at line 1354 of file cargodialog.cpp. |
|
||||||||||||
|
Definition at line 1367 of file cargodialog.cpp. Referenced by MiningGraph::MiningGraph(). |
|
|
Definition at line 1361 of file cargodialog.cpp. Referenced by ResearchGraph::ResearchGraph(). |
|
||||||||||||
|
Definition at line 1374 of file cargodialog.cpp. Referenced by ResearchGraph::addSecondaryLab(), and ResearchGraph::recalc(). |
|
|
Definition at line 1379 of file cargodialog.cpp. Referenced by ResearchGraph::recalc(). |
|
||||||||||||
|
Reimplemented in ResearchGraph. Definition at line 1321 of file cargodialog.cpp. Referenced by eventMouseButtonDown(), and eventMouseMotion(). |
|
||||||||||||||||
|
overridable eventhandler to blit the widget contents to the screen
Reimplemented from PG_Widget. Definition at line 1384 of file cargodialog.cpp. References PG_Widget::ClientToScreen(), getBarHeight(), getPoint(), PG_Application::GetScreen(), PG_Rect::Height(), mapColor(), PG_Rect::Width(), Surface::Wrap(), PG_Point::x, xrange, PG_Point::y, and yrange. |
|
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 1335 of file cargodialog.cpp. References click(), PG_Widget::ScreenToClient(), and PG_Point::x. |
|
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented from PG_MessageObject. Definition at line 1323 of file cargodialog.cpp. References click(), PG_Widget::ScreenToClient(), and PG_Point::x. |
|
|
Reimplemented in MiningGraph. Definition at line 1320 of file cargodialog.cpp. Referenced by eventBlit(). |
|
||||||||||||
|
Reimplemented in ResearchGraph. Definition at line 1319 of file cargodialog.cpp. Referenced by eventBlit(). |
|
|
Definition at line 1347 of file cargodialog.cpp. References PG_Application::GetScreen(), PG_Widget::GetTransparency(), and PG_Color::MapRGBA(). Referenced by eventBlit(). |
|
||||||||||||
|
Definition at line 1355 of file cargodialog.cpp. References max(), xrange, and yrange. Referenced by MiningGraph::MiningGraph(), and ResearchGraph::ResearchGraph(). |
|
|
Definition at line 1317 of file cargodialog.cpp. Referenced by eventBlit(), setRange(), and ResearchGraph::setResearch(). |
|
|
Definition at line 1318 of file cargodialog.cpp. Referenced by eventBlit(), and setRange(). |
1.4.2