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.dev/sumo
3 // Copyright (C) 2001-2024 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 class GNEEdgeTemplate;
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
40 class GNEInspectorFrame : public GNEFrame {
42  FXDECLARE(GNEInspectorFrame)
43 
44 
45  friend class GNEFrameAttributeModules::ParametersEditor;
46 
47 public:
48  // ===========================================================================
49  // class NeteditAttributesEditor
50  // ===========================================================================
51 
55 
56  public:
58  NeteditAttributesEditor(GNEInspectorFrame* inspectorFrameParent);
59 
62 
64  void showNeteditAttributesEditor();
65 
67  void hideNeteditAttributesEditor();
68 
70  void refreshNeteditAttributesEditor(bool forceRefresh);
71 
73  bool isSelectingParent() const;
74 
76  void setNewParent(GNEAttributeCarrier* clickedAC);
77 
79  void stopSelectParent();
80 
84  long onCmdSetNeteditAttribute(FXObject*, FXSelector, void*);
85 
87  long onCmdMarkFrontElement(FXObject*, FXSelector, void*);
88 
90  long onCmdNeteditAttributeHelp(FXObject*, FXSelector, void*);
92 
93  protected:
95  FOX_CONSTRUCTOR(NeteditAttributesEditor)
96 
97  private:
100 
103 
106 
109 
112 
114  FXHorizontalFrame* myHorizontalFrameCloseShape;
115 
118 
120  FXCheckButton* myCheckBoxCloseShape;
121 
123  FXButton* myHelpButton;
124  };
125 
126  // ===========================================================================
127  // class GEOAttributesEditor
128  // ===========================================================================
129 
133 
134  public:
136  GEOAttributesEditor(GNEInspectorFrame* inspectorFrameParent);
137 
140 
143 
146 
148  void refreshGEOAttributesEditor(bool forceRefresh);
149 
152 
154  long onCmdSetGEOAttribute(FXObject*, FXSelector, void*);
155 
157  long onCmdGEOAttributeHelp(FXObject*, FXSelector, void*);
159 
160  protected:
162  FOX_CONSTRUCTOR(GEOAttributesEditor)
163 
164  private:
167 
169  FXHorizontalFrame* myGEOAttributeFrame;
170 
173 
176 
178  FXHorizontalFrame* myUseGEOFrame;
179 
181  FXLabel* myUseGEOLabel;
182 
184  FXCheckButton* myUseGEOCheckButton;
185 
187  FXButton* myHelpButton;
188  };
189 
190  // ===========================================================================
191  // class TemplateEditor
192  // ===========================================================================
193 
197 
198  public:
200  TemplateEditor(GNEInspectorFrame* inspectorFrameParent);
201 
203  ~TemplateEditor();
204 
206  bool showTemplateEditor();
207 
209  void hideTemplateEditor();
210 
213 
215  void setEdgeTemplate(const GNEEdge* edge);
216 
218  void updateEdgeTemplate();
219 
221  void setTemplate();
222 
224  void copyTemplate();
225 
227  void clearTemplate();
228 
232  long onCmdSetTemplate(FXObject*, FXSelector, void*);
233 
235  long onCmdCopyTemplate(FXObject*, FXSelector, void*);
236 
238  long onCmdClearTemplate(FXObject*, FXSelector, void*);
240 
241  protected:
243  FOX_CONSTRUCTOR(TemplateEditor)
244 
245 
246  void updateButtons();
247 
248  private:
251 
254 
257 
260 
263  };
264 
265  // ===========================================================================
266  // class AdditionalDialog
267  // ===========================================================================
268 
272 
273  public:
275  AdditionalDialog(GNEInspectorFrame* inspectorFrameParent);
276 
279 
281  void showAdditionalDialog();
282 
284  void hideAdditionalDialog();
285 
289  long onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*);
291 
292  protected:
294  FOX_CONSTRUCTOR(AdditionalDialog)
295 
296  private:
299 
302  };
303 
308  GNEInspectorFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
309 
312 
314  void show();
315 
317  void hide();
318 
324  bool processNetworkSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ViewObjectsSelector& viewObjects);
325 
331  bool processDemandSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ViewObjectsSelector& viewObjects);
332 
338  bool processDataSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ViewObjectsSelector& viewObjects);
339 
342 
344  void inspectMultisection(const std::vector<GNEAttributeCarrier*>& ACs);
345 
347  void inspectChild(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement);
348 
350  void inspectFromDeleteFrame(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement, bool previousElementWasMarked);
351 
353  void clearInspectedAC();
354 
357 
360 
363 
366 
369 
372 
374  long onCmdGoBack(FXObject*, FXSelector, void*);
376 
379 
382 
383 protected:
385  FOX_CONSTRUCTOR(GNEInspectorFrame)
386 
387 
388  void inspectClickedElement(const GNEViewNetHelper::ViewObjectsSelector& viewObjects, const Position& clickedPosition);
389 
391  void attributeUpdated(SumoXMLAttr attribute);
392 
393 private:
396 
399 
402 
405 
408 
411 
414 
417 
419  FXButton* myBackButton;
420 
423 
426 
429 };
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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"
FXHorizontalFrame * myHorizontalFrameCloseShape
@frame horizontal frame for close shape
GNEInspectorFrame * myInspectorFrameParent
FOX need this.
FXLabel * myLabelCloseShape
Label for close shape.
FXTextField * myTextFieldParentAdditional
pointer for replace the parent additional
FXButton * myMarkFrontElementButton
button for set element as front button
MFXCheckableButton * mySetNewParentButton
button for set new parent
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
bool 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.
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click over Viewnet in Supermode Demand
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
void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeEditor
void show()
show inspector frame
GNEFrameAttributeModules::ParametersEditor * myParametersEditor
Parameters editor inspector.
GEOAttributesEditor * myGEOAttributesEditor
GEO Attributes editor.
GNEAttributeCarrier * myPreviousElementInspect
Pointer to previous element called by Inspector Frame.
bool myPreviousElementDeleteWasMarked
flag to ckec if myPreviousElementDelete was marked in Delete Frame
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
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click over Viewnet in Supermode Network
FXButton * myBackButton
Back Button.
GNEElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
void inspectClickedElement(const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const Position &clickedPosition)
FOX need this.
void inspectMultisection(const std::vector< GNEAttributeCarrier * > &ACs)
Inspect the given multi-selection.
~GNEInspectorFrame()
Destructor.
TemplateEditor * myTemplateEditor
Template editor.
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
bool processDataSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click over Viewnet in Supermode Data
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:88
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
every row value