asc-mainscreen.h

Go to the documentation of this file.
00001 
00005 /*
00006     This file is part of Advanced Strategic Command; http://www.asc-hq.de
00007     Copyright (C) 1994-2010  Martin Bickel  and  Marc Schellenberger
00008 
00009     This program is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     This program is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with this program; see the file COPYING. If not, write to the
00021     Free Software Foundation, Inc., 59 Temple Place, Suite 330,
00022     Boston, MA  02111-1307  USA
00023 */
00024 
00025 
00026 #ifndef ascmainscreenH
00027  #define ascmainscreenH 
00028 
00029 #include "paradialog.h"
00030 #include "util/messaginghub.h"
00031 #include "mainscreenwidget.h"
00032 
00033 class Menu;
00034 class NewGuiHost;
00035 class MapDisplayPG;
00036 class DashboardPanel;
00037 class UnitWeaponRangeLayer;
00038 class UnitMovementRangeLayer;
00039 class GameMap;
00040 class MapCoordinate;
00041 class WindInfoPanel;
00042 class MapInfoPanel;
00043 class ActionInfoPanel;
00044 
00045 
00057 class ASC_MainScreenWidget : public MainScreenWidget {
00058       int standardActionsLocked;
00059    public:
00060       ASC_MainScreenWidget( PG_Application& application );
00061       enum Panels { ButtonPanel, WindInfo, UnitInfo, OverviewMap, MapControl, ActionInfo };
00062       void spawnPanel ( Panels panel );
00063       
00065       bool spawnPanel ( const ASCString& panelName );
00066    
00067       NewGuiHost* getGuiHost() { return guiHost; };
00068       DashboardPanel* getUnitInfoPanel() { return unitInfoPanel; };
00069       
00070       void showMovementRange( GameMap* gamemap, const MapCoordinate& pos );
00071       void showWeaponRange( GameMap* gamemap, const MapCoordinate& pos );
00072       
00073       ~ASC_MainScreenWidget() { };
00074    protected:
00075       NewGuiHost* guiHost;
00076       Menu* menu;
00077       DashboardPanel* unitInfoPanel;
00078       WindInfoPanel* windInfoPanel;
00079       MapInfoPanel* mapInfoPanel;
00080       ActionInfoPanel* actionInfoPanel;
00081       
00082       UnitWeaponRangeLayer* weaponRangeLayer;
00083       UnitMovementRangeLayer* movementRangeLayer;
00084                
00085       bool eventKeyDown(const SDL_KeyboardEvent* key);
00086       ASCString getBackgroundImageFilename() { return "gamebackground.png"; };
00087 
00088       void lockStandardActions( int dir, int options);
00089       
00090       list<int> lockOptionStack;
00091    private:
00092       void mapLayerChanged(bool b, const ASCString& name );
00093       
00094 };
00095 
00097 extern void displaymessage2( const char* formatstring, ... );
00098 
00099 extern ASC_MainScreenWidget*  mainScreenWidget ;
00100 
00101 #endif
00102 

Generated on Mon May 21 01:26:28 2012 for Advanced Strategic Command by  doxygen 1.5.1