Advanced Strategic Command
asc-mainscreen.h
Go to the documentation of this file.
1 
5 /*
6  This file is part of Advanced Strategic Command; http://www.asc-hq.de
7  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; see the file COPYING. If not, write to the
21  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
22  Boston, MA 02111-1307 USA
23 */
24 
25 
26 #ifndef ascmainscreenH
27  #define ascmainscreenH
28 
29 #include "paradialog.h"
30 #include "util/messaginghub.h"
31 #include "mainscreenwidget.h"
32 
33 class Menu;
34 class NewGuiHost;
35 class MapDisplayPG;
36 class DashboardPanel;
39 class GameMap;
40 class MapCoordinate;
41 class WindInfoPanel;
42 class MapInfoPanel;
43 class ActionInfoPanel;
44 
45 
58  int standardActionsLocked;
59  public:
60  ASC_MainScreenWidget( PG_Application& application );
62  void spawnPanel ( Panels panel );
63 
65  bool spawnPanel ( const ASCString& panelName );
66 
67  NewGuiHost* getGuiHost() { return guiHost; };
69 
70  void showMovementRange( GameMap* gamemap, const MapCoordinate& pos );
71  void showWeaponRange( GameMap* gamemap, const MapCoordinate& pos );
72 
74  protected:
81 
84 
85  bool eventKeyDown(const SDL_KeyboardEvent* key);
86  ASCString getBackgroundImageFilename() { return "gamebackground.png"; };
87 
88  void lockStandardActions( int dir, int options);
89 
90  list<int> lockOptionStack;
91  private:
92  void mapLayerChanged(bool b, const ASCString& name );
93 
94 };
95 
97 extern void displaymessage2( const char* formatstring, ... );
98 
100 
101 #endif
102 
ASC_MainScreenWidget(PG_Application &application)
NewGuiHost * guiHost
void lockStandardActions(int dir, int options)
void showMovementRange(GameMap *gamemap, const MapCoordinate &pos)
DashboardPanel * getUnitInfoPanel()
list< int > lockOptionStack
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
UnitWeaponRangeLayer * weaponRangeLayer
Coordinate on the twodimensional map.
Definition: typen.h:202
Dialog classes based on the Paragui library.
void displaymessage2(const char *formatstring,...)
displays a message in the status line of ASC
DashboardPanel * unitInfoPanel
MapInfoPanel * mapInfoPanel
The widget that controls the main screen of ASC.
ASCString getBackgroundImageFilename()
UnitMovementRangeLayer * movementRangeLayer
ActionInfoPanel * actionInfoPanel
WindInfoPanel * windInfoPanel
NewGuiHost * getGuiHost()
void showWeaponRange(GameMap *gamemap, const MapCoordinate &pos)
ASC_MainScreenWidget * mainScreenWidget
void spawnPanel(Panels panel)
bool eventKeyDown(const SDL_KeyboardEvent *key)
The map. THE central structure of ASC, which holds everything not globally available together...
Definition: gamemap.h:182