Advanced Strategic Command
dashboard.h
Go to the documentation of this file.
1 /***************************************************************************
2  dashboard.h - description
3  -------------------
4  begin : Sat Jan 27 2001
5  copyright : (C) 2001 by Martin Bickel
6  email : bickel@asc-hq.org
7  ***************************************************************************/
8 
14 /***************************************************************************
15  * *
16  * This program is free software; you can redistribute it and/or modify *
17  * it under the terms of the GNU General Public License as published by *
18  * the Free Software Foundation; either version 2 of the License, or *
19  * (at your option) any later version. *
20  * *
21  ***************************************************************************/
22 
23 
24 
25 #ifndef dashboardH
26  #define dashboardH
27 
28 #include "paradialog.h"
29 #include "windowing.h"
30 
31 class ContainerBase;
32 class VehicleType;
33 class Vehicle;
34 class Building;
35 class SingleWeapon;
36 class MapDisplay;
37 class GameMap;
38 class MapField;
39 
41  private:
42  void containerDeleted( ContainerBase* c );
43  protected:
46 
47  DashboardPanel ( PG_Widget *parent, const PG_Rect &r, const ASCString& panelName_, bool loadTheme );
48 
49  void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
50  void registerSpecialDisplay( const ASCString& name );
51 
52  void reset(GameMap& map);
53 
54  bool containerRenamed( PG_LineEdit* lineEdit );
55 
57 
58  public:
59  void eval();
60  void showUnitData( Vehicle* veh, Building* bld, MapField* fld, bool redraw = false );
61 
62 };
63 
64 class WindInfoPanel : public DashboardPanel {
65  Surface windArrow;
66  int dir;
67  protected:
68  void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
69  public:
70  WindInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
71 };
72 
73 class UnitInfoPanel : public DashboardPanel {
74  protected:
75  bool onClick ( PG_MessageObject* obj, const SDL_MouseButtonEvent* event );
76  void showUnitInfo( const VehicleType* vt );
77  bool unitNaming();
78  public:
79  UnitInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
80 };
81 
82 
83 class MapDisplayPG;
84 
85 class MapInfoPanel : public DashboardPanel {
86  MapDisplayPG* mapDisplay;
87  PG_Slider* zoomSlider;
88  bool changeActive;
89 
90  void layerChanged( bool state, const ASCString& label );
91  bool scrollTrack( long pos );
92  bool checkBox( bool state, const char* name );
93  void zoomChanged( int zoom );
94 
95  bool showWeaponRange();
96  bool showMovementRange();
97  protected:
98  void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
99  public:
100  MapInfoPanel (PG_Widget *parent, const PG_Rect &r, MapDisplayPG* mapDisplay ) ;
101 };
102 
103 
105  public:
106  ActionInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
107 
108  void update( GameMap* map );
109 };
110 
111 #endif
void showUnitData(Vehicle *veh, Building *bld, MapField *fld, bool redraw=false)
Definition: dashboard.cpp:378
void painter(const PG_Rect &src, const ASCString &name, const PG_Rect &dst)
void painter(const PG_Rect &src, const ASCString &name, const PG_Rect &dst)
Definition: dashboard.cpp:195
bool onClick(PG_MessageObject *obj, const SDL_MouseButtonEvent *event)
Definition: dashboard.cpp:596
void painter(const PG_Rect &src, const ASCString &name, const PG_Rect &dst)
a single field of the map
Definition: mapfield.h:26
ActionInfoPanel(PG_Widget *parent, const PG_Rect &r)
Definition: dashboard.cpp:958
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
DashboardPanel(PG_Widget *parent, const PG_Rect &r, const ASCString &panelName_, bool loadTheme)
Definition: dashboard.cpp:109
The class describing properties that are common to all vehicles of a certain kind.
Definition: vehicletype.h:177
void registerSpecialDisplay(const ASCString &name)
Definition: dashboard.cpp:187
bool containerRenamed(PG_LineEdit *lineEdit)
Definition: dashboard.cpp:157
Dialog classes based on the Paragui library.
UnitInfoPanel(PG_Widget *parent, const PG_Rect &r)
Definition: dashboard.cpp:557
void showUnitInfo(const VehicleType *vt)
Definition: dashboard.cpp:573
A single weapon of a #Vehicletype.
Definition: vehicletype.h:100
void reset(GameMap &map)
Definition: dashboard.cpp:176
bool viewExperienceOverview()
Definition: dashboard.cpp:134
bool unitNaming()
Definition: dashboard.cpp:578
MapInfoPanel(PG_Widget *parent, const PG_Rect &r, MapDisplayPG *mapDisplay)
Definition: dashboard.cpp:872
WindInfoPanel(PG_Widget *parent, const PG_Rect &r)
Definition: dashboard.cpp:550
Building * bld
Definition: dashboard.h:45
The parent class of Vehicle and Building; The name Container originates from Battle Isle...
Definition: containerbase.h:40
Vehicle * veh
Definition: dashboard.h:44
An actual building on the map, which references a BuildingType Buildings have an owner,.
Definition: buildings.h:38
this Panel saves its position in the gameoptions and loads it on construction
Definition: windowing.h:121
void update(GameMap *map)
Definition: dashboard.cpp:963
The map. THE central structure of ASC, which holds everything not globally available together...
Definition: gamemap.h:182