SUMO - Simulation of Urban MObility
GUISUMOViewParent.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
20 // A single child window which contains a view of the simulation area
21 /****************************************************************************/
22 #ifndef GUISUMOViewParent_h
23 #define GUISUMOViewParent_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 <string>
36 #include <vector>
37 #include <fx.h>
38 #include <utils/geom/Position.h>
39 #include <utils/geom/Boundary.h>
42 
43 
44 // ===========================================================================
45 // class declarations
46 // ===========================================================================
47 class GUINet;
50 
51 
52 // ===========================================================================
53 // class declarations
54 // ===========================================================================
66  // FOX-declarations
67  FXDECLARE(GUISUMOViewParent)
68 
69 public:
71  enum ViewType {
76  };
77 
78 
91  GUISUMOViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
92  const FXString& name, GUIMainWindow* parentWindow,
93  FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
94 
95 
102  virtual GUISUMOAbstractView* init(FXGLCanvas* share, GUINet& net, ViewType type);
103 
104 
107 
108 
110  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
111 
113  long onSimStep(FXObject* sender, FXSelector, void*);
114 
116  long onCmdLocate(FXObject*, FXSelector, void*);
117 
119  long onKeyPress(FXObject* o, FXSelector sel, void* data);
120  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
121 
123  bool isSelected(GUIGlObject* o) const;
124 
126  void setToolBarVisibility(const bool value);
127 
128 protected:
131 
132 };
133 
134 
135 #endif
136 
137 /****************************************************************************/
138 
~GUISUMOViewParent()
Destructor.
void setToolBarVisibility(const bool value)
about toggled gaming status
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onSimStep(FXObject *sender, FXSelector, void *)
Called on a simulation step.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
ViewType
Available view types.
A single child window which contains a view of the simulation area.
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Called if the user wants to make a snapshot (screenshot)
A MSNet extended by some values for usage within the gui.
Definition: GUINet.h:88
GUISUMOViewParent()
FOX needs this.
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents