Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNETypeFrame.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-2025 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
31class MFXComboBoxIcon;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
37class GNETypeFrame : public GNEFrame {
38
39public:
40 // ===========================================================================
41 // class TypeSelector
42 // ===========================================================================
43
47
48 public:
50 TypeSelector(GNETypeFrame* typeFrameParent);
51
54
57
60
62 void refreshTypeSelector(const bool updateModuls);
63
66
68 long onCmdSelectItem(FXObject*, FXSelector, void*);
69
71
72 protected:
73 FOX_CONSTRUCTOR(TypeSelector)
74
75 private:
78
81
84 };
85
86 // ===========================================================================
87 // class TypeEditor
88 // ===========================================================================
89
93
94 public:
96 TypeEditor(GNETypeFrame* typeFrameParent);
97
100
103
106
109
113 long onCmdCreateType(FXObject*, FXSelector, void*);
114
116 long onCmdDeleteResetType(FXObject*, FXSelector, void*);
117
119 long onCmdCopyType(FXObject*, FXSelector, void*);
121
122 protected:
123 FOX_CONSTRUCTOR(TypeEditor)
124
125
126 void resetType();
127
129 void deleteType();
130
131 private:
134
137
140
143 };
144
149 GNETypeFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
150
153
155 void show();
156
159
160protected:
162 void attributeUpdated(SumoXMLAttr attribute);
163
164private:
167
170
173};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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
long onCmdCreateType(FXObject *, FXSelector, void *)
FXButton * myDeleteResetTypeButton
"delete/reset vehicle type" button
GNETypeFrame * myTypeFrameParent
pointer to vehicle type Frame Parent
FXButton * myCopyTypeButton
"copy vehicle type"
void hideTypeEditorModule()
hide TypeEditor box
void refreshTypeEditorModule()
update TypeEditor modul
long onCmdCopyType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
void setCurrentType(GNEDemandElement *vType)
set current Vehicle Type
GNETypeFrame * myTypeFrameParent
pointer to Frame Parent
MFXComboBoxIcon * myTypeComboBox
comboBox with the list of vTypes
GNEDemandElement * myCurrentType
pointer to current vehicle type
long onCmdSelectItem(FXObject *, FXSelector, void *)
Called when the user select another element in ComboBox.
void refreshTypeSelector(const bool updateModuls)
refresh vehicle type selector
GNEDemandElement * getCurrentType() const
get current Vehicle Type
void show()
show Frame
TypeSelector * getTypeSelector() const
get vehicle type selector
GNEAttributesEditor * myTypeAttributesEditor
editorinternal vehicle type attributes
TypeEditor * myTypeEditor
Vehicle Type editor (Create, copy, etc.)
~GNETypeFrame()
Destructor.
TypeSelector * myTypeSelector
vehicle type selector
void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
A single child window which contains a view of the simulation area.
MFXGroupBoxModule (based on FXGroupBox)