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 2001-2010 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 <utils/foxtools/MFXMutex.h>
00035 #include <utils/common/SUMOTime.h>
00036 
00037 
00038 // ===========================================================================
00039 // class definitions
00040 // ===========================================================================
00044 class GUIMainWindow : public FXMainWindow {
00045 public:
00046     GUIMainWindow(FXApp* a);
00047     virtual ~GUIMainWindow();
00049     void addChild(FXMDIChild *child, bool updateOnSimStep=true);
00050     void addChild(FXMainWindow *child, bool updateOnSimStep=true);
00051 
00053     void removeChild(FXMDIChild *child);
00054     void removeChild(FXMainWindow  *child);
00055 
00056     void updateChildren();
00057 
00058     FXFont *getBoldFont();
00059 
00060     FXGLVisual *getGLVisual() const;
00061 
00062     virtual FXGLCanvas *getBuildGLCanvas() const = 0;
00063 
00064     virtual SUMOTime getCurrentSimTime() const = 0;
00065 
00066     virtual void setStatusBarText(const std::string &) { }
00067 
00068     FXLabel &getCartesianLabel();
00069     FXLabel &getGeoLabel();
00070 
00076     virtual bool loadSelection(const std::string &file, std::string &msg) throw() = 0;
00077 
00078     bool isGaming() const throw();
00079 
00080 protected:
00081     std::vector<FXMDIChild*> mySubWindows;
00082     std::vector<FXMainWindow*> myTrackerWindows;
00084     MFXMutex myTrackerLock;
00085 
00087     FXFont *myBoldFont;
00088 
00090     FXMDIClient *myMDIClient;
00091 
00093     FXStatusBar *myStatusbar;
00094 
00096     FXLabel *myCartesianCoordinate, *myGeoCoordinate;
00097     FXHorizontalFrame *myCartesianFrame, *myGeoFrame;
00098 
00099 
00101     FXGLVisual *myGLVisual;
00102 
00103     FXDockSite *myTopDock, *myBottomDock, *myLeftDock, *myRightDock;
00104 
00105     bool myRunAtBegin;
00106 
00108     bool myAmGaming;
00109 
00110 protected:
00111     GUIMainWindow() { }
00112 
00113 };
00114 
00115 
00116 #endif
00117 
00118 /****************************************************************************/
00119 

Generated on Wed May 5 00:06:30 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6