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

ASC_MainScreenWidget Class Reference

#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
}

Public Member Functions

 ASC_MainScreenWidget (PG_Application &application)
void spawnPanel (Panels panel)
void spawnPanel (const ASCString &panelName)
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)
 Overridable Eventhandler for a SDL_KeyboardEvent message.
ASCString getBackgroundImageFilename ()
void lockStandardActions (int dir, int options)

Protected Attributes

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

Member Enumeration Documentation

enum ASC_MainScreenWidget::Panels
 

Enumeration values:
ButtonPanel 
WindInfo 
UnitInfo 
OverviewMap 
MapControl 

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


Constructor & Destructor Documentation

ASC_MainScreenWidget::ASC_MainScreenWidget PG_Application application  ) 
 

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

References MapDisplayPG::activateMapLayer(), MapDisplayPG::addMapLayer(), ButtonPanel, dataLoaderTicker, displayLogMessage(), PG_Rect::Height(), CGameOptions::Instance(), MapDisplayPG::layerChanged, ASC_PG_App::mainScreenID, MainScreenWidget::mapDisplay, menu, movementRangeLayer, PG_Rect::my_width, OverviewMap, PG_Rect::PG_Rect(), PG_Widget::SetID(), MainScreenWidget::setup(), spawnPanel(), UnitInfo, uselessCallToTextRenderAddons(), weaponRangeLayer, and PG_Rect::Width().

ASC_MainScreenWidget::~ASC_MainScreenWidget  )  [inline]
 

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


Member Function Documentation

bool ASC_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 703 of file asc-mainscreen.cpp.

References actmap, GameMap::actplayer, Player::ai, Player::computer, execUserAction_ev(), Player::exist(), Vehicle::fillMagically(), GameMap::getCurrentPlayer(), GameMap::getCursor(), GameMap::getField(), getPGApplication(), PG_Application::GetScreen(), PG_Rect::PG_Rect(), GameMap::player, PG_ScrollBar::SetPageSize(), PG_ScrollBar::SetRange(), PG_Widget::Show(), AI::showFieldInformation(), Player::stat, Player::supervisor, ua_cargosummary, ua_changeresourceview, ua_continuenetworkgame, ua_continuerecentnetworkgame, ua_createReminder, ua_decrease_zoom, ua_exitgame, ua_exportUnitToFile, ua_gotoPosition, ua_help, ua_increase_zoom, ua_loadgame, ua_loadrecentgame, ua_mainmenu, ua_networksupervisor, ua_newGame, ua_savegame, ua_showCargoLayer, ua_toggleunitshading, ua_unitsummary, ua_unitweightinfo, ua_viewPipeNet, ua_viewterraininfo, ua_viewunitmovementrange, ua_viewunitweaponrange, ua_visibilityInfo, ua_writescreentopcx, Player::unreadmessage, tfield::vehicle, and PG_ScrollBar::VERTICAL.

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

Implements MainScreenWidget.

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

NewGuiHost* ASC_MainScreenWidget::getGuiHost  )  [inline]
 

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

References guiHost.

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

DashboardPanel* ASC_MainScreenWidget::getUnitInfoPanel  )  [inline]
 

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

References unitInfoPanel.

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

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

Reimplemented from MainScreenWidget.

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

References PG_Widget::Hide(), MainScreenWidget::lockOptions, MainScreenWidget::lockOptionsChanged, lockOptionStack, menu, and PG_Widget::Show().

void ASC_MainScreenWidget::showMovementRange GameMap gamemap,
const MapCoordinate pos
 

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

References movementRangeLayer, and UnitMovementRangeLayer::operateField().

Referenced by execuseraction().

void ASC_MainScreenWidget::showWeaponRange GameMap gamemap,
const MapCoordinate pos
 

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

References UnitWeaponRangeLayer::operateField(), and weaponRangeLayer.

Referenced by execuseraction().

void ASC_MainScreenWidget::spawnPanel const ASCString panelName  ) 
 

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

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

void ASC_MainScreenWidget::spawnPanel Panels  panel  ) 
 

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

References ButtonPanel, guiHost, PG_Rect::Height(), CGameOptions::Instance(), MapControl, MainScreenWidget::mapDisplay, mapInfoPanel, OverviewMap, PG_Rect::PG_Rect(), GuiFunctions::primaryGuiIcons, NewGuiHost::pushIconHandler(), PG_Widget::Show(), MainScreenWidget::spawnOverviewMapPanel(), UnitInfo, unitInfoPanel, PG_Rect::Width(), WindInfo, and windInfoPanel.

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


Member Data Documentation

NewGuiHost* ASC_MainScreenWidget::guiHost [protected]
 

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

Referenced by getGuiHost(), and spawnPanel().

list<int> ASC_MainScreenWidget::lockOptionStack [protected]
 

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

Referenced by lockStandardActions().

MapInfoPanel* ASC_MainScreenWidget::mapInfoPanel [protected]
 

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

Referenced by spawnPanel().

Menu* ASC_MainScreenWidget::menu [protected]
 

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

Referenced by ASC_MainScreenWidget(), and lockStandardActions().

UnitMovementRangeLayer* ASC_MainScreenWidget::movementRangeLayer [protected]
 

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

Referenced by ASC_MainScreenWidget(), and showMovementRange().

DashboardPanel* ASC_MainScreenWidget::unitInfoPanel [protected]
 

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

Referenced by getUnitInfoPanel(), and spawnPanel().

UnitWeaponRangeLayer* ASC_MainScreenWidget::weaponRangeLayer [protected]
 

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

Referenced by ASC_MainScreenWidget(), and showWeaponRange().

WindInfoPanel* ASC_MainScreenWidget::windInfoPanel [protected]
 

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

Referenced by spawnPanel().


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