Eclipse SUMO - Simulation of Urban MObility
GNETypeFrame.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-2022 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/****************************************************************************/
18// The Widget for edit Type elements (vehicle, person and container)
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28
29class GNEVehicle;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
38class GNETypeFrame : public GNEFrame {
39
40public:
41 // ===========================================================================
42 // class TypeSelector
43 // ===========================================================================
44
48
49 public:
51 TypeSelector(GNETypeFrame* typeFrameParent);
52
55
58
61
64
67
71 long onCmdSelectItem(FXObject*, FXSelector, void*);
73
74 protected:
75 FOX_CONSTRUCTOR(TypeSelector)
76
77 private:
80
83
86 };
87
88 // ===========================================================================
89 // class TypeEditor
90 // ===========================================================================
91
95
96 public:
98 TypeEditor(GNETypeFrame* typeFrameParent);
99
101 ~TypeEditor();
102
105
108
111
115 long onCmdCreateType(FXObject*, FXSelector, void*);
116
118 long onCmdDeleteResetType(FXObject*, FXSelector, void*);
119
121 long onCmdCopyType(FXObject*, FXSelector, void*);
123
124 protected:
125 FOX_CONSTRUCTOR(TypeEditor)
126
127
128 void resetType();
129
131 void deleteType();
132
133 private:
136
139
142
145 };
146
147 // ===========================================================================
148 // class VTypeDistributions
149 // ===========================================================================
150
154
155 public:
157 VTypeDistributions(GNETypeFrame* typeFrameParent);
158
161
164
167
170
173
177 long onCmdOpenDialog(FXObject*, FXSelector, void*);
179
180 protected:
182 FOX_CONSTRUCTOR(VTypeDistributions)
183
184 private:
187
190 };
191
196 GNETypeFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
197
200
202 void show();
203
206
207protected:
209 void attributeUpdated();
210
213
214private:
217
220
223
226
229};
An Element which don't belong to GNENet but has influence in the simulation.
void resetType()
reset type
long onCmdDeleteResetType(FXObject *, FXSelector, void *)
Called when "Delete/Reset Vehicle Type" button is clicked.
void deleteType()
delete type
void showTypeEditorModule()
show TypeEditor modul
FXButton * myCreateTypeButton
"create vehicle type" button
Definition: GNETypeFrame.h:138
long onCmdCreateType(FXObject *, FXSelector, void *)
FXButton * myDeleteResetTypeButton
"delete/reset vehicle type" button
Definition: GNETypeFrame.h:141
GNETypeFrame * myTypeFrameParent
pointer to vehicle type Frame Parent
Definition: GNETypeFrame.h:135
FXButton * myCopyTypeButton
"copy vehicle type"
Definition: GNETypeFrame.h:144
TypeEditor(GNETypeFrame *typeFrameParent)
FOX-declaration.
void hideTypeEditorModule()
hide TypeEditor box
void refreshTypeEditorModule()
update TypeEditor modul
long onCmdCopyType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
TypeSelector(GNETypeFrame *typeFrameParent)
FOX-declaration.
void setCurrentType(GNEDemandElement *vType)
set current Vehicle Type
GNETypeFrame * myTypeFrameParent
pointer to Frame Parent
Definition: GNETypeFrame.h:79
GNEDemandElement * myCurrentType
pointer to current vehicle type
Definition: GNETypeFrame.h:82
MFXIconComboBox * myTypeComboBox
comboBox with the list of vTypes
Definition: GNETypeFrame.h:85
void refreshTypeSelectorIDs()
refresh vehicle type selector (only IDs, without refreshing attributes)
long onCmdSelectItem(FXObject *, FXSelector, void *)
GNEDemandElement * getCurrentType() const
get current Vehicle Type
void refreshTypeSelector()
refresh vehicle type selector
GNETypeFrame * myTypeFrameParent
FOX need this.
Definition: GNETypeFrame.h:186
void showVTypeDistributionsModule()
show VTypeDistributions modul
long onCmdOpenDialog(FXObject *, FXSelector, void *)
GNEVTypeDistributionsDialog * myVTypeDistributionsDialog
VType distribution dialog.
Definition: GNETypeFrame.h:189
GNETypeFrame * getTypeFrameParent() const
get pointer to type frame Parent
void hideVTypeDistributionsModule()
hide group box
VTypeDistributions(GNETypeFrame *typeFrameParent)
FOX-declaration.
GNEVTypeDistributionsDialog * getVTypeDistributionsDialog() const
get vType distribution dialog
GNEFrameAttributeModules::AttributesEditorExtended * myAttributesEditorExtended
modul for open extended attributes dialog
Definition: GNETypeFrame.h:225
void attributesEditorExtendedDialogOpened()
open GNEAttributesCreator extended dialog (used for editing advance attributes of Vehicle Types)
void show()
show Frame
GNETypeFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
TypeSelector * getTypeSelector() const
get vehicle type selector
void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
GNEFrameAttributeModules::AttributesEditor * myTypeAttributesEditor
editorinternal vehicle type attributes
Definition: GNETypeFrame.h:222
VTypeDistributions * myVTypeDistributions
modul for open vType distributions dialog
Definition: GNETypeFrame.h:228
TypeEditor * myTypeEditor
Vehicle Type editor (Create, copy, etc.)
Definition: GNETypeFrame.h:219
~GNETypeFrame()
Destructor.
TypeSelector * myTypeSelector
vehicle type selector
Definition: GNETypeFrame.h:216
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:84
MFXGroupBoxModule (based on FXGroupBox)
ComboBox with icon.