SUMO - Simulation of Urban MObility
GUIMainWindow.h
Go to the documentation of this file.
1 /****************************************************************************/
9 //
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO 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 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef GUIMainWindow_h
23 #define GUIMainWindow_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <fx.h>
36 #include <vector>
37 #include <string>
38 #include <map>
39 #include <utils/common/SUMOTime.h>
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
46 class GUIMainWindow : public FXMainWindow {
47 public:
48  GUIMainWindow(FXApp* a);
49  virtual ~GUIMainWindow();
51  void addChild(FXMDIChild* child, bool updateOnSimStep = true);
52  void addChild(FXMainWindow* child, bool updateOnSimStep = true);
53 
55  void removeChild(FXMDIChild* child);
56  void removeChild(FXMainWindow* child);
57 
58  std::vector<std::string> getViewIDs() const;
59  FXMDIChild* getViewByID(const std::string& id) const;
60 
61  void updateChildren();
62 
63  FXFont* getBoldFont();
64 
65  FXGLVisual* getGLVisual() const;
66 
67  virtual FXGLCanvas* getBuildGLCanvas() const = 0;
68 
69  virtual SUMOTime getCurrentSimTime() const = 0;
70 
71  virtual void setStatusBarText(const std::string&) { }
72 
75 
77  bool isGaming() const {
78  return myAmGaming;
79  }
80 
82  bool listInternal() const {
83  return myListInternal;
84  }
85 
86  static GUIMainWindow* getInstance();
87 
88 protected:
89  std::vector<FXMDIChild*> mySubWindows;
90  std::vector<FXMainWindow*> myTrackerWindows;
93 
95  FXFont* myBoldFont;
96 
98  FXMDIClient* myMDIClient;
99 
101  FXStatusBar* myStatusbar;
102 
106 
107 
109  FXGLVisual* myGLVisual;
110 
112 
115 
118 
121 
122 protected:
124 
125 };
126 
127 
128 #endif
129 
130 /****************************************************************************/
131 
std::vector< FXMainWindow * > myTrackerWindows
Definition: GUIMainWindow.h:90
FXLabel * myGeoCoordinate
virtual SUMOTime getCurrentSimTime() const =0
FXFont * myBoldFont
Font used for popup-menu titles.
Definition: GUIMainWindow.h:95
FXDockSite * myRightDock
FXGLVisual * myGLVisual
The gl-visual used.
bool isGaming() const
return whether the gui is in gaming mode
Definition: GUIMainWindow.h:77
FXHorizontalFrame * myCartesianFrame
FXMDIChild * getViewByID(const std::string &id) const
FXLabel & getCartesianLabel()
bool myAmGaming
information whether the gui is currently in gaming mode
std::vector< FXMDIChild * > mySubWindows
Definition: GUIMainWindow.h:89
void addChild(FXMDIChild *child, bool updateOnSimStep=true)
Adds a further child window to the list.
virtual void setStatusBarText(const std::string &)
Definition: GUIMainWindow.h:71
static GUIMainWindow * getInstance()
FXDockSite * myLeftDock
virtual FXGLCanvas * getBuildGLCanvas() const =0
static GUIMainWindow * myInstance
the singleton window instance
FXFont * getBoldFont()
FXGLVisual * getGLVisual() const
bool listInternal() const
return whether to list internal structures
Definition: GUIMainWindow.h:82
FXLabel & getGeoLabel()
void removeChild(FXMDIChild *child)
removes the given child window from the list
bool myListInternal
information whether the locator should list internal structures
FXStatusBar * myStatusbar
The status bar.
FXDockSite * myBottomDock
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
MFXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
Definition: GUIMainWindow.h:92
FXHorizontalFrame * myGeoFrame
FXDockSite * myTopDock
virtual ~GUIMainWindow()
FXMDIClient * myMDIClient
The multi view panel.
Definition: GUIMainWindow.h:98
std::vector< std::string > getViewIDs() const