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 
25 
26 // ===========================================================================
27 // class declaration
28 // ===========================================================================
29 class GNEEdgeTemplate;
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
38 class GNEInspectorFrame : public GNEFrame {
40  FXDECLARE(GNEInspectorFrame)
41 
42 public:
43  // ===========================================================================
44  // class NeteditAttributesEditor
45  // ===========================================================================
46 
50 
51  public:
53  NeteditAttributesEditor(GNEInspectorFrame* inspectorFrameParent);
54 
57 
60 
63 
65  void refreshNeteditAttributesEditor(bool forceRefresh);
66 
70  long onCmdSetNeteditAttribute(FXObject*, FXSelector, void*);
71 
73  long onCmdMarkFrontElement(FXObject*, FXSelector, void*);
74 
76  long onCmdNeteditAttributeHelp(FXObject*, FXSelector, void*);
78 
79  protected:
81  FOX_CONSTRUCTOR(NeteditAttributesEditor)
82 
83  private:
86 
89 
92 
95 
97  FXHorizontalFrame* myHorizontalFrameCloseShape;
98 
101 
103  FXCheckButton* myCheckBoxCloseShape;
104 
107 
109  FXButton* myHelpButton;
110  };
111 
112  // ===========================================================================
113  // class GEOAttributesEditor
114  // ===========================================================================
115 
119 
120  public:
122  GEOAttributesEditor(GNEInspectorFrame* inspectorFrameParent);
123 
126 
129 
132 
134  void refreshGEOAttributesEditor(bool forceRefresh);
135 
138 
140  long onCmdSetGEOAttribute(FXObject*, FXSelector, void*);
141 
143  long onCmdGEOAttributeHelp(FXObject*, FXSelector, void*);
145 
146  protected:
148  FOX_CONSTRUCTOR(GEOAttributesEditor)
149 
150  private:
153 
155  FXHorizontalFrame* myGEOAttributeFrame;
156 
159 
162 
164  FXHorizontalFrame* myUseGEOFrame;
165 
167  FXLabel* myUseGEOLabel;
168 
170  FXCheckButton* myUseGEOCheckButton;
171 
173  FXButton* myHelpButton;
174  };
175 
176  // ===========================================================================
177  // class TemplateEditor
178  // ===========================================================================
179 
183 
184  public:
186  TemplateEditor(GNEInspectorFrame* inspectorFrameParent);
187 
189  ~TemplateEditor();
190 
192  void showTemplateEditor();
193 
195  void hideTemplateEditor();
196 
199 
201  void setEdgeTemplate(const GNEEdge* edge);
202 
204  void setTemplate();
205 
207  void copyTemplate();
208 
210  void clearTemplate();
211 
215  long onCmdSetTemplate(FXObject*, FXSelector, void*);
216 
218  long onCmdCopyTemplate(FXObject*, FXSelector, void*);
219 
221  long onCmdClearTemplate(FXObject*, FXSelector, void*);
223 
224  protected:
226  FOX_CONSTRUCTOR(TemplateEditor)
227 
228 
229  void updateButtons();
230 
231  private:
234 
237 
240 
243 
246  };
247 
248  // ===========================================================================
249  // class ParametersEditor
250  // ===========================================================================
251 
255 
256  public:
258  ParametersEditor(GNEInspectorFrame* inspectorFrameParent);
259 
262 
264  void showParametersEditor();
265 
267  void hideParametersEditor();
268 
271 
274 
278  long onCmdEditParameters(FXObject*, FXSelector, void*);
279 
281  long onCmdSetParameters(FXObject*, FXSelector, void*);
283 
284  protected:
286  FOX_CONSTRUCTOR(ParametersEditor)
287 
288  private:
291 
293  FXTextField* myTextFieldParameters;
294 
297  };
298 
299  // ===========================================================================
300  // class AdditionalDialog
301  // ===========================================================================
302 
306 
307  public:
309  AdditionalDialog(GNEInspectorFrame* inspectorFrameParent);
310 
313 
315  void showAdditionalDialog();
316 
318  void hideAdditionalDialog();
319 
323  long onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*);
325 
326  protected:
328  FOX_CONSTRUCTOR(AdditionalDialog)
329 
330  private:
333 
336  };
337 
342  GNEInspectorFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
343 
346 
348  void show();
349 
351  void hide();
352 
358  bool processNetworkSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
359 
365  bool processDemandSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
366 
372  bool processDataSupermodeClick(const Position& clickedPosition, GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
373 
376 
378  void inspectMultisection(const std::vector<GNEAttributeCarrier*>& ACs);
379 
381  void inspectChild(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement);
382 
384  void inspectFromDeleteFrame(GNEAttributeCarrier* AC, GNEAttributeCarrier* previousElement, bool previousElementWasMarked);
385 
387  void clearInspectedAC();
388 
391 
394 
397 
400 
403 
406 
408  long onCmdGoBack(FXObject*, FXSelector, void*);
410 
413 
416 
417 protected:
419  FOX_CONSTRUCTOR(GNEInspectorFrame)
420 
421 
422  void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, const Position& clickedPosition);
423 
425  void attributeUpdated();
426 
427 private:
430 
433 
436 
439 
442 
445 
448 
451 
453  FXButton* myBackButton;
454 
457 
460 
463 };
FXGroupBoxModule (based on FXGroupBox)
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"
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 hideNeteditAttributesEditor()
hide netedit attributes editor
GNEInspectorFrame * myInspectorFrameParent
FOX need this.
FXLabel * myLabelCloseShape
Label for close shape.
FXHorizontalFrame * myHorizontalFrameParentAdditional
@frame horizontal frame for replace the parent additional
NeteditAttributesEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
FXTextField * myTextFieldParentAdditional
pointer for replace the parent additional
FXButton * myMarkFrontElementButton
button for set element as front button
void showNeteditAttributesEditor()
show netedit attributes editor
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 showTemplateEditor()
show template editor
long onCmdClearTemplate(FXObject *, FXSelector, void *)
clear current edge template
NeteditAttributesEditor * myNeteditAttributesEditor
Netedit Attributes editor.
GNEFrameModules::OverlappedInspection * myOverlappedInspection
Overlapped Inspection.
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.
GNEInspectorFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
TemplateEditor * getTemplateEditor() const
get template editor
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
GNEFrameModules::HierarchicalElementTree * getHierarchicalElementTree() const
get HierarchicalElementTree modul
void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
FOX need this.
AdditionalDialog * myAdditionalDialog
Additional dialog.
void hide()
hide inspector frame
void inspectFromDeleteFrame(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement, bool previousElementWasMarked)
inspect called from DeleteFrame
GNEFrameModules::OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
GNEInspectorFrame::NeteditAttributesEditor * getNeteditAttributesEditor() const
get Netedit Attributes editor
FXButton * myBackButton
Back Button.
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.
GNEFrameModules::HierarchicalElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
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 point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37