Advanced Strategic Command
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StoringPosition Class Reference

#include <cargowidget.h>

Inheritance diagram for StoringPosition:
Inheritance graph

Public Types

enum  DragTarget { NoDragging, TargetAvail, TargetNotAvail }

Public Member Functions

void setDragTarget (DragTarget dragTarget)
VehiclegetUnit ()
 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

Detailed Description

Definition at line 44 of file cargowidget.h.

Member Enumeration Documentation


Definition at line 77 of file cargowidget.h.

Constructor & Destructor Documentation

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 

Member Function Documentation

void StoringPosition::eventBlit ( SDL_Surface *  surface,
const PG_Rect &  src,
const PG_Rect &  dst 

Definition at line 121 of file cargowidget.cpp.

References Surface::getBaseSurface().

void StoringPosition::eventDraw ( SDL_Surface *  surface,
const PG_Rect &  src 
bool StoringPosition::eventMouseButtonDown ( const SDL_MouseButtonEvent *  button)
bool StoringPosition::eventMouseButtonUp ( const SDL_MouseButtonEvent *  button)

Definition at line 281 of file cargowidget.cpp.

References getUnit(), NONE, and CargoWidget::releaseDrag().

bool StoringPosition::eventMouseMotion ( const SDL_MouseMotionEvent *  motion)
Vehicle * StoringPosition::getUnit ( )

Definition at line 356 of file cargowidget.cpp.

Referenced by eventMouseButtonDown(), eventMouseButtonUp(), and eventMouseMotion().

void StoringPosition::markChanged ( int  old,
int  mark 

Definition at line 52 of file cargowidget.cpp.

Referenced by StoringPosition().

void StoringPosition::setBargraphValue ( const ASCString widgetName,
float  fraction 

Definition at line 93 of file cargowidget.cpp.

References BarGraphWidget::setFraction().

Referenced by eventDraw().

void StoringPosition::setDragTarget ( DragTarget  dragTarget)

Definition at line 82 of file cargowidget.h.

References dragTarget.

void StoringPosition::setLabelText ( const ASCString widgetName,
const ASCString text,
PG_Widget *  parent = NULL 

Definition at line 100 of file cargowidget.cpp.

Referenced by eventDraw().

vector< StoringPosition * > StoringPosition::setup ( PG_Widget *  parent,
ContainerBase container,
HighLightingManager highLightingManager,
int &  unitColumnCount 

Member Data Documentation

DragTarget StoringPosition::dragTarget

Definition at line 79 of file cargowidget.h.

Referenced by eventDraw(), and setDragTarget().

The documentation for this class was generated from the following files: