SUMO - Simulation of Urban MObility
GUIViewTraffic.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // A view on the simulation; this view is a microscopic one
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef GUIViewTraffic_h
24 #define GUIViewTraffic_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 #include <utils/geom/Boundary.h>
38 #include <utils/geom/Position.h>
39 #include <utils/common/RGBColor.h>
41 #include <utils/shapes/Polygon.h>
42 #include "GUISUMOViewParent.h"
44 
45 
46 // ===========================================================================
47 // class declarations
48 // ===========================================================================
49 class GUINet;
50 class GUISUMOViewParent;
51 class GUIVehicle;
52 class MSRoute;
53 
54 
55 // ===========================================================================
56 // class definitions
57 // ===========================================================================
63 public:
65  GUIViewTraffic(FXComposite* p, GUIMainWindow& app,
66  GUISUMOViewParent* parent, GUINet& net, FXGLVisual* glVis,
67  FXGLCanvas* share);
69  virtual ~GUIViewTraffic();
70 
72  virtual void buildViewToolBars(GUIGlChildWindow&);
73 
74 
78  void startTrack(int id);
79 
80 
83  void stopTrack();
84 
85 
89  int getTrackedID() const;
90 
91  bool setColorScheme(const std::string& name);
92 
94  void onGamingClick(Position pos);
95 
98 
99 protected:
100  int doPaintGL(int mode, const Boundary& bound);
101 
102 
103 private:
105 
106 protected:
108 
109 };
110 
111 
112 #endif
113 
114 /****************************************************************************/
115 
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
bool setColorScheme(const std::string &name)
SUMOTime getCurrentTimeStep() const
get the current simulation time
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
int getTrackedID() const
Returns the id of the tracked vehicle (-1 if none)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
void onGamingClick(Position pos)
handle mouse click in gaming mode
void startTrack(int id)
Starts vehicle tracking.
A single child window which contains a view of the simulation area.
A MSNet extended by some values for usage within the gui.
Definition: GUINet.h:90
virtual ~GUIViewTraffic()
destructor
int doPaintGL(int mode, const Boundary &bound)
int SUMOTime
Definition: SUMOTime.h:43
void stopTrack()
Stops vehicle tracking.
A MSVehicle extended by some values for usage within the gui.
Definition: GUIVehicle.h:68