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.sourceforge.net/
12 // Copyright (C) 2001-2012 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 <utils/common/SUMOTime.h>
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
45 class GUIMainWindow : public FXMainWindow {
46 public:
47  GUIMainWindow(FXApp* a);
48  virtual ~GUIMainWindow();
50  void addChild(FXMDIChild* child, bool updateOnSimStep = true);
51  void addChild(FXMainWindow* child, bool updateOnSimStep = true);
52 
54  void removeChild(FXMDIChild* child);
55  void removeChild(FXMainWindow* child);
56 
57  std::vector<std::string> getViewIDs() const ;
58  FXMDIChild* getViewByID(const std::string& id) const ;
59 
60  void updateChildren();
61 
62  FXFont* getBoldFont();
63 
64  FXGLVisual* getGLVisual() const;
65 
66  virtual FXGLCanvas* getBuildGLCanvas() const = 0;
67 
68  virtual SUMOTime getCurrentSimTime() const = 0;
69 
70  virtual void setStatusBarText(const std::string&) { }
71 
74 
76  bool isGaming() const {
77  return myAmGaming;
78  }
79 
81  bool listInternal() const {
82  return myListInternal;
83  }
84 
85 protected:
86  std::vector<FXMDIChild*> mySubWindows;
87  std::vector<FXMainWindow*> myTrackerWindows;
90 
92  FXFont* myBoldFont;
93 
95  FXMDIClient* myMDIClient;
96 
98  FXStatusBar* myStatusbar;
99 
103 
104 
106  FXGLVisual* myGLVisual;
107 
109 
112 
115 
116 protected:
118 
119 };
120 
121 
122 #endif
123 
124 /****************************************************************************/
125