Eclipse SUMO - Simulation of Urban MObility
GNEInspectorFrame.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/****************************************************************************/
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// ===========================================================================
31class GNEEdgeTemplate;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
42 FXDECLARE(GNEInspectorFrame)
43
44public:
45 // ===========================================================================
46 // class NeteditAttributesEditor
47 // ===========================================================================
48
52
53 public:
55 NeteditAttributesEditor(GNEInspectorFrame* inspectorFrameParent);
56
59
62
65
67 void refreshNeteditAttributesEditor(bool forceRefresh);
68
70 bool isSelectingParent() const;
71
73 void setNewParent(GNEAttributeCarrier* clickedAC);
74
76 void stopSelectParent();
77
81 long onCmdSetNeteditAttribute(FXObject*, FXSelector, void*);
82
84 long onCmdMarkFrontElement(FXObject*, FXSelector, void*);
85
87 long onCmdNeteditAttributeHelp(FXObject*, FXSelector, void*);
89
90 protected:
92 FOX_CONSTRUCTOR(NeteditAttributesEditor)
93
94 private:
97
100
103
106
109
111 FXHorizontalFrame* myHorizontalFrameCloseShape;
112
115
117 FXCheckButton* myCheckBoxCloseShape;
118
120 FXButton* myHelpButton;
121 };
122
123 // ===========================================================================
124 // class GEOAttributesEditor
125 // ===========================================================================
126
130
131 public:
133 GEOAttributesEditor(GNEInspectorFrame* inspectorFrameParent);
134
137
140
143
145 void refreshGEOAttributesEditor(bool forceRefresh);
146
149
151 long onCmdSetGEOAttribute(FXObject*, FXSelector, void*);
152
154 long onCmdGEOAttributeHelp(FXObject*, FXSelector, void*);
156
157 protected:
159 FOX_CONSTRUCTOR(GEOAttributesEditor)
160
161 private:
164
166 FXHorizontalFrame* myGEOAttributeFrame;
167
170
173
175 FXHorizontalFrame* myUseGEOFrame;
176
179
181 FXCheckButton* myUseGEOCheckButton;
182
184 FXButton* myHelpButton;
185 };
186
187 // ===========================================================================
188 // class TemplateEditor
189 // ===========================================================================
190
194
195 public:
197 TemplateEditor(GNEInspectorFrame* inspectorFrameParent);
198
201
203 void showTemplateEditor();
204
206 void hideTemplateEditor();
207
210
212 void setEdgeTemplate(const GNEEdge* edge);
213
215 void updateEdgeTemplate();
216
218 void setTemplate();
219
221 void copyTemplate();
222
224 void clearTemplate();
225
229 long onCmdSetTemplate(FXObject*, FXSelector, void*);
230
232 long onCmdCopyTemplate(FXObject*, FXSelector, void*);
233
235 long onCmdClearTemplate(FXObject*, FXSelector, void*);
237
238 protected:
240 FOX_CONSTRUCTOR(TemplateEditor)
241
242
243 void updateButtons();
244
245 private:
248
251
254
257
260 };
261
262 // ===========================================================================
263 // class ParametersEditor
264 // ===========================================================================
265
269
270 public:
272 ParametersEditor(GNEInspectorFrame* inspectorFrameParent);
273
276
279
282
285
288
292 long onCmdEditParameters(FXObject*, FXSelector, void*);
293
295 long onCmdSetParameters(FXObject*, FXSelector, void*);
297
298 protected:
300 FOX_CONSTRUCTOR(ParametersEditor)
301
302 private:
305
308
311 };
312
313 // ===========================================================================
314 // class AdditionalDialog
315 // ===========================================================================
316
320
321 public:
323 AdditionalDialog(GNEInspectorFrame* inspectorFrameParent);
324
327
330
333
337 long onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*);
339
340 protected:
342 FOX_CONSTRUCTOR(AdditionalDialog)
343
344 private:
347
350 };
351
356 GNEInspectorFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
357
360
362 void show();
363
365 void hide();
366
372 bool processNetworkSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
373
379 bool processDemandSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
380
386 bool processDataSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
387
390
392 void inspectMultisection(const std::vector<GNEAttributeCarrier*>& ACs);
393
395 void inspectChild(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement);
396
398 void inspectFromDeleteFrame(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement, bool previousElementWasMarked);
399
401 void clearInspectedAC();
402
405
408
411
414
417
420
422 long onCmdGoBack(FXObject*, FXSelector, void*);
424
427
430
431protected:
433 FOX_CONSTRUCTOR(GNEInspectorFrame)
434
435
436 void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, const Position& clickedPosition);
437
439 void attributeUpdated();
440
441private:
444
447
450
453
456
459
462
465
467 FXButton* myBackButton;
468
471
474
477};
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
FXButton * myOpenAdditionalDialog
button for open additional dialog
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
void hideAdditionalDialog()
hide netedit attributes editor
AdditionalDialog(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
void showAdditionalDialog()
show netedit attributes editor
GNEInspectorFrame * myInspectorFrameParent
FOX need this.
FXCheckButton * myUseGEOCheckButton
checkBox for use GEO
long onCmdGEOAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
FXButton * myHelpButton
button for help
void showGEOAttributesEditor()
show GEO attributes editor
FXTextField * myGEOAttributeTextField
textField for GEOAttribute
FXLabel * myUseGEOLabel
Label for use GEO.
FXHorizontalFrame * myUseGEOFrame
horizontal frame for use GEO
GEOAttributesEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
long onCmdSetGEOAttribute(FXObject *, FXSelector, void *)
Called when user change the current GEO Attribute.
FXLabel * myGEOAttributeLabel
Label for GEOAttribute.
GNEInspectorFrame * myInspectorFrameParent
FOX need this.
void refreshGEOAttributesEditor(bool forceRefresh)
refresh GEO attributes editor
void hideGEOAttributesEditor()
hide GEO attributes editor
FXHorizontalFrame * myGEOAttributeFrame
horizontal frame for GEOAttribute
FXLabel * myLabelParentAdditional
Label for parent additional.
FXCheckButton * myCheckBoxCloseShape
pointer to check box "Block movement"
bool isSelectingParent() const
check if we're selecting a new parent
long onCmdNeteditAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
FXHorizontalFrame * myHorizontalFrameCloseShape
@frame horizontal frame for close shape
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
long onCmdMarkFrontElement(FXObject *, FXSelector, void *)
Called when user press button "Mark front element".
void refreshNeteditAttributesEditor(bool forceRefresh)
refresh netedit attributes
void setNewParent(GNEAttributeCarrier *clickedAC)
set new parent
void hideNeteditAttributesEditor()
hide netedit attributes editor
GNEInspectorFrame * myInspectorFrameParent
FOX need this.
FXLabel * myLabelCloseShape
Label for close shape.
NeteditAttributesEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
void stopSelectParent()
stop select new parent
FXTextField * myTextFieldParentAdditional
pointer for replace the parent additional
FXButton * myMarkFrontElementButton
button for set element as front button
void showNeteditAttributesEditor()
show netedit attributes editor
MFXCheckableButton * mySetNewParentButton
button for set new parent
FXButton * myButtonEditParameters
button for edit parameters using specific dialog
long onCmdEditParameters(FXObject *, FXSelector, void *)
void showParametersEditor()
show netedit attributes EditorInspector
long onCmdSetParameters(FXObject *, FXSelector, void *)
Called when user udpate the parameter text field.
FXTextField * myTextFieldParameters
text field for write parameters
GNEInspectorFrame * myInspectorFrameParent
FOX need this.
GNEInspectorFrame * getInspectorFrameParent() const
get inspector frame parent
void refreshParametersEditor()
refresh netedit attributes
ParametersEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
void hideParametersEditor()
hide netedit attributes EditorInspector
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)
TemplateEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
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
void showTemplateEditor()
show template editor
long onCmdClearTemplate(FXObject *, FXSelector, void *)
clear current edge template
NeteditAttributesEditor * myNeteditAttributesEditor
Netedit Attributes editor.
GNEAttributeCarrier * myPreviousElementDelete
pointer to previous element called by Delete Frame
GNEFrameAttributeModules::AttributesEditor * getAttributesEditor() const
get AttributesEditor
void inspectChild(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement)
inspect child of already inspected element
void inspectSingleElement(GNEAttributeCarrier *AC)
Inspect a single element.
GNEFrameAttributeModules::AttributesEditor * myAttributesEditor
Attribute editor.
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog (can be reimplemented in frame children)
TemplateEditor * getTemplateEditor() const
get template editor
GNEInspectorFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
GNEElementTree * getHierarchicalElementTree() const
get GNEElementTree modul
void clearInspectedAC()
Clear all current inspected ACs.
long onCmdGoBack(FXObject *, FXSelector, void *)
called when user toggle the go back button
bool processDataSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Data
void show()
show inspector frame
GEOAttributesEditor * myGEOAttributesEditor
GEO Attributes editor.
ParametersEditor * myParametersEditor
Parameters editor inspector.
GNEAttributeCarrier * myPreviousElementInspect
Pointer to previous element called by Inspector Frame.
void attributeUpdated()
function called after set a valid attribute in AttributeEditor
bool myPreviousElementDeleteWasMarked
flag to ckec if myPreviousElementDelete was marked in Delete Frame
void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
FOX need this.
GNEOverlappedInspection * myOverlappedInspection
Overlapped Inspection.
GNEOverlappedInspection * getOverlappedInspection() const
get GNEOverlappedInspection modul
AdditionalDialog * myAdditionalDialog
Additional dialog.
void hide()
hide inspector frame
void inspectFromDeleteFrame(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement, bool previousElementWasMarked)
inspect called from DeleteFrame
GNEInspectorFrame::NeteditAttributesEditor * getNeteditAttributesEditor() const
get Netedit Attributes editor
FXButton * myBackButton
Back Button.
GNEElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
void inspectMultisection(const std::vector< GNEAttributeCarrier * > &ACs)
Inspect the given multi-selection.
~GNEInspectorFrame()
Destructor.
TemplateEditor * myTemplateEditor
Template editor.
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
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.
Definition: GNEViewParent.h:84
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37