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

dashboard.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           dashboard.h  -  description
00003                              -------------------
00004     begin                : Sat Jan 27 2001
00005     copyright            : (C) 2001 by Martin Bickel
00006     email                : bickel@asc-hq.org
00007  ***************************************************************************/
00008 
00014 /***************************************************************************
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 
00025 #ifndef dashboardH
00026  #define dashboardH
00027 
00028 #include "paradialog.h"
00029 #include "windowing.h"
00030 
00031 class ContainerBase;
00032 class Vehicletype;
00033 class Vehicle;
00034 class Building;
00035 class SingleWeapon;
00036 class MapDisplay;
00037 class GameMap;
00038 class tfield;
00039 
00040 class DashboardPanel : public LayoutablePanel {
00041    private:
00042       void containerDeleted( ContainerBase* c );
00043    protected:
00044        Vehicle* veh;
00045        Building* bld;
00046        
00047       DashboardPanel ( PG_Widget *parent, const PG_Rect &r, const ASCString& panelName_, bool loadTheme );
00048 
00049       void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00050       void registerSpecialDisplay( const ASCString& name );
00051 
00052       void reset(GameMap& map);
00053 
00054       bool containerRenamed( PG_LineEdit* lineEdit );
00055 
00056       bool viewExperienceOverview();
00057 
00058    public:
00059       void eval();
00060       void showUnitData( Vehicle* veh, Building* bld, tfield* fld, bool redraw = false );
00061 
00062 };
00063 
00064 class WindInfoPanel : public DashboardPanel {
00065         Surface windArrow;
00066         int dir;
00067      protected:
00068         void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00069      public:
00070         WindInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
00071 };
00072 
00073 class UnitInfoPanel : public DashboardPanel {
00074      protected:
00075         bool onClick ( PG_MessageObject* obj, const SDL_MouseButtonEvent* event );
00076         void showUnitInfo( const Vehicletype* vt );
00077      public:
00078         UnitInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
00079 };
00080 
00081 
00082 class MapDisplayPG;
00083 
00084 class MapInfoPanel : public DashboardPanel {
00085         MapDisplayPG* mapDisplay;
00086         PG_Slider* zoomSlider;
00087         bool changeActive;
00088         
00089         void layerChanged( bool state, const ASCString& label );        
00090         bool scrollTrack( long pos );
00091         bool checkBox( bool state, const char* name );
00092         void zoomChanged( int zoom );
00093 
00094         bool showWeaponRange();
00095         bool showMovementRange();
00096    protected:
00097         void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00098      public:
00099         MapInfoPanel (PG_Widget *parent, const PG_Rect &r, MapDisplayPG* mapDisplay ) ;
00100 };
00101 
00102 
00103 #endif

Generated on Tue Jun 24 01:27:38 2008 for Advanced Strategic Command by  doxygen 1.4.2