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

#include <fieldmarker.h>

Inheritance diagram for SelectFromMap:
Inheritance graph
[legend]

Public Types

typedef vector< MapCoordinateCoordinateList
 
- Public Types inherited from ASC_PG_Dialog
enum  StandardButtonDirectonType { Vertical, Horizontal }
 

Public Member Functions

 SelectFromMap (CoordinateList &list, GameMap *map, bool justOne=false, bool readOnly=false)
 
void Show (bool fade=false)
 
 ~SelectFromMap ()
 
- Public Member Functions inherited from ASC_PG_Dialog
 ASC_PG_Dialog (PG_Widget *parent, const PG_Rect &r, const ASCString &windowtext, WindowFlags flags=DEFAULT, const ASCString &style="Window", int heightTitlebar=25)
 
PG_Button * AddStandardButton (const ASCString &name)
 
void StandardButtonDirection (StandardButtonDirectonType dir)
 
int RunModal ()
 

Protected Member Functions

bool ProcessEvent (const SDL_Event *event, bool bModal=false)
 
virtual bool accept (const MapCoordinate &pos)
 
virtual void showFieldMarking (const CoordinateList &coordinateList)
 
virtual bool mark ()
 
virtual bool markField (const MapCoordinate &pos)
 
bool eventKeyDown (const SDL_KeyboardEvent *key)
 
void updateList ()
 
bool listItemClicked (PG_ListBoxBaseItem *item)
 
virtual bool isOk ()
 
bool closeDialog ()
 
- Protected Member Functions inherited from ASC_PG_Dialog
virtual bool closeWindow ()
 
bool quitModalLoopW (PG_Button *button, int value)
 
bool quitModalLoop (int value)
 

Protected Attributes

GameMapactmap
 
CoordinateListcoordinateList
 
- Protected Attributes inherited from ASC_PG_Dialog
PG_MessageObject * caller
 

Additional Inherited Members

- Static Public Member Functions inherited from ASC_PG_Dialog
static PG_Rect centerRectangle (const PG_Rect &rect)
 

Detailed Description

Definition at line 32 of file fieldmarker.h.

Member Typedef Documentation

Definition at line 45 of file fieldmarker.h.

Constructor & Destructor Documentation

SelectFromMap::SelectFromMap ( CoordinateList list,
GameMap map,
bool  justOne = false,
bool  readOnly = false 
)
SelectFromMap::~SelectFromMap ( )

Member Function Documentation

bool SelectFromMap::accept ( const MapCoordinate pos)
protectedvirtual

Reimplemented in SelectUnitFromMap, and SelectBuildingFromMap.

Definition at line 89 of file fieldmarker.cpp.

References actmap, and GameMap::getField().

Referenced by ReinforcementSelector::mark(), and markField().

bool SelectFromMap::closeDialog ( )
inlineprotected

Definition at line 59 of file fieldmarker.h.

References isOk().

Referenced by SelectFromMap().

bool SelectFromMap::eventKeyDown ( const SDL_KeyboardEvent *  key)
protectedvirtual

Reimplemented from ASC_PG_Dialog.

Definition at line 140 of file fieldmarker.cpp.

References ASC_PG_Dialog::eventKeyDown(), isOk(), and mark().

virtual bool SelectFromMap::isOk ( )
inlineprotectedvirtual

Reimplemented in SelectUnitFromMap, SelectBuildingFromMap, and ReinforcementSelector.

Definition at line 58 of file fieldmarker.h.

Referenced by closeDialog(), and eventKeyDown().

bool SelectFromMap::listItemClicked ( PG_ListBoxBaseItem *  item)
protected
bool SelectFromMap::mark ( )
protectedvirtual

Reimplemented in ReinforcementSelector.

Definition at line 134 of file fieldmarker.cpp.

References actmap, GameMap::getCursor(), and markField().

Referenced by eventKeyDown(), and SelectFromMap().

bool SelectFromMap::markField ( const MapCoordinate pos)
protectedvirtual

Definition at line 112 of file fieldmarker.cpp.

References accept(), coordinateList, showFieldMarking(), and updateList().

Referenced by mark().

bool SelectFromMap::ProcessEvent ( const SDL_Event *  event,
bool  bModal = false 
)
protected

Definition at line 78 of file fieldmarker.cpp.

void SelectFromMap::Show ( bool  fade = false)
void SelectFromMap::showFieldMarking ( const CoordinateList coordinateList)
protectedvirtual
void SelectFromMap::updateList ( )
protected

Definition at line 156 of file fieldmarker.cpp.

References coordinateList.

Referenced by ReinforcementSelector::mark(), markField(), and SelectFromMap().

Member Data Documentation

GameMap* SelectFromMap::actmap
protected
CoordinateList& SelectFromMap::coordinateList
protected

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