Advanced Strategic Command
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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]

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 More...
 
NewGuiHostgetGuiHost ()
 
DashboardPanelgetUnitInfoPanel ()
 
void showMovementRange (GameMap *gamemap, const MapCoordinate &pos)
 
void showWeaponRange (GameMap *gamemap, const MapCoordinate &pos)
 
 ~ASC_MainScreenWidget ()
 
- Public Member Functions inherited from MainScreenWidget
 MainScreenWidget (PG_Application &application)
 
void displayMessage (const ASCString &message)
 
void activateMapLayer (const ASCString &name, bool active)
 
void toggleMapLayer (const ASCString &name)
 
MapDisplayPGgetMapDisplay ()
 
OverviewMapPanelgetOverviewMapPanel ()
 

Protected Member Functions

bool eventKeyDown (const SDL_KeyboardEvent *key)
 
ASCString getBackgroundImageFilename ()
 
void lockStandardActions (int dir, int options)
 
- Protected Member Functions inherited from MainScreenWidget
void spawnOverviewMapPanel (const ASCString &panelName="OverviewMap")
 
void setup (bool messageLine, const PG_Rect &mapView)
 
bool idleHandler ()
 
void mouseScrollChecker ()
 
void eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
 
 ~MainScreenWidget ()
 

Protected Attributes

NewGuiHostguiHost
 
Menumenu
 
DashboardPanelunitInfoPanel
 
WindInfoPanelwindInfoPanel
 
MapInfoPanelmapInfoPanel
 
ActionInfoPanelactionInfoPanel
 
UnitWeaponRangeLayerweaponRangeLayer
 
UnitMovementRangeLayermovementRangeLayer
 
list< int > lockOptionStack
 
- Protected Attributes inherited from MainScreenWidget
int lockOptions
 
MapDisplayPGmapDisplay
 
PG_Label * messageLine
 

Additional Inherited Members

- Public Attributes inherited from MainScreenWidget
sigc::signal< void, int > lockOptionsChanged
 

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

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)
ASC_MainScreenWidget::~ASC_MainScreenWidget ( )
inline

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

Member Function Documentation

bool ASC_MainScreenWidget::eventKeyDown ( const SDL_KeyboardEvent *  key)
protected
ASCString ASC_MainScreenWidget::getBackgroundImageFilename ( )
inlineprotectedvirtual

Implements MainScreenWidget.

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

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::lockStandardActions ( int  dir,
int  options 
)
protectedvirtual
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().

void ASC_MainScreenWidget::spawnPanel ( Panels  panel)
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.

Member Data Documentation

ActionInfoPanel* ASC_MainScreenWidget::actionInfoPanel
protected

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

Referenced by spawnPanel().

NewGuiHost* ASC_MainScreenWidget::guiHost
protected

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

Referenced by getGuiHost(), and spawnPanel().

list<int> ASC_MainScreenWidget::lockOptionStack
protected

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

Referenced by lockStandardActions().

MapInfoPanel* ASC_MainScreenWidget::mapInfoPanel
protected

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

Referenced by spawnPanel().

Menu* ASC_MainScreenWidget::menu
protected

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

Referenced by ASC_MainScreenWidget(), and lockStandardActions().

UnitMovementRangeLayer* ASC_MainScreenWidget::movementRangeLayer
protected

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

Referenced by ASC_MainScreenWidget(), and showMovementRange().

DashboardPanel* ASC_MainScreenWidget::unitInfoPanel
protected

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

Referenced by getUnitInfoPanel(), and spawnPanel().

UnitWeaponRangeLayer* ASC_MainScreenWidget::weaponRangeLayer
protected

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

Referenced by ASC_MainScreenWidget(), and showWeaponRange().

WindInfoPanel* ASC_MainScreenWidget::windInfoPanel
protected

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

Referenced by spawnPanel().


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