SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIParameterTracker.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // A window which displays the time line of one (or more) value(s)
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 GUIParameterTracker_h
23 #define GUIParameterTracker_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 <fx.h>
37 #include <fx3d.h>
40 #include "TrackerValueDesc.h"
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
50  FXDECLARE(GUIParameterTracker)
51 public:
53  enum {
55  MID_AGGREGATIONINTERVAL = FXMainWindow::ID_LAST,
60  };
61 
62 
67  GUIParameterTracker(GUIMainWindow& app, const std::string& name);
68 
69 
72 
73 
75  void create();
76 
77 
84  TrackerValueDesc* newTracked);
85 
86 
89 
91  long onConfigure(FXObject*, FXSelector, void*);
92 
94  long onPaint(FXObject*, FXSelector, void*);
95 
97  long onSimStep(FXObject*, FXSelector, void*);
98 
100  long onCmdChangeAggregation(FXObject*, FXSelector, void*);
101 
103  long onCmdSave(FXObject*, FXSelector, void*);
105 
106 
107 public:
115  FXDECLARE(GUIParameterTrackerPanel)
116  public:
122  GUIParameterTrackerPanel(FXComposite* c, GUIMainWindow& app,
123  GUIParameterTracker& parent);
124 
127 
129  friend class GUIParameterTracker;
130 
131 
134 
136  long onConfigure(FXObject*, FXSelector, void*);
137 
139  long onPaint(FXObject*, FXSelector, void*);
140 
142  long onSimStep(FXObject* sender, FXSelector, void*);
144 
145 
146  private:
149  void drawValues();
150 
155  void drawValue(TrackerValueDesc& desc, SUMOReal namePos);
156 
157 
158  private:
161 
164 
167 
168  protected:
171  };
172 
173 public:
176 
177 private:
179  void buildToolBar();
180 
181 
182 protected:
185 
187  std::vector<TrackerValueDesc*> myTracked;
188 
191 
193  std::vector<GLObjectValuePassConnector<SUMOReal>*> myValuePassers;
194 
196  FXToolBarShell* myToolBarDrag;
197 
200 
203 
205  FXToolBar* myToolBar;
206 
207 protected:
210 
211 };
212 
213 
214 #endif
215 
216 /****************************************************************************/
217