Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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
27
28// ===========================================================================
29// class declaration
30// ===========================================================================
31
33class GNEEdgeTemplate;
34class GNEElementTree;
36
37// ===========================================================================
38// class definitions
39// ===========================================================================
40
43 FXDECLARE(GNEInspectorFrame)
44
45public:
46 // ===========================================================================
47 // class TemplateEditor
48 // ===========================================================================
49
53
54 public:
56 TemplateEditor(GNEInspectorFrame* inspectorFrameParent);
57
60
62 bool showTemplateEditor();
63
65 void hideTemplateEditor();
66
69
71 void setEdgeTemplate(const GNEEdge* edge);
72
74 void updateEdgeTemplate();
75
77 void setTemplate();
78
80 void copyTemplate();
81
83 void clearTemplate();
84
88 long onCmdSetTemplate(FXObject*, FXSelector, void*);
89
91 long onCmdCopyTemplate(FXObject*, FXSelector, void*);
92
94 long onCmdClearTemplate(FXObject*, FXSelector, void*);
96
97 protected:
99 FOX_CONSTRUCTOR(TemplateEditor)
100
101
102 void updateButtons();
103
104 private:
107
110
113
116
119 };
120
125 GNEInspectorFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
126
129
131 void show();
132
134 void hide();
135
140 bool inspectClickedElements(GNEViewNetHelper::ViewObjectsSelector& viewObjects, const Position& clickedPosition,
141 const bool shiftKeyPressed);
142
144 void inspectElement(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousInspectedAC = nullptr);
145
147 void inspectElements(const std::vector<GNEAttributeCarrier*>& ACs, GNEAttributeCarrier* previousInspectedAC = nullptr);
148
150 void clearInspection();
151
153 void refreshInspection();
154
157
160
163
166
169
171 long onCmdInspectPreviousElement(FXObject*, FXSelector, void*);
173
176
179
180protected:
182 FOX_CONSTRUCTOR(GNEInspectorFrame)
183
184private:
187
190
193
196
198 FXButton* myBackButton = nullptr;
199
202};
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