SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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