SUMO - Simulation of Urban MObility

GUIMainWindow.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 //
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef GUIMainWindow_h
00020 #define GUIMainWindow_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <fx.h>
00033 #include <vector>
00034 #include <string>
00035 #include <utils/common/SUMOTime.h>
00036 #include <utils/foxtools/MFXMutex.h>
00037 
00038 
00039 // ===========================================================================
00040 // class definitions
00041 // ===========================================================================
00042 class GUIMainWindow : public FXMainWindow {
00043 public:
00044     GUIMainWindow(FXApp* a);
00045     virtual ~GUIMainWindow();
00047     void addChild(FXMDIChild* child, bool updateOnSimStep=true);
00048     void addChild(FXMainWindow* child, bool updateOnSimStep=true);
00049 
00051     void removeChild(FXMDIChild* child);
00052     void removeChild(FXMainWindow*  child);
00053 
00054     std::vector<std::string> getViewIDs() const throw();
00055     FXMDIChild* getViewByID(const std::string& id) const throw();
00056 
00057     void updateChildren();
00058 
00059     FXFont* getBoldFont();
00060 
00061     FXGLVisual* getGLVisual() const;
00062 
00063     virtual FXGLCanvas* getBuildGLCanvas() const = 0;
00064 
00065     virtual SUMOTime getCurrentSimTime() const = 0;
00066 
00067     virtual void setStatusBarText(const std::string&) { }
00068 
00069     FXLabel& getCartesianLabel();
00070     FXLabel& getGeoLabel();
00071 
00073     bool isGaming() const {
00074         return myAmGaming;
00075     }
00076 
00078     bool listInternal() const {
00079         return myListInternal;
00080     }
00081 
00082 protected:
00083     std::vector<FXMDIChild*> mySubWindows;
00084     std::vector<FXMainWindow*> myTrackerWindows;
00086     MFXMutex myTrackerLock;
00087 
00089     FXFont* myBoldFont;
00090 
00092     FXMDIClient* myMDIClient;
00093 
00095     FXStatusBar* myStatusbar;
00096 
00098     FXLabel* myCartesianCoordinate, *myGeoCoordinate;
00099     FXHorizontalFrame* myCartesianFrame, *myGeoFrame;
00100 
00101 
00103     FXGLVisual* myGLVisual;
00104 
00105     FXDockSite* myTopDock, *myBottomDock, *myLeftDock, *myRightDock;
00106 
00107     bool myRunAtBegin;
00108 
00110     bool myAmGaming;
00111 
00113     bool myListInternal;
00114 
00115 protected:
00116     GUIMainWindow() { }
00117 
00118 };
00119 
00120 
00121 #endif
00122 
00123 /****************************************************************************/
00124 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines