Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUISUMOViewParent.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2023 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
21// A single child window which contains a view of the simulation area
22/****************************************************************************/
23#pragma once
24#include <config.h>
25
30
31// ===========================================================================
32// class declarations
33// ===========================================================================
34class GUINet;
38
39
40// ===========================================================================
41// class declarations
42// ===========================================================================
54 // FOX-declarations
55 FXDECLARE(GUISUMOViewParent)
56
57public:
65
78 GUISUMOViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
79 const FXString& name, GUIMainWindow* parentWindow,
80 FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
81
82
89 virtual GUISUMOAbstractView* init(FXGLCanvas* share, GUINet& net, ViewType type);
90
93
95 long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
96
98 long onSimStep(FXObject* sender, FXSelector, void*);
99
101 long onCmdLocate(FXObject*, FXSelector, void*);
102
104 long onCmdSpeedFactor(FXObject*, FXSelector, void*);
105 long onUpdSpeedFactor(FXObject*, FXSelector, void*);
106
108 long onKeyPress(FXObject* o, FXSelector sel, void* data);
109 long onKeyRelease(FXObject* o, FXSelector sel, void* data);
110
112 bool isSelected(GUIGlObject* o) const;
113
115 void setToolBarVisibility(const bool value);
116
118 std::vector<GUIGlID> getObjectIDs(int messageId) const;
119
121 void eraseGLObjChooser(GUIDialog_GLObjChooser* GLObjChooser);
122
123protected:
125 FOX_CONSTRUCTOR(GUISUMOViewParent)
126
127
129
131 FXToolBarShell* myToolBarDragSpeed = nullptr;
132
134 FXToolBar* myToolBarSpeed = nullptr;
135
137 FXSlider* mySpeedFactorSlider = nullptr;
138
139private:
141 std::map<int, GUIDialog_ChooserAbstract*> myGLObjChooser;
142};
A MSNet extended by some values for usage within the gui.
Definition GUINet.h:82
A single child window which contains a view of the simulation area.
std::map< int, GUIDialog_ChooserAbstract * > myGLObjChooser
map for existing dialogs
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected)
ViewType
Available view types.
@ VIEW_3D_OSG
plain 3D OSG view (
@ VIEW_2D_OPENGL
plain 2D openGL view (
long onCmdSpeedFactor(FXObject *, FXSelector, void *)
speedFactor-callback
void eraseGLObjChooser(GUIDialog_GLObjChooser *GLObjChooser)
erase GLObjChooser
FXToolBar * myToolBarSpeed
toolbar for speed
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents
FXToolBarShell * myToolBarDragSpeed
toolbar shell for speed
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
void buildSpeedControlToolbar()
fox need this
long onUpdSpeedFactor(FXObject *, FXSelector, void *)
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Called if the user wants to make a snapshot (screenshot)
long onSimStep(FXObject *sender, FXSelector, void *)
Called on a simulation step.
FXSlider * mySpeedFactorSlider
slider for speedfactor
void setToolBarVisibility(const bool value)
about toggled gaming status
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
~GUISUMOViewParent()
Destructor.
std::vector< GUIGlID > getObjectIDs(int messageId) const
get all objects of the given type