Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GuiFunctions::ObjectBuildingGui Class Reference

Inheritance diagram for GuiFunctions::ObjectBuildingGui:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ObjectBuildingGui ()
bool init (Vehicle *vehicle)
void eval (const MapCoordinate &mc, ContainerBase *subject)
 checks evaluates the field on which the cursor resides

Protected Types

enum  Mode { Build, Remove }

Protected Member Functions

bool available (const MapCoordinate &pos, ContainerBase *subject, int num)
void execute (const MapCoordinate &pos, ContainerBase *subject, int num)
SurfacegetImage (const MapCoordinate &pos, ContainerBase *subject, int num)
ASCString getName (const MapCoordinate &pos, ContainerBase *subject, int num)
bool checkObject (tfield *fld, ObjectType *objtype, Mode mode)
void search (const MapCoordinate &pos, int &num, int pass)
bool checkForKey (const SDL_KeyboardEvent *key, int modifier, int num)
void addButton (int &num, const MapCoordinate &mc, ContainerBase *subject, int id)

Member Enumeration Documentation

enum GuiFunctions::ObjectBuildingGui::Mode [protected]
 

Enumeration values:
Build 
Remove 

Definition at line 1629 of file guifunctions.cpp.


Constructor & Destructor Documentation

GuiFunctions::ObjectBuildingGui::ObjectBuildingGui  )  [inline]
 

Definition at line 1643 of file guifunctions.cpp.

References GameMap::sigMapDeletion.


Member Function Documentation

void GuiFunctions::ObjectBuildingGui::addButton int &  num,
const MapCoordinate mc,
ContainerBase subject,
int  id
[protected]
 

Definition at line 1824 of file guifunctions.cpp.

References NewGuiHost::getButton(), GuiIconHandler::host, GuiButton::registerFunc(), and PG_Widget::Show().

Referenced by search().

bool GuiFunctions::ObjectBuildingGui::available const MapCoordinate pos,
ContainerBase subject,
int  num
[protected, virtual]
 

Implements GuiFunction.

Definition at line 1666 of file guifunctions.cpp.

bool GuiFunctions::ObjectBuildingGui::checkForKey const SDL_KeyboardEvent *  key,
int  modifier,
int  num
[protected, virtual]
 

Reimplemented from GuiFunction.

Definition at line 1746 of file guifunctions.cpp.

bool GuiFunctions::ObjectBuildingGui::checkObject tfield fld,
ObjectType objtype,
Mode  mode
[protected]
 

Definition at line 1794 of file guifunctions.cpp.

References actmap, tfield::bdt, Build, tfield::checkforobject(), ObjectType::getFieldModification(), Vehicle::getMovement(), ContainerBase::getOwner(), Vehicle::getResource(), tfield::getweather(), GameMap::player, and Resources::resource().

Referenced by search().

void GuiFunctions::ObjectBuildingGui::eval const MapCoordinate mc,
ContainerBase subject
[virtual]
 

checks evaluates the field on which the cursor resides

Reimplemented from GuiIconHandler.

Definition at line 1904 of file guifunctions.cpp.

References actmap, beeline(), NewGuiHost::disableButtons(), NewGuiHost::getButton(), Vehicle::getPosition(), GuiIconHandler::host, GuiButton::registerFunc(), search(), PG_Widget::Show(), MapCoordinate::x, GameMap::xsize, MapCoordinate::y, and GameMap::ysize.

void GuiFunctions::ObjectBuildingGui::execute const MapCoordinate pos,
ContainerBase subject,
int  num
[protected, virtual]
 

Implements GuiFunction.

Definition at line 1682 of file guifunctions.cpp.

References actmap, RecalculateAreaView::addView(), assert, ObjectType::basicjamming_abs, ObjectType::basicjamming_plus, ObjectType::build_movecost, ObjectType::buildcost, tfield::checkforobject(), GameMap::cleartemps(), Vehicle::decreaseMovement(), GameMap::getField(), Vehicle::getResource(), ObjectType::id, logtoreplayinfo(), maxmalq, maxViewRange, moveparams, tmoveparams::movestatus, Vehicle::networkid, objectTypeRepository, NewGuiHost::popIconHandler(), ObjectType::remove_movecost, ObjectType::removecost, tfield::removeobject(), RecalculateAreaView::removeView(), repaintMap, rpl_buildobj2, rpl_remobj2, updateFieldInfo, ObjectType::viewbonus_abs, and ObjectType::viewbonus_plus.

Surface & GuiFunctions::ObjectBuildingGui::getImage const MapCoordinate pos,
ContainerBase subject,
int  num
[protected, virtual]
 

Implements GuiFunction.

Definition at line 1754 of file guifunctions.cpp.

References GuiFunctions::buildGuiIcon(), IconRepository::getIcon(), ObjectType::getPicture(), and objectTypeRepository.

ASCString GuiFunctions::ObjectBuildingGui::getName const MapCoordinate pos,
ContainerBase subject,
int  num
[protected, virtual]
 

Implements GuiFunction.

Definition at line 1774 of file guifunctions.cpp.

References ObjectType::build_movecost, ObjectType::buildcost, ASCString::format(), Resources::fuel, Resources::material, ObjectType::name, objectTypeRepository, ObjectType::remove_movecost, and ObjectType::removecost.

bool GuiFunctions::ObjectBuildingGui::init Vehicle vehicle  ) 
 

Definition at line 1654 of file guifunctions.cpp.

References getNeighbouringFieldCoordinate(), Vehicle::getPosition(), and search().

Referenced by GuiFunctions::BuildObject::execute().

void GuiFunctions::ObjectBuildingGui::search const MapCoordinate pos,
int &  num,
int  pass
[protected]
 

Definition at line 1832 of file guifunctions.cpp.

References tfield::a, actmap, addButton(), Build, tfield::building, checkObject(), fieldvisiblenow(), GameMap::getField(), GameMap::getobjecttype_byid(), ObjectType::groupID, ObjectType::id, Vehicletype::objectGroupsBuildable, Vehicletype::objectGroupsRemovable, Vehicletype::objectsBuildable, Vehicletype::objectsRemovable, objectTypeRepository, Remove, Vehicle::typ, and tfield::vehicle.

Referenced by eval(), and init().


The documentation for this class was generated from the following file:
Generated on Tue Jun 24 02:22:54 2008 for Advanced Strategic Command by  doxygen 1.4.2