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
[legend]

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

Enumerator
NoDragging 
TargetAvail 
TargetNotAvail 

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 
)
protected

Definition at line 121 of file cargowidget.cpp.

References Surface::getBaseSurface().

void StoringPosition::eventDraw ( SDL_Surface *  surface,
const PG_Rect &  src 
)
protected
bool StoringPosition::eventMouseButtonDown ( const SDL_MouseButtonEvent *  button)
protected
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
Vehicle * StoringPosition::getUnit ( )

Definition at line 356 of file cargowidget.cpp.

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

void StoringPosition::markChanged ( int  old,
int  mark 
)
protected

Definition at line 52 of file cargowidget.cpp.

Referenced by StoringPosition().

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

Definition at line 93 of file cargowidget.cpp.

References BarGraphWidget::setFraction().

Referenced by eventDraw().

void StoringPosition::setDragTarget ( DragTarget  dragTarget)
inline

Definition at line 82 of file cargowidget.h.

References dragTarget.

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

Definition at line 100 of file cargowidget.cpp.

Referenced by eventDraw().

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

Member Data Documentation

DragTarget StoringPosition::dragTarget
protected

Definition at line 79 of file cargowidget.h.

Referenced by eventDraw(), and setDragTarget().


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