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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
18 // A single child window which contains a view of the simulation area
19 /****************************************************************************/
20 #ifndef GUISUMOViewParent_h
21 #define GUISUMOViewParent_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <string>
30 #include <vector>
31 #include <fx.h>
32 #include <utils/geom/Position.h>
33 #include <utils/geom/Boundary.h>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class GUINet;
44 
45 
46 // ===========================================================================
47 // class declarations
48 // ===========================================================================
60  // FOX-declarations
61  FXDECLARE(GUISUMOViewParent)
62 
63 public:
65  enum ViewType {
70  };
71 
72 
85  GUISUMOViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
86  const FXString& name, GUIMainWindow* parentWindow,
87  FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
88 
89 
96  virtual GUISUMOAbstractView* init(FXGLCanvas* share, GUINet& net, ViewType type);
97 
98 
101 
102 
104  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
105 
107  long onSimStep(FXObject* sender, FXSelector, void*);
108 
110  long onCmdLocate(FXObject*, FXSelector, void*);
111 
113  long onKeyPress(FXObject* o, FXSelector sel, void* data);
114  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
115 
117  bool isSelected(GUIGlObject* o) const;
118 
120  void setToolBarVisibility(const bool value);
121 
122 protected:
125 
126 };
127 
128 
129 #endif
130 
131 /****************************************************************************/
132 
~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:82
GUISUMOViewParent()
FOX needs this.
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents