ASC_MainScreenWidget Class Reference

The widget that controls the main screen of ASC. More...

#include <asc-mainscreen.h>

Inheritance diagram for ASC_MainScreenWidget:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Panels {
  ButtonPanel, WindInfo, UnitInfo, OverviewMap,
  MapControl, ActionInfo
}

Public Member Functions

 ASC_MainScreenWidget (PG_Application &application)
void spawnPanel (Panels panel)
bool spawnPanel (const ASCString &panelName)
 spawns the panel with the given name. Returns true if such a panel exists, false otherwise
NewGuiHostgetGuiHost ()
DashboardPanelgetUnitInfoPanel ()
void showMovementRange (GameMap *gamemap, const MapCoordinate &pos)
void showWeaponRange (GameMap *gamemap, const MapCoordinate &pos)
 ~ASC_MainScreenWidget ()

Protected Member Functions

bool eventKeyDown (const SDL_KeyboardEvent *key)
ASCString getBackgroundImageFilename ()
void lockStandardActions (int dir, int options)

Protected Attributes

NewGuiHostguiHost
Menumenu
DashboardPanelunitInfoPanel
WindInfoPanelwindInfoPanel
MapInfoPanelmapInfoPanel
ActionInfoPanelactionInfoPanel
UnitWeaponRangeLayerweaponRangeLayer
UnitMovementRangeLayermovementRangeLayer
list< int > lockOptionStack

Detailed Description

The widget that controls the main screen of ASC.

It covers the whole ASC window and will be the parent for all other elements, like

The ASC_MainScreenWidget also controls all the global keyboard shortcuts (

See also:
ASC_MainScreenWidget::eventKeyDown)

Definition at line 57 of file asc-mainscreen.h.


Member Enumeration Documentation

enum ASC_MainScreenWidget::Panels

Enumerator:
ButtonPanel 
WindInfo 
UnitInfo 
OverviewMap 
MapControl 
ActionInfo 

Definition at line 61 of file asc-mainscreen.h.


Constructor & Destructor Documentation

ASC_MainScreenWidget::ASC_MainScreenWidget ( PG_Application &  application  ) 

Definition at line 447 of file asc-mainscreen.cpp.

References MapDisplayPG::activateMapLayer(), MapDisplayPG::addMapLayer(), ButtonPanel, dataLoaderTicker, displayLogMessage(), CGameOptions::Instance(), MapDisplayPG::layerChanged, ASC_PG_App::mainScreenID, MainScreenWidget::mapDisplay, menu, movementRangeLayer, OverviewMap, CGameOptions::panelData, MainScreenWidget::setup(), spawnPanel(), UnitInfo, uselessCallToTextRenderAddons(), CGameOptions::visibleMapLayer, and weaponRangeLayer.

ASC_MainScreenWidget::~ASC_MainScreenWidget (  )  [inline]

Definition at line 73 of file asc-mainscreen.h.


Member Function Documentation

void ASC_MainScreenWidget::spawnPanel ( Panels  panel  ) 

Definition at line 597 of file asc-mainscreen.cpp.

References ActionInfo, actionInfoPanel, actmap, ButtonPanel, guiHost, CGameOptions::Instance(), MapControl, MainScreenWidget::mapDisplay, mapInfoPanel, OverviewMap, GuiFunctions::primaryGuiIcons, NewGuiHost::pushIconHandler(), MainScreenWidget::spawnOverviewMapPanel(), UnitInfo, unitInfoPanel, ActionInfoPanel::update(), WindInfo, and windInfoPanel.

Referenced by ASC_MainScreenWidget(), executeUserAction(), and spawnPanel().

bool ASC_MainScreenWidget::spawnPanel ( const ASCString panelName  ) 

spawns the panel with the given name. Returns true if such a panel exists, false otherwise

Definition at line 562 of file asc-mainscreen.cpp.

References ActionInfo, ButtonPanel, MapControl, OverviewMap, spawnPanel(), UnitInfo, and WindInfo.

NewGuiHost* ASC_MainScreenWidget::getGuiHost (  )  [inline]

Definition at line 67 of file asc-mainscreen.h.

References guiHost.

Referenced by CargoDialog::ProcessEvent(), and CargoDialog::userHandler().

DashboardPanel* ASC_MainScreenWidget::getUnitInfoPanel (  )  [inline]

Definition at line 68 of file asc-mainscreen.h.

References unitInfoPanel.

