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

Maped_MainScreenWidget Class Reference

#include <maped-mainscreen.h>

Inheritance diagram for Maped_MainScreenWidget:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Maped_MainScreenWidget (PG_Application &application)
bool clearSelection ()
bool selectVehicle ()
bool selectBuilding ()
bool selectObject ()
bool selectObjectList ()
bool selectTerrain ()
bool selectTerrainList ()
bool selectMine ()
void updateStatusBar ()
void addContextAction (ContextAction *contextAction)

Protected Member Functions

bool clickOnMap (const MapCoordinate &field, const SPoint &pos, bool changed, int button, int prio)
void brushChanged (int i)
void selectionChanged (const MapComponent *item)
bool eventKeyUp (const SDL_KeyboardEvent *key)
 Overridable Eventhandler for a SDL_KeyboardEvent message.
bool eventKeyDown (const SDL_KeyboardEvent *key)
 Overridable Eventhandler for a SDL_KeyboardEvent message.
void setupStatusBar ()
void playerChanged (int player)
ASCString getBackgroundImageFilename ()
bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
 ~Maped_MainScreenWidget ()

Protected Attributes

NewGuiHostguiHost
Menumenu

Constructor & Destructor Documentation

Maped_MainScreenWidget::Maped_MainScreenWidget PG_Application application  ) 
 

Definition at line 383 of file maped-mainscreen.cpp.

References addContextAction(), DropDownSelector::AddItem(), brushChanged(), clearSelection(), clickOnMap(), cwettertypen, cwettertypennum, eventKeyDown(), PG_Application::GetApp(), BuildingItem::Height(), PG_Rect::Height(), MainScreenWidget::mapDisplay, menu, MapDisplayPG::mouseButtonOnField, mouseDraggedToField(), MapDisplayPG::mouseDraggedToField, mousePressedOnField(), PG_Rect::PG_Rect(), playerChanged(), selectBuilding(), selection, selectionChanged(), DropDownSelector::selectionSignal, selectMine(), selectObject(), selectObjectList(), selectTerrain(), selectTerrainList(), selectVehicle(), SelectionItemWidget::set(), SelectionHolder::setPlayer(), MainScreenWidget::setup(), setupStatusBar(), SelectionHolder::setWeather(), PG_Button::sigClick, MainScreenWidget::spawnOverviewMapPanel(), ASCString::toString(), BuildingItem::Width(), and PG_Rect::Width().

Maped_MainScreenWidget::~Maped_MainScreenWidget  )  [inline, protected]
 

Definition at line 119 of file maped-mainscreen.h.


Member Function Documentation

void Maped_MainScreenWidget::addContextAction ContextAction contextAction  ) 
 

Definition at line 555 of file maped-mainscreen.cpp.

Referenced by Maped_MainScreenWidget().

void Maped_MainScreenWidget::brushChanged int  i  )  [protected]
 

Definition at line 548 of file maped-mainscreen.cpp.

References SelectionHolder::brushSize, and selection.

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::clearSelection  ) 
 

Definition at line 911 of file maped-mainscreen.cpp.

References SelectionHolder::clear(), and selection.

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::clickOnMap const MapCoordinate field,
const SPoint pos,
bool  changed,
int  button,
int  prio
[protected]
 

Definition at line 561 of file maped-mainscreen.cpp.

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

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::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 PG_MessageObject.

Definition at line 657 of file maped-mainscreen.cpp.

