Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEInspectorFrame.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/****************************************************************************/
19// The Widget for modifying network-element attributes (i.e. lane speed)
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
32class GNEEdgeTemplate;
33class GNEElementTree;
35
36// ===========================================================================
37// class definitions
38// ===========================================================================
39
42 FXDECLARE(GNEInspectorFrame)
43
44public:
45 // ===========================================================================
46 // class TemplateEditor
47 // ===========================================================================
48
52
53 public:
55 TemplateEditor(GNEInspectorFrame* inspectorFrameParent);
56
59
61 bool showTemplateEditor();
62
64 void hideTemplateEditor();
65
68
70 void setEdgeTemplate(const GNEEdge* edge);
71
73 void updateEdgeTemplate();
74
76 void setTemplate();
77
79 void copyTemplate();
80
82 void clearTemplate();
83
87 long onCmdSetTemplate(FXObject*, FXSelector, void*);
88
90 long onCmdCopyTemplate(FXObject*, FXSelector, void*);
91
93 long onCmdClearTemplate(FXObject*, FXSelector, void*);
95
96 protected:
98 FOX_CONSTRUCTOR(TemplateEditor)
99
100
101 void updateButtons();
102
103 private:
106
109
112
115
118 };
119
124 GNEInspectorFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
125
128
130 void show();
131
133 void hide();
134
139 bool inspectClickedElements(GNEViewNetHelper::ViewObjectsSelector& viewObjects, const Position& clickedPosition,
140 const bool shiftKeyPressed);
141
143 void inspectElement(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousInspectedAC = nullptr);
144
146 void inspectElements(const std::vector<GNEAttributeCarrier*>& ACs, GNEAttributeCarrier* previousInspectedAC = nullptr);
147
149 void clearInspection();
150
152 void refreshInspection();
153
156
159
162
165
168
170 long onCmdInspectPreviousElement(FXObject*, FXSelector, void*);
172
175
178
179protected:
181 FOX_CONSTRUCTOR(GNEInspectorFrame)
182
183private:
186
189
192
195
197 FXButton* myBackButton = nullptr;
198
201};
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
void hideTemplateEditor()
hide template editor
GNEInspectorFrame * myInspectorFrameParent
current GNEInspectorFrame parent
void clearTemplate()
clear template (used by shortcut)
void setEdgeTemplate(const GNEEdge *edge)
set edge template
FXButton * myClearTemplateButton
clear template button
FXButton * mySetTemplateButton
set template button
long onCmdCopyTemplate(FXObject *, FXSelector, void *)
copy edge attributes from edge template
void setTemplate()
set template (used by shortcut)
FXButton * myCopyTemplateButton
copy template button
GNEEdgeTemplate * myEdgeTemplate
edge Template
long onCmdSetTemplate(FXObject *, FXSelector, void *)
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
void copyTemplate()
copy template (used by shortcut)
void updateEdgeTemplate()
update edge template
bool showTemplateEditor()
show template editor
long onCmdClearTemplate(FXObject *, FXSelector, void *)
clear current edge template
long onCmdInspectPreviousElement(FXObject *, FXSelector, void *)
called when user press inspet previous elemnt button
GNEAttributeCarrier * myPreviousInspectedAC
Pointer to previous element inspected.
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog (can be reimplemented in frame children)
TemplateEditor * getTemplateEditor() const
get template editor
void inspectElements(const std::vector< GNEAttributeCarrier * > &ACs, GNEAttributeCarrier *previousInspectedAC=nullptr)
Inspect the given elements.
GNEElementTree * getHierarchicalElementTree() const
get GNEElementTree modul
bool inspectClickedElements(GNEViewNetHelper::ViewObjectsSelector &viewObjects, const Position &clickedPosition, const bool shiftKeyPressed)
process click over Viewnet
void show()
show inspector frame
GNEAttributesEditor * myAttributesEditor
Attributes editor.
GNEOverlappedInspection * myOverlappedInspection
FOX need this.
GNEOverlappedInspection * getOverlappedInspection() const
get GNEOverlappedInspection modul
void clearInspection()
clear inspection
GNEAttributesEditor * getAttributesEditor() const
get AttributesEditor
void hide()
hide inspector frame
FXButton * myBackButton
Back Button.
void inspectElement(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousInspectedAC=nullptr)
Inspect a single element.
GNEElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
void refreshInspection()
refresh current inspection
~GNEInspectorFrame()
Destructor.
TemplateEditor * myTemplateEditor
Template editor.
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37