Referenced by CargoDialog::cargoChanged(), and CargoDialog::ProcessEvent().

void ASC_MainScreenWidget::showMovementRange ( GameMap gamemap,
const MapCoordinate pos 
)

Definition at line 644 of file asc-mainscreen.cpp.

References movementRangeLayer, and UnitMovementRangeLayer::operateField().

Referenced by executeUserAction().

void ASC_MainScreenWidget::showWeaponRange ( GameMap gamemap,
const MapCoordinate pos 
)

Definition at line 649 of file asc-mainscreen.cpp.

References UnitWeaponRangeLayer::operateField(), and weaponRangeLayer.

Referenced by execaction_pg(), and executeUserAction().

bool ASC_MainScreenWidget::eventKeyDown ( const SDL_KeyboardEvent *  key  )  [protected]

Definition at line 656 of file asc-mainscreen.cpp.

References actmap, GameMap::actplayer, Player::ai, Player::computer, executeUserAction(), Player::exist(), GameMap::getCursor(), getPGApplication(), GameMap::player, AI::showFieldInformation(), Player::stat, ASC_PG_App::toggleFullscreen(), ua_cargosummary, ua_changeresourceview, ua_continuenetworkgame, ua_continuerecentnetworkgame, ua_createReminder, ua_decrease_zoom, ua_exitgame, ua_gotoPosition, ua_help, ua_increase_zoom, ua_loadgame, ua_loadrecentgame, ua_mainmenu, ua_networksupervisor, ua_newGame, ua_redo, ua_runOpenTasks, ua_savegame, ua_showCargoLayer, ua_toggleunitshading, ua_turnUnitLeft, ua_turnUnitRight, ua_undo, ua_unitsummary, ua_unitweightinfo, ua_viewPipeNet, ua_viewterraininfo, ua_viewUnitexperienceOverlay, ua_viewUnitinfoOverlay, ua_viewunitmovementrange, ua_viewunitweaponrange, ua_visibilityInfo, ua_writescreentopcx, MapCoordinate::x, and MapCoordinate::y.

ASCString ASC_MainScreenWidget::getBackgroundImageFilename (  )  [inline, protected, virtual]

Implements MainScreenWidget.

Definition at line 86 of file asc-mainscreen.h.

void ASC_MainScreenWidget::lockStandardActions ( int  dir,
int  options 
) [protected, virtual]

Reimplemented from MainScreenWidget.

Definition at line 517 of file asc-mainscreen.cpp.

References MainScreenWidget::lockOptions, MainScreenWidget::lockOptionsChanged, lockOptionStack, and menu.


Member Data Documentation

NewGuiHost* ASC_MainScreenWidget::guiHost [protected]

Definition at line 73 of file asc-mainscreen.h.

Referenced by getGuiHost(), and spawnPanel().

Menu* ASC_MainScreenWidget::menu [protected]

Definition at line 76 of file asc-mainscreen.h.

Referenced by ASC_MainScreenWidget(), and lockStandardActions().

DashboardPanel* ASC_MainScreenWidget::unitInfoPanel [protected]

Definition at line 77 of file asc-mainscreen.h.

Referenced by getUnitInfoPanel(), and spawnPanel().

WindInfoPanel* ASC_MainScreenWidget::windInfoPanel [protected]

Definition at line 78 of file asc-mainscreen.h.

Referenced by spawnPanel().

MapInfoPanel* ASC_MainScreenWidget::mapInfoPanel [protected]

Definition at line 79 of file asc-mainscreen.h.

Referenced by spawnPanel().

ActionInfoPanel* ASC_MainScreenWidget::actionInfoPanel [protected]

Definition at line 80 of file asc-mainscreen.h.

Referenced by spawnPanel().

UnitWeaponRangeLayer* ASC_MainScreenWidget::weaponRangeLayer [protected]

Definition at line 82 of file asc-mainscreen.h.

Referenced by ASC_MainScreenWidget(), and showWeaponRange().

UnitMovementRangeLayer* ASC_MainScreenWidget::movementRangeLayer [protected]

Definition at line 83 of file asc-mainscreen.h.

Referenced by ASC_MainScreenWidget(), and showMovementRange().

list<int> ASC_MainScreenWidget::lockOptionStack [protected]

Definition at line 90 of file asc-mainscreen.h.

Referenced by lockStandardActions().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:46:17 2012 for Advanced Strategic Command by  doxygen 1.5.1