SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUITLLogicPhasesTrackerWindow.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // A window displaying the phase diagram of a tl-logic
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 GUITLLogicPhasesTrackerWindow_h
23 #define GUITLLogicPhasesTrackerWindow_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 <vector>
36 #include <string>
37 #include <bitset>
38 #include <utility>
39 #include <fx.h>
40 #include <fx3d.h>
46 #include <utils/common/SUMOTime.h>
48 
49 
50 // ===========================================================================
51 // class declarations
52 // ===========================================================================
53 class GUIMainWindow;
56 class MFXMutex;
57 
58 
59 // ===========================================================================
60 // class definitions
61 // ===========================================================================
67  : public FXMainWindow,
68  public ValueRetriever<std::pair<SUMOTime, MSPhaseDefinition> > {
70 public:
79  ValueSource<std::pair<SUMOTime, MSPhaseDefinition> >* src);
80 
81 
89  GUIMainWindow& app,
91  const MSSimpleTrafficLightLogic::Phases& phases);
92 
93 
96 
97 
99  void create();
100 
101 
105  void addValue(std::pair<SUMOTime, MSPhaseDefinition> def);
106 
107 
111  void setBeginTime(SUMOTime time);
112 
113 
116 
118  long onConfigure(FXObject* sender, FXSelector sel, void* data);
119 
121  long onPaint(FXObject* sender, FXSelector sel, void* data);
122 
124  long onSimStep(FXObject* sender, FXSelector sel, void* data);
126 
127 
128 public:
130  typedef std::vector<MSPhaseDefinition> PhasesVector;
131 
133  typedef std::vector<SUMOTime> DurationsVector;
134 
135 
144  public:
150  GUITLLogicPhasesTrackerPanel(FXComposite* c,
152 
155 
158 
159 
162 
164  long onConfigure(FXObject*, FXSelector, void*);
165 
167  long onPaint(FXObject*, FXSelector, void*);
169 
170 
171  private:
174 
177 
178  protected:
181 
182  };
183 
184 
188  void drawValues(GUITLLogicPhasesTrackerPanel& caller);
189 
190 
191 private:
194 
197 
200 
203 
206 
209 
213  std::vector<std::string> myLinkNames;
214 
217 
220 
223 
226 
229 
232 
235 
237  FXToolBarShell* myToolBarDrag;
238 
240  FXToolBar* myToolBar;
241 
243  FXRealSpinDial* myBeginOffset;
244 
245 
246 protected:
249 
250 
251 };
252 
253 
254 #endif
255 
256 /****************************************************************************/
257