SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO 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 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef GUIMainWindow_h 00023 #define GUIMainWindow_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <fx.h> 00036 #include <vector> 00037 #include <string> 00038 #include <utils/common/SUMOTime.h> 00039 #include <utils/foxtools/MFXMutex.h> 00040 00041 00042 // =========================================================================== 00043 // class definitions 00044 // =========================================================================== 00045 class GUIMainWindow : public FXMainWindow { 00046 public: 00047 GUIMainWindow(FXApp* a); 00048 virtual ~GUIMainWindow(); 00050 void addChild(FXMDIChild* child, bool updateOnSimStep = true); 00051 void addChild(FXMainWindow* child, bool updateOnSimStep = true); 00052 00054 void removeChild(FXMDIChild* child); 00055 void removeChild(FXMainWindow* child); 00056 00057 std::vector<std::string> getViewIDs() const ; 00058 FXMDIChild* getViewByID(const std::string& id) const ; 00059 00060 void updateChildren(); 00061 00062 FXFont* getBoldFont(); 00063 00064 FXGLVisual* getGLVisual() const; 00065 00066 virtual FXGLCanvas* getBuildGLCanvas() const = 0; 00067 00068 virtual SUMOTime getCurrentSimTime() const = 0; 00069 00070 virtual void setStatusBarText(const std::string&) { } 00071 00072 FXLabel& getCartesianLabel(); 00073 FXLabel& getGeoLabel(); 00074 00076 bool isGaming() const { 00077 return myAmGaming; 00078 } 00079 00081 bool listInternal() const { 00082 return myListInternal; 00083 } 00084 00085 protected: 00086 std::vector<FXMDIChild*> mySubWindows; 00087 std::vector<FXMainWindow*> myTrackerWindows; 00089 MFXMutex myTrackerLock; 00090 00092 FXFont* myBoldFont; 00093 00095 FXMDIClient* myMDIClient; 00096 00098 FXStatusBar* myStatusbar; 00099 00101 FXLabel* myCartesianCoordinate, *myGeoCoordinate; 00102 FXHorizontalFrame* myCartesianFrame, *myGeoFrame; 00103 00104 00106 FXGLVisual* myGLVisual; 00107 00108 FXDockSite* myTopDock, *myBottomDock, *myLeftDock, *myRightDock; 00109 00111 bool myAmGaming; 00112 00114 bool myListInternal; 00115 00116 protected: 00117 GUIMainWindow() { } 00118 00119 }; 00120 00121 00122 #endif 00123 00124 /****************************************************************************/ 00125