References act_changecargo, act_changemapvals, act_changeminestrength, act_changeplayers, act_changeproduction, act_changeresources, act_changeterraindir, act_changeunitdir, act_changeunitvals, act_clearSelection, act_copyToClipboard, act_createresources, act_cutToClipboard, act_decrease_zoom, act_deletething, act_end, act_events, act_help, act_import_bi_map, act_increase_zoom, act_loadmap, act_mapgenerator, act_maptopcx, act_mirrorcursorx, act_mirrorcursory, act_movebuilding, act_newmap, act_openControlPanel, act_pasteFromClipboard, act_placemine, act_polymode, act_primaryAction, act_repaintdisplay, act_resizemap, act_savemap, act_selbodentyp, act_selbodentypAll, act_selbuilding, act_selmine, act_selobject, act_selobjectAll, act_selunit, act_setactivefieldvals, act_setactweatherglobal, act_setunitfilter, act_setupalliances, act_setzoom, act_showpalette, act_showPipeNet, act_switchmaps, act_terraininfo, act_toggleresourcemode, act_unitinfo, act_viewmap, actmap, execaction_ev(), getPGApplication(), helperFunction(), GameMap::player, and Player::vehicleList.

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::eventKeyUp 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 pressed to unpressed. 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 PG_MessageObject.

Definition at line 620 of file maped-mainscreen.cpp.

References act_releaseControlPanel, and execaction_ev().

bool Maped_MainScreenWidget::eventMouseButtonDown const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent 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 PG_MessageObject.

Definition at line 507 of file maped-mainscreen.cpp.

ASCString Maped_MainScreenWidget::getBackgroundImageFilename  )  [inline, protected, virtual]
 

Implements MainScreenWidget.

Definition at line 115 of file maped-mainscreen.h.

void Maped_MainScreenWidget::playerChanged int  player  )  [protected]
 

Definition at line 493 of file maped-mainscreen.cpp.

References PG_DropDown::SelectItem().

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectBuilding  ) 
 

Definition at line 925 of file maped-mainscreen.cpp.

References buildingTypeRepository, and showSelectionWindow().

Referenced by Maped_MainScreenWidget().

void Maped_MainScreenWidget::selectionChanged const MapComponent item  )  [protected]
 

Definition at line 536 of file maped-mainscreen.cpp.

References PG_Widget::SetText(), and ASCString::toString().

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectMine  ) 
 

Definition at line 959 of file maped-mainscreen.cpp.

References mineTypeRepository, and showSelectionWindow().

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectObject  ) 
 

Definition at line 931 of file maped-mainscreen.cpp.

References act_switchmaps, and execaction_ev().

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectObjectList  ) 
 

Definition at line 938 of file maped-mainscreen.cpp.

References objectTypeRepository, and showSelectionWindow().

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectTerrain  ) 
 

Definition at line 945 of file maped-mainscreen.cpp.

References act_switchmaps, and execaction_ev().

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectTerrainList  ) 
 

Definition at line 952 of file maped-mainscreen.cpp.

References showSelectionWindow(), and terrainTypeRepository.

Referenced by Maped_MainScreenWidget().

bool Maped_MainScreenWidget::selectVehicle  ) 
 

Definition at line 918 of file maped-mainscreen.cpp.

References showSelectionWindow(), and vehicleTypeRepository.

Referenced by Maped_MainScreenWidget().

void Maped_MainScreenWidget::setupStatusBar  )  [protected]
 

Definition at line 512 of file maped-mainscreen.cpp.

References cursorMoved, PG_Rect::Height(), MainScreenWidget::mapDisplay, MainScreenWidget::messageLine, PG_Rect::my_xpos, PG_Rect::my_ypos, PG_Rect::PG_Rect(), PG_Widget::SetFontSize(), updateFieldInfo, and updateStatusBar().

Referenced by Maped_MainScreenWidget().

void Maped_MainScreenWidget::updateStatusBar  ) 
 

Definition at line 530 of file maped-mainscreen.cpp.

References actmap, GameMap::getCursor(), PG_Widget::SetText(), ASCString::toString(), MapCoordinate::x, and MapCoordinate::y.

Referenced by setupStatusBar().


Member Data Documentation

NewGuiHost* Maped_MainScreenWidget::guiHost [protected]
 

Definition at line 104 of file maped-mainscreen.h.

Menu* Maped_MainScreenWidget::menu [protected]
 

Definition at line 105 of file maped-mainscreen.h.

Referenced by Maped_MainScreenWidget().


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