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

SelectFromMap Class Reference

#include <fieldmarker.h>

Inheritance diagram for SelectFromMap:

Inheritance graph
[legend]
List of all members.

Public Types

typedef vector< MapCoordinateCoordinateList

Public Member Functions

 SelectFromMap (CoordinateList &list, GameMap *map, bool justOne=false, bool readOnly=false)
void Show (bool fade=false)
 Make a widget visible (if you want a widget to show up the first time, use this method).
 ~SelectFromMap ()

Protected Member Functions

bool ProcessEvent (const SDL_Event *event, bool bModal=false)
 Process a native PG_ event.
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)
 Overridable Eventhandler for a SDL_KeyboardEvent message.
void updateList ()
bool listItemClicked (PG_ListBoxBaseItem *item)
virtual bool isOk ()
bool closeDialog ()

Protected Attributes

GameMapactmap
CoordinateListcoordinateList

Member Typedef Documentation

typedef vector<MapCoordinate> SelectFromMap::CoordinateList
 

Definition at line 44 of file fieldmarker.h.


Constructor & Destructor Documentation

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

Definition at line 43 of file fieldmarker.cpp.

References closeDialog(), coordinateList, MapDisplayPG::cursor, getMainScreenWidget(), MapDisplayPG::Cursor::goTo(), listItemClicked(), mark(), MapDisplayPG::mouseButtonOnField, PG_Rect::PG_Rect(), MapDisplayPG::setSignalPriority(), showFieldMarking(), PG_Button::sigClick, PG_ListBox::sigSelectItem, and updateList().

SelectFromMap::~SelectFromMap  ) 
 

Definition at line 183 of file fieldmarker.cpp.

References actmap, GameMap::cleartemps(), getMainScreenWidget(), repaintMap, and MapDisplayPG::setSignalPriority().


Member Function Documentation

bool SelectFromMap::accept const MapCoordinate pos  )  [protected, virtual]
 

Reimplemented in SelectBuildingFromMap, and SelectUnitFromMap.

Definition at line 86 of file fieldmarker.cpp.

References actmap, and GameMap::getField().

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

bool SelectFromMap::closeDialog  )  [inline, protected]
 

Definition at line 58 of file fieldmarker.h.

References isOk(), and PG_Widget::QuitModal().

Referenced by SelectFromMap().

bool SelectFromMap::eventKeyDown const SDL_KeyboardEvent *  key  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_KeyboardEvent message.

This handler is called when a key changed it's state from unpressed to pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
key SDL_KeyboardEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from ASC_PG_Dialog.

Definition at line 137 of file fieldmarker.cpp.

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

virtual bool SelectFromMap::isOk  )  [inline, protected, virtual]
 

Reimplemented in SelectBuildingFromMap, and SelectUnitFromMap.

Definition at line 57 of file fieldmarker.h.

Referenced by closeDialog(), and eventKeyDown().

bool SelectFromMap::listItemClicked PG_ListBoxBaseItem item  )  [protected]
 

Definition at line 162 of file fieldmarker.cpp.

References MapDisplayPG::cursor, and MapDisplayPG::Cursor::goTo().

Referenced by SelectFromMap().

bool SelectFromMap::mark  )  [protected, virtual]
 

Reimplemented in ReinforcementSelector.

Definition at line 131 of file fieldmarker.cpp.

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

Referenced by eventKeyDown(), and SelectFromMap().

bool SelectFromMap::markField const MapCoordinate pos  )  [protected, virtual]
 

Definition at line 109 of file fieldmarker.cpp.

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

Referenced by mark().

bool SelectFromMap::ProcessEvent const SDL_Event *  event,
bool  bModal = false
[protected, virtual]
 

Process a native PG_ event.

Parameters:
event PG_ event to process
bModal set to true if processing takes place in a modal loop
Returns:
true if the event was sucessfully processed
ProcessEvent asks the widget to process a given event. It also asks its parent and, if bModal is true, its children.

Reimplemented from PG_Widget.

Definition at line 75 of file fieldmarker.cpp.

References PG_Widget::ProcessEvent().

void SelectFromMap::Show bool  fade = false  )  [virtual]
 

Make a widget visible (if you want a widget to show up the first time, use this method).

Parameters:
fade do a smooth fade in if true (non-threaded)

Reimplemented from PG_Widget.

Definition at line 174 of file fieldmarker.cpp.

References PG_Widget::BringToFront(), getMainScreenWidget(), repaintMap, and PG_Widget::Show().

Referenced by editpolygon(), TargetCoordinateLocator::eventMouseButtonDown(), getxy_building(), selectFields(), selectunit(), selectUnitFromMap(), Reinforcements::setup(), and showAllUnitPositions().

void SelectFromMap::showFieldMarking const CoordinateList coordinateList  )  [protected, virtual]
 

Reimplemented in PolygonEditor.

Definition at line 90 of file fieldmarker.cpp.

References actmap, GameMap::cleartemps(), GameMap::getField(), and repaintMap.

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

void SelectFromMap::updateList  )  [protected]
 

Definition at line 153 of file fieldmarker.cpp.

References coordinateList, PG_ListBox::DeleteAll(), and PG_Widget::Show().

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


Member Data Documentation

GameMap* SelectFromMap::actmap [protected]
 

Definition at line 46 of file fieldmarker.h.

Referenced by SelectUnitFromMap::accept(), SelectBuildingFromMap::accept(), accept(), ReinforcementSelector::mark(), mark(), showFieldMarking(), and ~SelectFromMap().

CoordinateList& SelectFromMap::coordinateList [protected]
 

Definition at line 47 of file fieldmarker.h.

Referenced by SelectUnitFromMap::isOk(), SelectBuildingFromMap::isOk(), ReinforcementSelector::mark(), markField(), SelectFromMap(), and updateList().


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