#include <cargowidget.h>
Public Types | |
| enum | DragTarget { NoDragging, TargetAvail, TargetNotAvail } |
Public Member Functions | |
| void | setDragTarget (DragTarget dragTarget) |
| Vehicle * | getUnit () |
| StoringPosition (PG_Widget *parent, const PG_Point &pos, const PG_Point &unitPos, HighLightingManager &highLightingManager, const ContainerBase::Cargo &storageVector, int number, bool regularPosition, CargoWidget *cargoWidget=NULL) | |
Static Public Member Functions | |
| static vector< StoringPosition * > | setup (PG_Widget *parent, ContainerBase *container, HighLightingManager &highLightingManager, int &unitColumnCount) |
Protected Member Functions | |
| void | markChanged (int old, int mark) |
| void | eventDraw (SDL_Surface *surface, const PG_Rect &src) |
| void | eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) |
| void | setBargraphValue (const ASCString &widgetName, float fraction) |
| void | setLabelText (const ASCString &widgetName, const ASCString &text, PG_Widget *parent=NULL) |
| bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
| bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
| bool | eventMouseMotion (const SDL_MouseMotionEvent *motion) |
Protected Attributes | |
| DragTarget | dragTarget |
Definition at line 44 of file cargowidget.h.
| StoringPosition::StoringPosition | ( | PG_Widget * | parent, | |
| const PG_Point & | pos, | |||
| const PG_Point & | unitPos, | |||
| HighLightingManager & | highLightingManager, | |||
| const ContainerBase::Cargo & | storageVector, | |||
| int | number, | |||
| bool | regularPosition, | |||
| CargoWidget * | cargoWidget = NULL | |||
| ) |
Definition at line 76 of file cargowidget.cpp.
References Surface::createSurface(), fieldsizex, fieldsizey, markChanged(), HighLightingManager::markChanged, and HighLightingManager::redrawAll.
Referenced by setup().
| void StoringPosition::markChanged | ( | int | old, | |
| int | mark | |||
| ) | [protected] |
| void StoringPosition::eventDraw | ( | SDL_Surface * | surface, | |
| const PG_Rect & | src | |||
| ) | [protected] |
Definition at line 128 of file cargowidget.cpp.
References ContainerBase::baseType, MegaBlitter< BytesPerSourcePixel, BytesPerTargetPixel, SourceColorTransform, ColorMerger, SourcePixelSelector, TargetPixelSelector, MyColorConverter >::blit(), ContainerBase::cargoWeight(), dragTarget, Surface::FillTransparent(), ASCString::format(), ContainerBase::getCargo(), IconRepository::getIcon(), HighLightingManager::getMark(), maxint, ContainerBaseType::maxLoadableUnits, ContainerBaseType::maxLoadableWeight, NoDragging, setBargraphValue(), setLabelText(), TargetAvail, and ASCString::toString().
| void StoringPosition::eventBlit | ( | SDL_Surface * | surface, | |
| const PG_Rect & | src, | |||
| const PG_Rect & | dst | |||
| ) | [protected] |
| void StoringPosition::setBargraphValue | ( | const ASCString & | widgetName, | |
| float | fraction | |||
| ) | [protected] |
Definition at line 93 of file cargowidget.cpp.
References BarGraphWidget::setFraction().
Referenced by eventDraw().
| bool StoringPosition::eventMouseButtonDown | ( | const SDL_MouseButtonEvent * | button | ) | [protected] |
Definition at line 228 of file cargowidget.cpp.
References HighLightingManager::clickOnMarkedUnit, CGameOptions::Mouse::dragndropbutton, CargoWidget::dragNdropEnabled(), CGameOptions::Mouse::fieldmarkbutton, HighLightingManager::getMark(), getUnit(), CGameOptions::Instance(), CGameOptions::mouse, and HighLightingManager::setNew().
| bool StoringPosition::eventMouseButtonUp | ( | const SDL_MouseButtonEvent * | button | ) | [protected] |
Definition at line 281 of file cargowidget.cpp.
References getUnit(), NONE, and CargoWidget::releaseDrag().
| bool StoringPosition::eventMouseMotion | ( | const SDL_MouseMotionEvent * | motion | ) | [protected] |
Definition at line 320 of file cargowidget.cpp.
References MegaBlitter< BytesPerSourcePixel, BytesPerTargetPixel, SourceColorTransform, ColorMerger, SourcePixelSelector, TargetPixelSelector, MyColorConverter >::blit(), Surface::createSurface(), fieldsizex, fieldsizey, Surface::getBaseSurface(), IconRepository::getIcon(), getUnit(), NONE, Vehicle::paint(), and square.
| void StoringPosition::setDragTarget | ( | DragTarget | dragTarget | ) | [inline] |
Definition at line 82 of file cargowidget.h.
| vector< StoringPosition * > StoringPosition::setup | ( | PG_Widget * | parent, | |
| ContainerBase * | container, | |||
| HighLightingManager & | highLightingManager, | |||
| int & | unitColumnCount | |||
| ) | [static] |
Definition at line 365 of file cargowidget.cpp.
References ContainerBase::baseType, ContainerBase::getCargo(), ContainerBaseType::maxLoadableUnits, and StoringPosition().
Referenced by CargoWidget::CargoWidget().
| Vehicle * StoringPosition::getUnit | ( | ) |
Definition at line 356 of file cargowidget.cpp.
Referenced by eventMouseButtonDown(), eventMouseButtonUp(), and eventMouseMotion().
DragTarget StoringPosition::dragTarget [protected] |
1.5.1