Eclipse SUMO - Simulation of Urban MObility
GNEFrameModuls.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 // Auxiliar class for GNEFrame Moduls
15 /****************************************************************************/
16 
17 // ===========================================================================
18 // included modules
19 // ===========================================================================
20 
21 #include <config.h>
22 
24 #include <netedit/GNENet.h>
25 #include <netedit/GNEUndoList.h>
26 #include <netedit/GNEViewNet.h>
27 #include <netedit/GNEViewParent.h>
38 #include <utils/gui/div/GLHelper.h>
42 
43 #include "GNEFrameModuls.h"
44 #include "GNEInspectorFrame.h"
45 
46 
47 // ===========================================================================
48 // FOX callback mapping
49 // ===========================================================================
50 
51 FXDEFMAP(GNEFrameModuls::TagSelector) TagSelectorMap[] = {
54 };
55 
56 FXDEFMAP(GNEFrameModuls::DemandElementSelector) DemandElementSelectorMap[] = {
58 };
59 
60 FXDEFMAP(GNEFrameModuls::EdgePathCreator) EdgePathCreatorMap[] = {
64 };
65 
66 FXDEFMAP(GNEFrameModuls::AttributeCarrierHierarchy) AttributeCarrierHierarchyMap[] = {
73 };
74 
75 FXDEFMAP(GNEFrameModuls::DrawingShape) DrawingShapeMap[] = {
79 };
80 
81 FXDEFMAP(GNEFrameModuls::OverlappedInspection) OverlappedInspectionMap[] = {
87 };
88 
89 // Object implementation
90 FXIMPLEMENT(GNEFrameModuls::TagSelector, FXGroupBox, TagSelectorMap, ARRAYNUMBER(TagSelectorMap))
91 FXIMPLEMENT(GNEFrameModuls::DemandElementSelector, FXGroupBox, DemandElementSelectorMap, ARRAYNUMBER(DemandElementSelectorMap))
92 FXIMPLEMENT(GNEFrameModuls::EdgePathCreator, FXGroupBox, EdgePathCreatorMap, ARRAYNUMBER(EdgePathCreatorMap))
93 FXIMPLEMENT(GNEFrameModuls::AttributeCarrierHierarchy, FXGroupBox, AttributeCarrierHierarchyMap, ARRAYNUMBER(AttributeCarrierHierarchyMap))
94 FXIMPLEMENT(GNEFrameModuls::DrawingShape, FXGroupBox, DrawingShapeMap, ARRAYNUMBER(DrawingShapeMap))
95 FXIMPLEMENT(GNEFrameModuls::OverlappedInspection, FXGroupBox, OverlappedInspectionMap, ARRAYNUMBER(OverlappedInspectionMap))
96 
97 
98 // ===========================================================================
99 // method definitions
100 // ===========================================================================
101 
102 // ---------------------------------------------------------------------------
103 // GNEFrameModuls::TagSelector - methods
104 // ---------------------------------------------------------------------------
105 
106 GNEFrameModuls::TagSelector::TagSelector(GNEFrame* frameParent, GNEAttributeCarrier::TagType type, bool onlyDrawables) :
107  FXGroupBox(frameParent->myContentFrame, "Element", GUIDesignGroupBoxFrame),
108  myFrameParent(frameParent) {
109  // first check that property is valid
110  switch (type) {
111  case GNEAttributeCarrier::TagType::TAGTYPE_NETELEMENT:
112  setText("Net elements");
113  break;
114  case GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL:
115  setText("Additional elements");
116  break;
117  case GNEAttributeCarrier::TagType::TAGTYPE_SHAPE:
118  setText("Shape elements");
119  break;
120  case GNEAttributeCarrier::TagType::TAGTYPE_TAZ:
121  setText("TAZ elements");
122  break;
123  case GNEAttributeCarrier::TagType::TAGTYPE_VEHICLE:
124  setText("Vehicles");
125  break;
126  case GNEAttributeCarrier::TagType::TAGTYPE_STOP:
127  setText("Stops");
128  break;
129  case GNEAttributeCarrier::TagType::TAGTYPE_PERSON:
130  setText("Persons");
131  break;
132  case GNEAttributeCarrier::TagType::TAGTYPE_PERSONPLAN:
133  setText("Person plans");
134  // person plan type has four sub-groups
135  myListOfTagTypes.push_back(std::make_pair("person trips", GNEAttributeCarrier::TagType::TAGTYPE_PERSONTRIP));
136  myListOfTagTypes.push_back(std::make_pair("walks", GNEAttributeCarrier::TagType::TAGTYPE_WALK));
137  myListOfTagTypes.push_back(std::make_pair("rides", GNEAttributeCarrier::TagType::TAGTYPE_RIDE));
138  myListOfTagTypes.push_back(std::make_pair("stops", GNEAttributeCarrier::TagType::TAGTYPE_PERSONSTOP));
139  break;
140  case GNEAttributeCarrier::TagType::TAGTYPE_PERSONTRIP:
141  setText("Person trips");
142  break;
143  case GNEAttributeCarrier::TagType::TAGTYPE_WALK:
144  setText("Walks");
145  break;
146  case GNEAttributeCarrier::TagType::TAGTYPE_RIDE:
147  setText("Rides");
148  break;
149  case GNEAttributeCarrier::TagType::TAGTYPE_PERSONSTOP:
150  setText("Person stops");
151  break;
152  default:
153  throw ProcessError("invalid tag property");
154  }
155 
156  // Create FXComboBox
157  myTagTypesMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_TAGTYPE_SELECTED, GUIDesignComboBox);
158  // Create FXComboBox
159  myTagsMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_TAG_SELECTED, GUIDesignComboBox);
160  // Fill comboBox depending of TagTypes
161  if (myListOfTagTypes.size() > 0) {
162  // fill myTypeMatchBox with list of tags
163  for (const auto& i : myListOfTagTypes) {
164  myTagTypesMatchBox->appendItem(i.first.c_str());
165  }
166  // Set visible items
167  myTagTypesMatchBox->setNumVisible((int)myTagTypesMatchBox->getNumItems());
168  // fill myListOfTags with personTrips (the first Tag Type)
169  myListOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_PERSONTRIP, onlyDrawables);
170  } else {
171  myTagTypesMatchBox->hide();
172  // fill myListOfTags
173  myListOfTags = GNEAttributeCarrier::allowedTagsByCategory(type, onlyDrawables);
174 
175  }
176  // fill myTypeMatchBox with list of tags
177  for (const auto& i : myListOfTags) {
178  myTagsMatchBox->appendItem(toString(i).c_str());
179  }
180  // Set visible items
181  myTagsMatchBox->setNumVisible((int)myTagsMatchBox->getNumItems());
182  // TagSelector is always shown
183  show();
184 }
185 
186 
188 
189 
190 void
192  show();
193 }
194 
195 
196 void
198  hide();
199 }
200 
201 
204  return myCurrentTagProperties;
205 }
206 
207 
208 void
210  // set empty tag properties
211  myCurrentTagProperties = GNEAttributeCarrier::TagProperties();
212  // make sure that tag is in myTypeMatchBox
213  for (int i = 0; i < (int)myTagsMatchBox->getNumItems(); i++) {
214  if (myTagsMatchBox->getItem(i).text() == toString(tagType)) {
215  myTagsMatchBox->setCurrentItem(i);
216  // fill myListOfTags with personTrips (the first Tag Type)
217  myListOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_PERSONTRIP, true);
218  // clear myTagsMatchBox
219  myTagsMatchBox->clearItems();
220  // fill myTypeMatchBox with list of tags
221  for (const auto& j : myListOfTags) {
222  myTagsMatchBox->appendItem(toString(j).c_str());
223  }
224  // Set visible items
225  myTagsMatchBox->setNumVisible((int)myTagsMatchBox->getNumItems());
226  }
227  }
228  // call tag selected function
229  myFrameParent->tagSelected();
230 }
231 
232 
233 void
235  // set empty tag properties
236  myCurrentTagProperties = GNEAttributeCarrier::TagProperties();
237  // make sure that tag is in myTypeMatchBox
238  for (int i = 0; i < (int)myTagsMatchBox->getNumItems(); i++) {
239  if (myTagsMatchBox->getItem(i).text() == toString(newTag)) {
240  myTagsMatchBox->setCurrentItem(i);
241  // Set new current type
242  myCurrentTagProperties = GNEAttributeCarrier::getTagProperties(newTag);
243  }
244  }
245  // call tag selected function
246  myFrameParent->tagSelected();
247 }
248 
249 
250 void
252  // simply call onCmdSelectItem (to avoid duplicated code)
253  onCmdSelectTag(0, 0, 0);
254 }
255 
256 
257 long GNEFrameModuls::TagSelector::onCmdSelectTagType(FXObject*, FXSelector, void*) {
258  // Check if value of myTypeMatchBox correspond of an allowed additional tags
259  for (const auto& i : myListOfTagTypes) {
260  if (i.first == myTagTypesMatchBox->getText().text()) {
261  // set color of myTagTypesMatchBox to black (valid)
262  myTagTypesMatchBox->setTextColor(FXRGB(0, 0, 0));
263  // fill myListOfTags with personTrips (the first Tag Type)
264  myListOfTags = GNEAttributeCarrier::allowedTagsByCategory(i.second, true);
265  // show and clear myTagsMatchBox
266  myTagsMatchBox->show();
267  myTagsMatchBox->clearItems();
268  // fill myTypeMatchBox with list of tags
269  for (const auto& j : myListOfTags) {
270  myTagsMatchBox->appendItem(toString(j).c_str());
271  }
272  // Set visible items
273  myTagsMatchBox->setNumVisible((int)myTagsMatchBox->getNumItems());
274  // Write Warning in console if we're in testing mode
275  WRITE_DEBUG(("Selected item '" + myTagsMatchBox->getText() + "' in TagTypeSelector").text());
276  // call onCmdSelectTag
277  return onCmdSelectTag(nullptr, 0, nullptr);
278  }
279  }
280  // if TagType isn't valid, hide myTagsMatchBox
281  myTagsMatchBox->hide();
282  // if additional name isn't correct, set SUMO_TAG_NOTHING as current type
283  myCurrentTagProperties = myInvalidTagProperty;
284  // call tag selected function
285  myFrameParent->tagSelected();
286  // set color of myTagTypesMatchBox to red (invalid)
287  myTagTypesMatchBox->setTextColor(FXRGB(255, 0, 0));
288  // Write Warning in console if we're in testing mode
289  WRITE_DEBUG("Selected invalid item in TagTypeSelector");
290  return 1;
291 }
292 
293 
294 long
295 GNEFrameModuls::TagSelector::onCmdSelectTag(FXObject*, FXSelector, void*) {
296  // Check if value of myTypeMatchBox correspond of an allowed additional tags
297  for (const auto& i : myListOfTags) {
298  if (toString(i) == myTagsMatchBox->getText().text()) {
299  // set color of myTypeMatchBox to black (valid)
300  myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
301  // Set new current type
302  myCurrentTagProperties = GNEAttributeCarrier::getTagProperties(i);
303  // call tag selected function
304  myFrameParent->tagSelected();
305  // Write Warning in console if we're in testing mode
306  WRITE_DEBUG(("Selected item '" + myTagsMatchBox->getText() + "' in TagSelector").text());
307  return 1;
308  }
309  }
310  // if additional name isn't correct, set SUMO_TAG_NOTHING as current type
311  myCurrentTagProperties = myInvalidTagProperty;
312  // call tag selected function
313  myFrameParent->tagSelected();
314  // set color of myTypeMatchBox to red (invalid)
315  myTagsMatchBox->setTextColor(FXRGB(255, 0, 0));
316  // Write Warning in console if we're in testing mode
317  WRITE_DEBUG("Selected invalid item in TagSelector");
318  return 1;
319 }
320 
321 // ---------------------------------------------------------------------------
322 // GNEFrameModuls::DemandElementSelector - methods
323 // ---------------------------------------------------------------------------
324 
326  FXGroupBox(frameParent->myContentFrame, ("Parent " + toString(demandElementTag)).c_str(), GUIDesignGroupBoxFrame),
327  myFrameParent(frameParent),
328  myCurrentDemandElement(nullptr),
329  myDemandElementTags({demandElementTag}) {
330  // Create FXComboBox
331  myDemandElementsMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox);
332  // refresh demand element MatchBox
333  refreshDemandElementSelector();
334  // shown after creation
335  show();
336 }
337 
338 
339 GNEFrameModuls::DemandElementSelector::DemandElementSelector(GNEFrame* frameParent, const std::vector<GNEAttributeCarrier::TagType>& tagTypes) :
340  FXGroupBox(frameParent->myContentFrame, "Parent element", GUIDesignGroupBoxFrame),
341  myFrameParent(frameParent),
342  myCurrentDemandElement(nullptr) {
343  // fill myDemandElementTags
344  for (const auto& i : tagTypes) {
345  auto tags = GNEAttributeCarrier::allowedTagsByCategory(i, false);
346  myDemandElementTags.insert(myDemandElementTags.end(), tags.begin(), tags.end());
347  }
348  // Create FXComboBox
350  // refresh demand element MatchBox
352  // shown after creation
353  show();
354 }
355 
356 
358 
359 
362  return myCurrentDemandElement;
363 }
364 
365 
366 const std::vector<SumoXMLTag>&
368  return myDemandElementTags;
369 }
370 
371 void
373  // first check that demandElement tag correspond to a tag of myDemandElementTags
374  if (std::find(myDemandElementTags.begin(), myDemandElementTags.end(), demandElement->getTagProperty().getTag()) != myDemandElementTags.end()) {
375  // update text of myDemandElementsMatchBox
376  myDemandElementsMatchBox->setText(demandElement->getID().c_str());
377  // Set new current demand element
378  myCurrentDemandElement = demandElement;
379  // call demandElementSelected function
380  myFrameParent->demandElementSelected();
381  }
382 }
383 
384 
385 void
387  // first refresh modul
388  refreshDemandElementSelector();
389  // if current selected item isn't valid, set DEFAULT_VTYPE_ID or DEFAULT_PEDTYPE_ID
390  if (myCurrentDemandElement) {
391  myDemandElementsMatchBox->setText(myCurrentDemandElement->getID().c_str());
392  } else if (myDemandElementTags.size() == 1) {
393  if (myDemandElementTags.at(0) == SUMO_TAG_VTYPE) {
394  myDemandElementsMatchBox->setText(DEFAULT_VTYPE_ID.c_str());
395  } else if (myDemandElementTags.at(0) == SUMO_TAG_PTYPE) {
396  myDemandElementsMatchBox->setText(DEFAULT_PEDTYPE_ID.c_str());
397  }
398  }
399  onCmdSelectDemandElement(nullptr, 0, nullptr);
400  show();
401 }
402 
403 
404 void
406  hide();
407 }
408 
409 
410 bool
412  return shown();
413 }
414 
415 
416 void
418  // clear demand elements comboBox
419  myDemandElementsMatchBox->clearItems();
420  // fill myTypeMatchBox with list of demand elements
421  for (const auto& i : myDemandElementTags) {
422  // special case for VTypes and PTypes
423  if (i == SUMO_TAG_VTYPE) {
424  // add default Vehicle an Bike types in the first and second positions
425  myDemandElementsMatchBox->appendItem(DEFAULT_VTYPE_ID.c_str());
426  myDemandElementsMatchBox->appendItem(DEFAULT_BIKETYPE_ID.c_str());
427  // add rest of vTypes
428  for (const auto& j : myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(i)) {
429  // avoid insert duplicated default vType
430  if ((j.first != DEFAULT_VTYPE_ID) && (j.first != DEFAULT_BIKETYPE_ID)) {
431  myDemandElementsMatchBox->appendItem(j.first.c_str());
432  }
433  }
434  } else if (i == SUMO_TAG_PTYPE) {
435  // add default Person type in the firs
436  myDemandElementsMatchBox->appendItem(DEFAULT_PEDTYPE_ID.c_str());
437  // add rest of pTypes
438  for (const auto& j : myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(i)) {
439  // avoid insert duplicated default pType
440  if (j.first != DEFAULT_PEDTYPE_ID) {
441  myDemandElementsMatchBox->appendItem(j.first.c_str());
442  }
443  }
444  } else {
445  // insert all Ids
446  for (const auto& j : myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(i)) {
447  myDemandElementsMatchBox->appendItem(j.first.c_str());
448  }
449  }
450  }
451  // Set number of items (maximum 10)
452  if (myDemandElementsMatchBox->getNumItems() < 10) {
453  myDemandElementsMatchBox->setNumVisible((int)myDemandElementsMatchBox->getNumItems());
454  } else {
455  myDemandElementsMatchBox->setNumVisible(10);
456  }
457  // update myCurrentDemandElement
458  if (myDemandElementsMatchBox->getNumItems() == 0) {
459  myCurrentDemandElement = nullptr;
460  } else if (myCurrentDemandElement) {
461  for (int i = 0; i < myDemandElementsMatchBox->getNumItems(); i++) {
462  if (myDemandElementsMatchBox->getItem(i).text() == myCurrentDemandElement->getID()) {
463  myDemandElementsMatchBox->setCurrentItem(i, FALSE);
464  }
465  }
466  } else {
467  // set first element in the list as myCurrentDemandElement (Special case for default person and vehicle type)
468  if (myDemandElementsMatchBox->getItem(0).text() == DEFAULT_VTYPE_ID) {
469  myCurrentDemandElement = myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_VTYPE).at(DEFAULT_VTYPE_ID);
470  } else if (myDemandElementsMatchBox->getItem(0).text() == DEFAULT_PEDTYPE_ID) {
471  myCurrentDemandElement = myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PTYPE).at(DEFAULT_PEDTYPE_ID);
472  } else {
473  // disable myCurrentDemandElement
474  myCurrentDemandElement = nullptr;
475  // update myCurrentDemandElement with the first allowed element
476  for (auto i = myDemandElementTags.begin(); (i != myDemandElementTags.end()) && (myCurrentDemandElement == nullptr); i++) {
477  if (myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(*i).size() > 0) {
478  myCurrentDemandElement = myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(*i).begin()->second;
479  }
480  }
481  }
482  }
483 }
484 
485 
486 long
488  // Check if value of myTypeMatchBox correspond to a demand element
489  for (const auto& i : myDemandElementTags) {
490  for (const auto& j : myFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(i)) {
491  if (j.first == myDemandElementsMatchBox->getText().text()) {
492  // set color of myTypeMatchBox to black (valid)
493  myDemandElementsMatchBox->setTextColor(FXRGB(0, 0, 0));
494  // Set new current demand element
495  myCurrentDemandElement = j.second;
496  // call demandElementSelected function
497  myFrameParent->demandElementSelected();
498  // Write Warning in console if we're in testing mode
499  WRITE_DEBUG(("Selected item '" + myDemandElementsMatchBox->getText() + "' in DemandElementSelector").text());
500  return 1;
501  }
502  }
503  }
504  // if demand element selected is invalid, set demand element as null
505  myCurrentDemandElement = nullptr;
506  // call demandElementSelected function
507  myFrameParent->demandElementSelected();
508  // change color of myDemandElementsMatchBox to red (invalid)
509  myDemandElementsMatchBox->setTextColor(FXRGB(255, 0, 0));
510  // Write Warning in console if we're in testing mode
511  WRITE_DEBUG("Selected invalid item in DemandElementSelector");
512  return 1;
513 }
514 
515 // ---------------------------------------------------------------------------
516 // GNEFrameModuls::EdgePathCreator - methods
517 // ---------------------------------------------------------------------------
518 
519 GNEFrameModuls::EdgePathCreator::EdgePathCreator(GNEFrame* frameParent, int edgePathCreatorModes) :
520  FXGroupBox(frameParent->myContentFrame, "Route creator", GUIDesignGroupBoxFrame),
521  myFrameParent(frameParent),
522  myVClass(SVC_PASSENGER),
523  mySelectedBusStop(nullptr),
524  myEdgePathCreatorModes(edgePathCreatorModes) {
525 
526  // create button for create GEO POIs
527  myFinishCreationButton = new FXButton(this, "Finish route creation", nullptr, this, MID_GNE_EDGEPATH_FINISH, GUIDesignButton);
528  myFinishCreationButton->disable();
529 
530  // create button for create GEO POIs
531  myAbortCreationButton = new FXButton(this, "Abort route creation", nullptr, this, MID_GNE_EDGEPATH_ABORT, GUIDesignButton);
532  myAbortCreationButton->disable();
533 
534  // create button for create GEO POIs
535  myRemoveLastInsertedEdge = new FXButton(this, "Remove last inserted edge", nullptr, this, MID_GNE_EDGEPATH_REMOVELAST, GUIDesignButton);
536  myRemoveLastInsertedEdge->disable();
537 }
538 
539 
541 
542 
543 void
545  // header needs the first capitalized letter
546  std::string nameWithFirstCapitalizedLetter = name;
547  nameWithFirstCapitalizedLetter[0] = (char)toupper(nameWithFirstCapitalizedLetter.at(0));
548  setText((nameWithFirstCapitalizedLetter + " creator").c_str());
549  myFinishCreationButton->setText(("Finish " + name + " creation").c_str());
550  myAbortCreationButton->setText(("Abort " + name + " creation").c_str());
551 }
552 
553 
554 void
556  // disable buttons
557  myFinishCreationButton->disable();
558  myAbortCreationButton->disable();
559  myRemoveLastInsertedEdge->disable();
560  // show modul
561  show();
562 }
563 
564 
565 void
567  // restore colors
568  for (const auto& i : myClickedEdges) {
569  restoreEdgeColor(i);
570  }
571  // clear edges
572  myClickedEdges.clear();
573  // clear myTemporalEdgePath
574  myTemporalRoute.clear();
575  // hide modul
576  hide();
577 }
578 
579 
580 void
582  myVClass = vClass;
583 }
584 
585 
586 void
588  myEdgePathCreatorModes = edgePathCreatorModes;
589 }
590 
591 
592 std::vector<GNEEdge*>
594  return myClickedEdges;
595 }
596 
597 
600  return mySelectedBusStop;
601 }
602 
603 
604 bool
606  bool addEdge = true;
607  // check if final busStop was selected
608  if (mySelectedBusStop != nullptr) {
609  addEdge = false;
610  // write status bar text
611  myFrameParent->getViewNet()->setStatusBarText("Final " + mySelectedBusStop->getTagProperty().getTagStr() + " selected");
612  // Write Warning in console if we're in testing mode
613  WRITE_DEBUG("Final " + mySelectedBusStop->getTagProperty().getTagStr() + " selected");
614  } else if ((myClickedEdges.size() > 0) && (myClickedEdges.back() == edge)) {
615  // avoid duplicated consecutive edges
616  addEdge = false;
617  // write status bar text
618  myFrameParent->getViewNet()->setStatusBarText("Duplicated consecutive edges aren't allowed");
619  // Write Warning in console if we're in testing mode
620  WRITE_DEBUG("Duplicated consecutive edges aren't allowed");
621  }
622  // check permissions
623  if (addEdge) {
624  addEdge = false;
625  for (const auto& i : edge->getNBEdge()->getLanes()) {
626  if ((i.permissions & myVClass) != 0) {
627  addEdge = true;
628  }
629  }
630  if (addEdge == false) {
631  // write status bar text
632  myFrameParent->getViewNet()->setStatusBarText("Invalid edge permissions");
633  // Write Warning in console if we're in testing mode
634  WRITE_DEBUG("Invalid edge permissions");
635  }
636  }
637  // check if edge can be added
638  if (addEdge) {
639  // insert edge in myClickedEdges
640  myClickedEdges.push_back(edge);
641  // enable abort route button
642  myAbortCreationButton->enable();
643  // disable undo/redo
644  myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("trip creation");
645  // set special color
646  for (auto i : edge->getLanes()) {
647  i->setSpecialColor(&myFrameParent->getEdgeCandidateSelectedColor());
648  }
649  // enable remove last edge button
650  myRemoveLastInsertedEdge->enable();
651  // enable finish button
652  myFinishCreationButton->enable();
653  // calculate route if there is more than two edges
654  if (myClickedEdges.size() > 1) {
655  // calculate temporal route
656  myTemporalRoute = GNEDemandElement::getRouteCalculatorInstance()->calculateDijkstraRoute(myVClass, myClickedEdges);
657  } else {
658  // use single edge as temporal route
659  myTemporalRoute = myClickedEdges;
660  }
661  return true;
662  } else {
663  return false;
664  }
665 }
666 
667 
668 bool
670  // check that at least there is a selected edge
671  if (!myClickedEdges.empty() && (mySelectedBusStop == nullptr)) {
672  mySelectedBusStop = busStop;
673  mySelectedBusStop->setSpecialColor(&myFrameParent->getEdgeCandidateSelectedColor());
674  }
675  return false;
676 }
677 
678 
679 void
681  // restore colors
682  for (const auto& i : myClickedEdges) {
683  restoreEdgeColor(i);
684  }
685  // clear edges
686  myClickedEdges.clear();
687  myTemporalRoute.clear();
688  // clear busStop
689  if (mySelectedBusStop) {
690  mySelectedBusStop->setSpecialColor(nullptr);
691  mySelectedBusStop = nullptr;
692  }
693  // enable undo/redo
694  myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo();
695 }
696 
697 
698 void
700  // draw depending of number of edges
701  if (myClickedEdges.size() > 0) {
702  // Add a draw matrix
703  glPushMatrix();
704  // Start with the drawing of the area traslating matrix to origin
705  glTranslated(0, 0, GLO_MAX);
706  // set orange color
708  // set line width
709  glLineWidth(5);
710  // we have two possibilites, depending of myTemporalRoute
711  if (myTemporalRoute.empty()) {
712  // draw first line
713  GLHelper::drawLine(myClickedEdges.at(0)->getNBEdge()->getLanes().front().shape.front(),
714  myClickedEdges.at(0)->getNBEdge()->getLanes().front().shape.back());
715  // draw rest of lines
716  for (int i = 1; i < (int)myClickedEdges.size(); i++) {
717  GLHelper::drawLine(myClickedEdges.at(i - 1)->getNBEdge()->getLanes().front().shape.back(),
718  myClickedEdges.at(i)->getNBEdge()->getLanes().front().shape.front());
719  GLHelper::drawLine(myClickedEdges.at(i)->getNBEdge()->getLanes().front().shape.front(),
720  myClickedEdges.at(i)->getNBEdge()->getLanes().front().shape.back());
721  }
722  // draw a line to center of selected bus
723  if (mySelectedBusStop) {
724  GLHelper::drawLine(myClickedEdges.back()->getNBEdge()->getLanes().front().shape.back(),
725  mySelectedBusStop->getAdditionalGeometry().getShape().getLineCenter());
726  }
727  } else {
728  // draw first line
729  GLHelper::drawLine(myTemporalRoute.at(0)->getNBEdge()->getLanes().front().shape.front(),
730  myTemporalRoute.at(0)->getNBEdge()->getLanes().front().shape.back());
731  // draw rest of lines
732  for (int i = 1; i < (int)myTemporalRoute.size(); i++) {
733  GLHelper::drawLine(myTemporalRoute.at(i - 1)->getNBEdge()->getLanes().front().shape.back(),
734  myTemporalRoute.at(i)->getNBEdge()->getLanes().front().shape.front());
735  GLHelper::drawLine(myTemporalRoute.at(i)->getNBEdge()->getLanes().front().shape.front(),
736  myTemporalRoute.at(i)->getNBEdge()->getLanes().front().shape.back());
737  }
738  // draw a line to center of selected bus
739  if (mySelectedBusStop) {
740  GLHelper::drawLine(myTemporalRoute.back()->getNBEdge()->getLanes().front().shape.back(),
741  mySelectedBusStop->getAdditionalGeometry().getShape().getLineCenter());
742  }
743  }
744  // Pop last matrix
745  glPopMatrix();
746  }
747 }
748 
749 
750 void
752  if (myAbortCreationButton->isEnabled()) {
753  onCmdAbortRouteCreation(nullptr, 0, nullptr);
754  }
755 }
756 
757 
758 void
760  if (myFinishCreationButton->isEnabled()) {
761  onCmdFinishRouteCreation(nullptr, 0, nullptr);
762  }
763 }
764 
765 
766 void
768  if (myRemoveLastInsertedEdge->isEnabled()) {
769  onCmdRemoveLastInsertedElement(nullptr, 0, nullptr);
770  }
771 }
772 
773 
774 long
776  // clear edges
777  clearEdges();
778  // disable buttons
779  myAbortCreationButton->disable();
780  myFinishCreationButton->disable();
781  myRemoveLastInsertedEdge->disable();
782  return 1;
783 }
784 
785 
786 long
788  // only create route if there is more than two edges
789  if (myClickedEdges.size() > 0) {
790  // depending of tag, check if last element is a busStop
791  if ((myEdgePathCreatorModes == GNE_EDGEPATHCREATOR_TO_BUSSTOP) && (mySelectedBusStop == nullptr)) {
792  WRITE_WARNING("Last clicked element must be a " + toString(SUMO_TAG_BUS_STOP));
793  return 1;
794  }
795  // call edgePathCreated
796  myFrameParent->edgePathCreated();
797  // update view
798  myFrameParent->myViewNet->update();
799  // clear edges after creation
800  clearEdges();
801  // disable buttons
802  myFinishCreationButton->disable();
803  myAbortCreationButton->disable();
804  myRemoveLastInsertedEdge->disable();
805  }
806  return 1;
807 }
808 
809 
810 long
812  if (myClickedEdges.size() > 1) {
813  // restore color of last clicked edge
814  restoreEdgeColor(myClickedEdges.back());
815  // remove last edge
816  myClickedEdges.pop_back();
817  // calculate temporal route
818  myTemporalRoute = GNEDemandElement::getRouteCalculatorInstance()->calculateDijkstraRoute(myVClass, myClickedEdges);
819  // update view (to see the new temporal route)
820  myFrameParent->myViewNet->update();
821  // check if after pop edge, there is more than one edge
822  if (myClickedEdges.size() == 1) {
823  // disable remove last edge button
824  myRemoveLastInsertedEdge->disable();
825  }
826  }
827  return 1;
828 }
829 
830 
831 void
833  // restore color of every lane
834  for (const auto& i : edge->getLanes()) {
835  i->setSpecialColor(nullptr);
836  }
837 }
838 
839 // ---------------------------------------------------------------------------
840 // GNEFrameModuls::AttributeCarrierHierarchy - methods
841 // ---------------------------------------------------------------------------
842 
844  FXGroupBox(frameParent->myContentFrame, "Hierarchy", GUIDesignGroupBoxFrame),
845  myFrameParent(frameParent),
846  myAC(nullptr),
847  myClickedAC(nullptr),
848  myClickedJunction(nullptr),
849  myClickedEdge(nullptr),
850  myClickedLane(nullptr),
851  myClickedCrossing(nullptr),
852  myClickedConnection(nullptr),
853  myClickedShape(nullptr),
854  myClickedAdditional(nullptr),
855  myClickedDemandElement(nullptr) {
856  // Create three list
858  hide();
859 }
860 
861 
863 
864 
865 void
867  myAC = AC;
868  // show AttributeCarrierHierarchy and refresh AttributeCarrierHierarchy
869  if (myAC) {
870  show();
871  refreshAttributeCarrierHierarchy();
872  }
873 }
874 
875 
876 void
878  // set all pointers null
879  myAC = nullptr;
880  myClickedAC = nullptr;
881  myClickedJunction = nullptr;
882  myClickedEdge = nullptr;
883  myClickedLane = nullptr;
884  myClickedCrossing = nullptr;
885  myClickedConnection = nullptr;
886  myClickedShape = nullptr;
887  myClickedAdditional = nullptr;
888  myClickedDemandElement = nullptr;
889  // hide modul
890  hide();
891 }
892 
893 
894 void
896  // clear items
897  myTreelist->clearItems();
898  myTreeItemToACMap.clear();
899  myTreeItemsConnections.clear();
900  // show ACChildren of myAC
901  if (myAC) {
902  showAttributeCarrierChildren(myAC, showAttributeCarrierParents());
903  }
904 }
905 
906 
907 long
908 GNEFrameModuls::AttributeCarrierHierarchy::onCmdShowChildMenu(FXObject*, FXSelector, void* eventData) {
909  // Obtain event
910  FXEvent* e = (FXEvent*)eventData;
911  // obtain FXTreeItem in the given position
912  FXTreeItem* item = myTreelist->getItemAt(e->win_x, e->win_y);
913  // open Pop-up if FXTreeItem has a Attribute Carrier vinculated
914  if (item && (myTreeItemsConnections.find(item) == myTreeItemsConnections.end())) {
915  createPopUpMenu(e->root_x, e->root_y, myTreeItemToACMap[item]);
916  }
917  return 1;
918 }
919 
920 
921 long
923  // Center item
924  if (myClickedJunction) {
925  myFrameParent->myViewNet->centerTo(myClickedJunction->getGlID(), true, -1);
926  } else if (myClickedEdge) {
927  myFrameParent->myViewNet->centerTo(myClickedEdge->getGlID(), true, -1);
928  } else if (myClickedLane) {
929  myFrameParent->myViewNet->centerTo(myClickedLane->getGlID(), true, -1);
930  } else if (myClickedCrossing) {
931  myFrameParent->myViewNet->centerTo(myClickedCrossing->getGlID(), true, -1);
932  } else if (myClickedConnection) {
933  myFrameParent->myViewNet->centerTo(myClickedConnection->getGlID(), true, -1);
934  } else if (myClickedAdditional) {
935  myFrameParent->myViewNet->centerTo(myClickedAdditional->getGlID(), true, -1);
936  } else if (myClickedShape) {
937  myFrameParent->myViewNet->centerTo(myClickedShape->getGlID(), true, -1);
938  } else if (myClickedDemandElement) {
939  myFrameParent->myViewNet->centerTo(myClickedDemandElement->getGlID(), true, -1);
940  }
941  // update view after centering
942  myFrameParent->myViewNet->update();
943  return 1;
944 }
945 
946 
947 long
949  if ((myAC != nullptr) && (myClickedAC != nullptr)) {
950  myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectChild(myClickedAC, myAC);
951  }
952  return 1;
953 }
954 
955 
956 long
958  // check if Inspector frame was opened before removing
959  const std::vector<GNEAttributeCarrier*>& currentInspectedACs = myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->getAttributesEditor()->getEditedACs();
960  // Remove Attribute Carrier
961  if (myClickedJunction) {
962  myFrameParent->myViewNet->getNet()->deleteJunction(myClickedJunction, myFrameParent->myViewNet->getUndoList());
963  } else if (myClickedEdge) {
964  myFrameParent->myViewNet->getNet()->deleteEdge(myClickedEdge, myFrameParent->myViewNet->getUndoList(), false);
965  } else if (myClickedLane) {
966  myFrameParent->myViewNet->getNet()->deleteLane(myClickedLane, myFrameParent->myViewNet->getUndoList(), false);
967  } else if (myClickedCrossing) {
968  myFrameParent->myViewNet->getNet()->deleteCrossing(myClickedCrossing, myFrameParent->myViewNet->getUndoList());
969  } else if (myClickedConnection) {
970  myFrameParent->myViewNet->getNet()->deleteConnection(myClickedConnection, myFrameParent->myViewNet->getUndoList());
971  } else if (myClickedAdditional) {
972  myFrameParent->myViewNet->getNet()->deleteAdditional(myClickedAdditional, myFrameParent->myViewNet->getUndoList());
973  } else if (myClickedShape) {
974  myFrameParent->myViewNet->getNet()->deleteShape(myClickedShape, myFrameParent->myViewNet->getUndoList());
975  } else if (myClickedDemandElement) {
976  // check that default VTypes aren't removed
977  if ((myClickedDemandElement->getTagProperty().getTag() == SUMO_TAG_VTYPE) && (GNEAttributeCarrier::parse<bool>(myClickedDemandElement->getAttribute(GNE_ATTR_DEFAULT_VTYPE)))) {
978  WRITE_WARNING("Default Vehicle Type '" + myClickedDemandElement->getAttribute(SUMO_ATTR_ID) + "' cannot be removed");
979  return 1;
980  } else if (myClickedDemandElement->getTagProperty().isPersonPlan() && (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().size() == 1)) {
981  // we need to check if we're removing the last person plan of a person.
982  myFrameParent->myViewNet->getNet()->deleteDemandElement(myClickedDemandElement->getParentDemandElements().front(), myFrameParent->myViewNet->getUndoList());
983  } else {
984  myFrameParent->myViewNet->getNet()->deleteDemandElement(myClickedDemandElement, myFrameParent->myViewNet->getUndoList());
985  }
986  }
987  // update viewNet
988  myFrameParent->myViewNet->update();
989  // refresh AC Hierarchy
990  refreshAttributeCarrierHierarchy();
991  // check if inspector frame has to be shown again
992  if (currentInspectedACs.size() == 1) {
993  if (currentInspectedACs.front() != myClickedAC) {
994  myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectSingleElement(currentInspectedACs.front());
995  } else {
996  // inspect a nullprt element to reset inspector frame
997  myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectSingleElement(nullptr);
998  }
999  }
1000  return 1;
1001 }
1002 
1003 
1004 long
1006  // currently only children of demand elements can be moved
1007  if (myClickedDemandElement) {
1008  myFrameParent->myViewNet->getUndoList()->p_begin(("moving up " + myClickedDemandElement->getTagStr()).c_str());
1009  // move element one position back
1010  myFrameParent->myViewNet->getUndoList()->add(new GNEChange_Children(myClickedDemandElement->getParentDemandElements().at(0), myClickedDemandElement,
1011  GNEChange_Children::Operation::MOVE_BACK), true);
1012  myFrameParent->myViewNet->getUndoList()->p_end();
1013  }
1014  // refresh after moving child
1015  refreshAttributeCarrierHierarchy();
1016  return 1;
1017 }
1018 
1019 
1020 long
1022  // currently only children of demand elements can be moved
1023  if (myClickedDemandElement) {
1024  myFrameParent->myViewNet->getUndoList()->p_begin(("moving down " + myClickedDemandElement->getTagStr()).c_str());
1025  // move element one position front
1026  myFrameParent->myViewNet->getUndoList()->add(new GNEChange_Children(myClickedDemandElement->getParentDemandElements().at(0), myClickedDemandElement,
1027  GNEChange_Children::Operation::MOVE_FRONT), true);
1028  myFrameParent->myViewNet->getUndoList()->p_end();
1029  }
1030  // refresh after moving child
1031  refreshAttributeCarrierHierarchy();
1032  return 1;
1033 }
1034 
1035 
1036 void
1038  // first check that AC exist
1039  if (clickedAC) {
1040  // set current clicked AC
1041  myClickedAC = clickedAC;
1042  // cast all elements
1043  myClickedJunction = dynamic_cast<GNEJunction*>(clickedAC);
1044  myClickedEdge = dynamic_cast<GNEEdge*>(clickedAC);
1045  myClickedLane = dynamic_cast<GNELane*>(clickedAC);
1046  myClickedCrossing = dynamic_cast<GNECrossing*>(clickedAC);
1047  myClickedConnection = dynamic_cast<GNEConnection*>(clickedAC);
1048  myClickedShape = dynamic_cast<GNEShape*>(clickedAC);
1049  myClickedAdditional = dynamic_cast<GNEAdditional*>(clickedAC);
1050  myClickedDemandElement = dynamic_cast<GNEDemandElement*>(clickedAC);
1051  // create FXMenuPane
1052  FXMenuPane* pane = new FXMenuPane(myTreelist);
1053  // set item name and icon
1054  new MFXMenuHeader(pane, myFrameParent->myViewNet->getViewParent()->getGUIMainWindow()->getBoldFont(), myClickedAC->getPopUpID().c_str(), myClickedAC->getIcon());
1055  // insert separator
1056  new FXMenuSeparator(pane);
1057  // create center menu command
1058  FXMenuCommand* centerMenuCommand = new FXMenuCommand(pane, "Center", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), this, MID_GNE_CENTER);
1059  // disable Centering for Vehicle Types
1060  if (myClickedAC->getTagProperty().isVehicleType()) {
1061  centerMenuCommand->disable();
1062  }
1063  // create inspect and delete menu commands
1064  FXMenuCommand* inspectMenuCommand = new FXMenuCommand(pane, "Inspect", GUIIconSubSys::getIcon(ICON_MODEINSPECT), this, MID_GNE_INSPECT);
1065  FXMenuCommand* deleteMenuCommand = new FXMenuCommand(pane, "Delete", GUIIconSubSys::getIcon(ICON_MODEDELETE), this, MID_GNE_DELETE);
1066  // check if inspect and delete menu commands has to be disabled
1067  if ((myClickedAC->getTagProperty().isNetElement() && (myFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND)) ||
1068  (myClickedAC->getTagProperty().isDemandElement() && (myFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK))) {
1069  inspectMenuCommand->disable();
1070  deleteMenuCommand->disable();
1071  }
1072  // now chec if given AC support manually moving of their item up and down (Currently only for demand elements
1073  if (myClickedDemandElement && myClickedAC->getTagProperty().canBeSortedManually()) {
1074  // insert separator
1075  new FXMenuSeparator(pane);
1076  // create both moving menu commands
1077  FXMenuCommand* moveUpMenuCommand = new FXMenuCommand(pane, "Move up", GUIIconSubSys::getIcon(ICON_ARROW_UP), this, MID_GNE_ACHIERARCHY_MOVEUP);
1078  FXMenuCommand* moveDownMenuCommand = new FXMenuCommand(pane, "Move down", GUIIconSubSys::getIcon(ICON_ARROW_DOWN), this, MID_GNE_ACHIERARCHY_MOVEDOWN);
1079  // check if both commands has to be disabled
1080  if (myClickedDemandElement->getTagProperty().isPersonStop()) {
1081  moveUpMenuCommand->setText("Move up (Stops cannot be moved)");
1082  moveDownMenuCommand->setText("Move diwb (Stops cannot be moved)");
1083  moveUpMenuCommand->disable();
1084  moveDownMenuCommand->disable();
1085  } else {
1086  // check if moveUpMenuCommand has to be disabled
1087  if (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().front() == myClickedDemandElement) {
1088  moveUpMenuCommand->setText("Move up (It's already the first element)");
1089  moveUpMenuCommand->disable();
1090  } else if (myClickedDemandElement->getParentDemandElements().front()->getPreviousChildDemandElement(myClickedDemandElement)->getTagProperty().isPersonStop()) {
1091  moveUpMenuCommand->setText("Move up (Previous element is a Stop)");
1092  moveUpMenuCommand->disable();
1093  }
1094  // check if moveDownMenuCommand has to be disabled
1095  if (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().back() == myClickedDemandElement) {
1096  moveDownMenuCommand->setText("Move down (It's already the last element)");
1097  moveDownMenuCommand->disable();
1098  } else if (myClickedDemandElement->getParentDemandElements().front()->getNextChildDemandElement(myClickedDemandElement)->getTagProperty().isPersonStop()) {
1099  moveDownMenuCommand->setText("Move down (Next element is a Stop)");
1100  moveDownMenuCommand->disable();
1101  }
1102  }
1103  }
1104  // Center in the mouse position and create pane
1105  pane->setX(X);
1106  pane->setY(Y);
1107  pane->create();
1108  pane->show();
1109  } else {
1110  // set all clicked elements to null
1111  myClickedAC = nullptr;
1112  myClickedJunction = nullptr;
1113  myClickedEdge = nullptr;
1114  myClickedLane = nullptr;
1115  myClickedCrossing = nullptr;
1116  myClickedConnection = nullptr;
1117  myClickedShape = nullptr;
1118  myClickedAdditional = nullptr;
1119  myClickedDemandElement = nullptr;
1120  }
1121 }
1122 
1123 
1124 FXTreeItem*
1126  if (myAC->getTagProperty().isNetElement()) {
1127  // check demand element type
1128  switch (myAC->getTagProperty().getTag()) {
1129  case SUMO_TAG_EDGE: {
1130  // obtain Edge
1131  GNEEdge* edge = myFrameParent->myViewNet->getNet()->retrieveEdge(myAC->getID(), false);
1132  if (edge) {
1133  // insert Junctions of edge in tree (Pararell because a edge has always two Junctions)
1134  FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
1135  FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
1136  junctionDestinyItem->setExpanded(true);
1137  // Save items in myTreeItemToACMap
1138  myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource();
1139  myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny();
1140  // return junction destiny Item
1141  return junctionDestinyItem;
1142  } else {
1143  return nullptr;
1144  }
1145  }
1146  case SUMO_TAG_LANE: {
1147  // obtain lane
1148  GNELane* lane = myFrameParent->myViewNet->getNet()->retrieveLane(myAC->getID(), false);
1149  if (lane) {
1150  // obtain parent edge
1151  GNEEdge* edge = myFrameParent->myViewNet->getNet()->retrieveEdge(lane->getParentEdge()->getID());
1152  //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions)
1153  FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
1154  FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
1155  junctionDestinyItem->setExpanded(true);
1156  // Create edge item
1157  FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon());
1158  edgeItem->setExpanded(true);
1159  // Save items in myTreeItemToACMap
1160  myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource();
1161  myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny();
1162  myTreeItemToACMap[edgeItem] = edge;
1163  // return edge item
1164  return edgeItem;
1165  } else {
1166  return nullptr;
1167  }
1168  }
1169  case SUMO_TAG_CROSSING: {
1170  // obtain Crossing
1171  GNECrossing* crossing = myFrameParent->myViewNet->getNet()->retrieveCrossing(myAC->getID(), false);
1172  if (crossing) {
1173  // obtain junction
1174  GNEJunction* junction = crossing->getParentJunction();
1175  // create junction item
1176  FXTreeItem* junctionItem = myTreelist->insertItem(nullptr, nullptr, junction->getHierarchyName().c_str(), junction->getIcon(), junction->getIcon());
1177  junctionItem->setExpanded(true);
1178  // Save items in myTreeItemToACMap
1179  myTreeItemToACMap[junctionItem] = junction;
1180  // return junction Item
1181  return junctionItem;
1182  } else {
1183  return nullptr;
1184  }
1185  }
1186  case SUMO_TAG_CONNECTION: {
1187  // obtain Connection
1188  GNEConnection* connection = myFrameParent->myViewNet->getNet()->retrieveConnection(myAC->getID(), false);
1189  if (connection) {
1190  // create edge from item
1191  FXTreeItem* edgeFromItem = myTreelist->insertItem(nullptr, nullptr, connection->getEdgeFrom()->getHierarchyName().c_str(), connection->getEdgeFrom()->getIcon(), connection->getEdgeFrom()->getIcon());
1192  edgeFromItem->setExpanded(true);
1193  // create edge to item
1194  FXTreeItem* edgeToItem = myTreelist->insertItem(nullptr, nullptr, connection->getEdgeTo()->getHierarchyName().c_str(), connection->getEdgeTo()->getIcon(), connection->getEdgeTo()->getIcon());
1195  edgeToItem->setExpanded(true);
1196  // create connection item
1197  FXTreeItem* connectionItem = myTreelist->insertItem(nullptr, edgeToItem, connection->getHierarchyName().c_str(), connection->getIcon(), connection->getIcon());
1198  connectionItem->setExpanded(true);
1199  // Save items in myTreeItemToACMap
1200  myTreeItemToACMap[edgeFromItem] = connection->getEdgeFrom();
1201  myTreeItemToACMap[edgeToItem] = connection->getEdgeTo();
1202  myTreeItemToACMap[connectionItem] = connection;
1203  // return connection item
1204  return connectionItem;
1205  } else {
1206  return nullptr;
1207  }
1208  }
1209  default:
1210  break;
1211  }
1212  } else if (myAC->getTagProperty().getTag() == SUMO_TAG_POILANE) {
1213  // Obtain POILane
1214  GNEPOI* POILane = myFrameParent->myViewNet->getNet()->retrievePOI(myAC->getID(), false);
1215  if (POILane) {
1216  // obtain parent lane
1217  GNELane* lane = myFrameParent->myViewNet->getNet()->retrieveLane(POILane->getParentLanes().at(0)->getID());
1218  // obtain parent edge
1219  GNEEdge* edge = myFrameParent->myViewNet->getNet()->retrieveEdge(lane->getParentEdge()->getID());
1220  //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions)
1221  FXTreeItem* junctionSourceItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
1222  FXTreeItem* junctionDestinyItem = myTreelist->insertItem(nullptr, nullptr, (edge->getGNEJunctionSource()->getHierarchyName() + " destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
1223  junctionDestinyItem->setExpanded(true);
1224  // Create edge item
1225  FXTreeItem* edgeItem = myTreelist->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon());
1226  edgeItem->setExpanded(true);
1227  // Create lane item
1228  FXTreeItem* laneItem = myTreelist->insertItem(nullptr, edgeItem, lane->getHierarchyName().c_str(), lane->getIcon(), lane->getIcon());
1229  laneItem->setExpanded(true);
1230  // Save items in myTreeItemToACMap
1231  myTreeItemToACMap[junctionSourceItem] = edge->getGNEJunctionSource();
1232  myTreeItemToACMap[junctionDestinyItem] = edge->getGNEJunctionDestiny();
1233  myTreeItemToACMap[edgeItem] = edge;
1234  myTreeItemToACMap[laneItem] = lane;
1235  // return Lane item
1236  return laneItem;
1237  } else {
1238  return nullptr;
1239  }
1240  } else if (myAC->getTagProperty().isAdditional() || myAC->getTagProperty().isTAZ()) {
1241  // Obtain Additional
1242  GNEAdditional* additional = myFrameParent->myViewNet->getNet()->retrieveAdditional(myAC->getTagProperty().getTag(), myAC->getID(), false);
1243  if (additional) {
1244  // declare auxiliar FXTreeItem, due a demand element can have multiple "roots"
1245  FXTreeItem* root = nullptr;
1246  // check if there is demand elements parents
1247  if (additional->getParentAdditionals().size() > 0) {
1248  // check if we have more than one edge
1249  if (additional->getParentAdditionals().size() > 1) {
1250  // insert first item
1251  addListItem(additional->getParentAdditionals().front());
1252  // insert "spacer"
1253  if (additional->getParentAdditionals().size() > 2) {
1254  addListItem(nullptr, ("..." + toString((int)additional->getParentAdditionals().size() - 2) + " additionals...").c_str(), 0, false);
1255  }
1256  }
1257  // return last inserted item
1258  root = addListItem(additional->getParentAdditionals().back());
1259  }
1260  // check if there is parent demand elements
1261  if (additional->getParentDemandElements().size() > 0) {
1262  // check if we have more than one demand element
1263  if (additional->getParentDemandElements().size() > 1) {
1264  // insert first item
1265  addListItem(additional->getParentDemandElements().front());
1266  // insert "spacer"
1267  if (additional->getParentDemandElements().size() > 2) {
1268  addListItem(nullptr, ("..." + toString((int)additional->getParentDemandElements().size() - 2) + " demand elements...").c_str(), 0, false);
1269  }
1270  }
1271  // return last inserted item
1272  root = addListItem(additional->getParentDemandElements().back());
1273  }
1274  // check if there is parent edges
1275  if (additional->getParentEdges().size() > 0) {
1276  // check if we have more than one edge
1277  if (additional->getParentEdges().size() > 1) {
1278  // insert first item
1279  addListItem(additional->getParentEdges().front());
1280  // insert "spacer"
1281  if (additional->getParentEdges().size() > 2) {
1282  addListItem(nullptr, ("..." + toString((int)additional->getParentEdges().size() - 2) + " edges...").c_str(), 0, false);
1283  }
1284  }
1285  // return last inserted item
1286  root = addListItem(additional->getParentEdges().back());
1287  }
1288  // check if there is parent lanes
1289  if (additional->getParentLanes().size() > 0) {
1290  // check if we have more than one parent lane
1291  if (additional->getParentLanes().size() > 1) {
1292  // insert first item
1293  addListItem(additional->getParentLanes().front());
1294  // insert "spacer"
1295  if (additional->getParentLanes().size() > 2) {
1296  addListItem(nullptr, ("..." + toString((int)additional->getParentLanes().size() - 2) + " lanes...").c_str(), 0, false);
1297  }
1298  }
1299  // return last inserted item
1300  root = addListItem(additional->getParentLanes().back());
1301  }
1302  // return last inserted list item
1303  return root;
1304  }
1305  } else if (myAC->getTagProperty().isDemandElement()) {
1306  // Obtain DemandElement
1307  GNEDemandElement* demandElement = myFrameParent->myViewNet->getNet()->retrieveDemandElement(myAC->getTagProperty().getTag(), myAC->getID(), false);
1308  if (demandElement) {
1309  // declare auxiliar FXTreeItem, due a demand element can have multiple "roots"
1310  FXTreeItem* root = nullptr;
1311  // check if there is demand elements parents
1312  if (demandElement->getParentAdditionals().size() > 0) {
1313  // check if we have more than one edge
1314  if (demandElement->getParentAdditionals().size() > 1) {
1315  // insert first item
1316  addListItem(demandElement->getParentAdditionals().front());
1317  // insert "spacer"
1318  if (demandElement->getParentAdditionals().size() > 2) {
1319  addListItem(nullptr, ("..." + toString((int)demandElement->getParentAdditionals().size() - 2) + " additionals...").c_str(), 0, false);
1320  }
1321  }
1322  // return last inserted item
1323  root = addListItem(demandElement->getParentAdditionals().back());
1324  }
1325  // check if there is parent demand elements
1326  if (demandElement->getParentDemandElements().size() > 0) {
1327  // check if we have more than one demand element
1328  if (demandElement->getParentDemandElements().size() > 1) {
1329  // insert first item
1330  addListItem(demandElement->getParentDemandElements().front());
1331  // insert "spacer"
1332  if (demandElement->getParentDemandElements().size() > 2) {
1333  addListItem(nullptr, ("..." + toString((int)demandElement->getParentDemandElements().size() - 2) + " demand elements...").c_str(), 0, false);
1334  }
1335  }
1336  // return last inserted item
1337  root = addListItem(demandElement->getParentDemandElements().back());
1338  }
1339  // check if there is parent edges
1340  if (demandElement->getParentEdges().size() > 0) {
1341  // check if we have more than one edge
1342  if (demandElement->getParentEdges().size() > 1) {
1343  // insert first item
1344  addListItem(demandElement->getParentEdges().front());
1345  // insert "spacer"
1346  if (demandElement->getParentEdges().size() > 2) {
1347  addListItem(nullptr, ("..." + toString((int)demandElement->getParentEdges().size() - 2) + " edges...").c_str(), 0, false);
1348  }
1349  }
1350  // return last inserted item
1351  root = addListItem(demandElement->getParentEdges().back());
1352  }
1353  // check if there is parent lanes
1354  if (demandElement->getParentLanes().size() > 0) {
1355  // check if we have more than one parent lane
1356  if (demandElement->getParentLanes().size() > 1) {
1357  // insert first item
1358  addListItem(demandElement->getParentLanes().front());
1359  // insert "spacer"
1360  if (demandElement->getParentLanes().size() > 2) {
1361  addListItem(nullptr, ("..." + toString((int)demandElement->getParentLanes().size() - 2) + " lanes...").c_str(), 0, false);
1362  }
1363  }
1364  // return last inserted item
1365  root = addListItem(demandElement->getParentLanes().back());
1366  }
1367  // return last inserted list item
1368  return root;
1369  }
1370  }
1371  // there aren't parents
1372  return nullptr;
1373 }
1374 
1375 
1376 void
1378  if (AC->getTagProperty().isNetElement()) {
1379  // Switch gl type of ac
1380  switch (AC->getTagProperty().getTag()) {
1381  case SUMO_TAG_JUNCTION: {
1382  // retrieve junction
1383  GNEJunction* junction = myFrameParent->myViewNet->getNet()->retrieveJunction(AC->getID(), false);
1384  if (junction) {
1385  // insert junction item
1386  FXTreeItem* junctionItem = addListItem(AC, itemParent);
1387  // insert edges
1388  for (auto i : junction->getGNEEdges()) {
1389  showAttributeCarrierChildren(i, junctionItem);
1390  }
1391  // insert crossings
1392  for (auto i : junction->getGNECrossings()) {
1393  showAttributeCarrierChildren(i, junctionItem);
1394  }
1395  }
1396  break;
1397  }
1398  case SUMO_TAG_EDGE: {
1399  // retrieve edge
1400  GNEEdge* edge = myFrameParent->myViewNet->getNet()->retrieveEdge(AC->getID(), false);
1401  if (edge) {
1402  // insert edge item
1403  FXTreeItem* edgeItem = addListItem(AC, itemParent);
1404  // insert lanes
1405  for (const auto& i : edge->getLanes()) {
1406  showAttributeCarrierChildren(i, edgeItem);
1407  }
1408  // insert child shapes
1409  for (const auto& i : edge->getChildShapes()) {
1410  showAttributeCarrierChildren(i, edgeItem);
1411  }
1412  // insert child additional
1413  for (const auto& i : edge->getChildAdditionals()) {
1414  showAttributeCarrierChildren(i, edgeItem);
1415  }
1416  // insert demand elements children (note: use getChildDemandElementsSortedByType to avoid duplicated elements)
1417  for (const auto& i : edge->getChildDemandElementsSortedByType(SUMO_TAG_ROUTE)) {
1418  showAttributeCarrierChildren(i, edgeItem);
1419  }
1420  for (const auto& i : edge->getChildDemandElementsSortedByType(SUMO_TAG_TRIP)) {
1421  showAttributeCarrierChildren(i, edgeItem);
1422  }
1423  for (const auto& i : edge->getChildDemandElementsSortedByType(SUMO_TAG_FLOW)) {
1424  showAttributeCarrierChildren(i, edgeItem);
1425  }
1426  }
1427  break;
1428  }
1429  case SUMO_TAG_LANE: {
1430  // retrieve lane
1431  GNELane* lane = myFrameParent->myViewNet->getNet()->retrieveLane(AC->getID(), false);
1432  if (lane) {
1433  // insert lane item
1434  FXTreeItem* laneItem = addListItem(AC, itemParent);
1435  // insert child shapes
1436  for (const auto& i : lane->getChildShapes()) {
1437  showAttributeCarrierChildren(i, laneItem);
1438  }
1439  // insert child additional
1440  for (const auto& i : lane->getChildAdditionals()) {
1441  showAttributeCarrierChildren(i, laneItem);
1442  }
1443  // insert demand elements children
1444  for (const auto& i : lane->getChildDemandElements()) {
1445  showAttributeCarrierChildren(i, laneItem);
1446  }
1447  // insert incoming connections of lanes (by default isn't expanded)
1448  if (lane->getGNEIncomingConnections().size() > 0) {
1449  std::vector<GNEConnection*> incomingLaneConnections = lane->getGNEIncomingConnections();
1450  // insert intermediate list item
1451  FXTreeItem* incomingConnections = addListItem(laneItem, "Incomings", incomingLaneConnections.front()->getIcon(), false);
1452  // insert incoming connections
1453  for (auto i : incomingLaneConnections) {
1454  showAttributeCarrierChildren(i, incomingConnections);
1455  }
1456  }
1457  // insert outcoming connections of lanes (by default isn't expanded)
1458  if (lane->getGNEOutcomingConnections().size() > 0) {
1459  std::vector<GNEConnection*> outcomingLaneConnections = lane->getGNEOutcomingConnections();
1460  // insert intermediate list item
1461  FXTreeItem* outgoingConnections = addListItem(laneItem, "Outgoing", outcomingLaneConnections.front()->getIcon(), false);
1462  // insert outcoming connections
1463  for (auto i : outcomingLaneConnections) {
1464  showAttributeCarrierChildren(i, outgoingConnections);
1465  }
1466  }
1467  }
1468  break;
1469  }
1470  case SUMO_TAG_CROSSING:
1471  case SUMO_TAG_CONNECTION: {
1472  // insert connection item
1473  addListItem(AC, itemParent);
1474  break;
1475  }
1476  default:
1477  break;
1478  }
1479  } else if (AC->getTagProperty().isShape()) {
1480  // insert shape item
1481  addListItem(AC, itemParent);
1482  } else if (AC->getTagProperty().isAdditional() || AC->getTagProperty().isTAZ()) {
1483  // retrieve additional
1484  GNEAdditional* additional = myFrameParent->myViewNet->getNet()->retrieveAdditional(AC->getTagProperty().getTag(), AC->getID(), false);
1485  if (additional) {
1486  // insert additional item
1487  FXTreeItem* additionalItem = addListItem(AC, itemParent);
1488  // insert child edges
1489  for (const auto& i : additional->getChildEdges()) {
1490  showAttributeCarrierChildren(i, additionalItem);
1491  }
1492  // insert child lanes
1493  for (const auto& i : additional->getChildLanes()) {
1494  showAttributeCarrierChildren(i, additionalItem);
1495  }
1496  // insert child shapes
1497  for (const auto& i : additional->getChildShapes()) {
1498  showAttributeCarrierChildren(i, additionalItem);
1499  }
1500  // insert additionals children
1501  for (const auto& i : additional->getChildAdditionals()) {
1502  showAttributeCarrierChildren(i, additionalItem);
1503  }
1504  // insert child demand elements
1505  for (const auto& i : additional->getChildDemandElements()) {
1506  showAttributeCarrierChildren(i, additionalItem);
1507  }
1508  }
1509  } else if (AC->getTagProperty().isDemandElement()) {
1510  // retrieve demandElement
1511  GNEDemandElement* demandElement = myFrameParent->myViewNet->getNet()->retrieveDemandElement(AC->getTagProperty().getTag(), AC->getID(), false);
1512  if (demandElement) {
1513  // insert demandElement item
1514  FXTreeItem* demandElementItem = addListItem(AC, itemParent);
1515  // insert child edges
1516  for (const auto& i : demandElement->getChildEdges()) {
1517  showAttributeCarrierChildren(i, demandElementItem);
1518  }
1519  // insert child lanes
1520  for (const auto& i : demandElement->getChildLanes()) {
1521  showAttributeCarrierChildren(i, demandElementItem);
1522  }
1523  // insert child shapes
1524  for (const auto& i : demandElement->getChildShapes()) {
1525  showAttributeCarrierChildren(i, demandElementItem);
1526  }
1527  // insert additionals children
1528  for (const auto& i : demandElement->getChildAdditionals()) {
1529  showAttributeCarrierChildren(i, demandElementItem);
1530  }
1531  // insert child demand elements
1532  for (const auto& i : demandElement->getChildDemandElements()) {
1533  showAttributeCarrierChildren(i, demandElementItem);
1534  }
1535  }
1536  }
1537 }
1538 
1539 
1540 FXTreeItem*
1541 GNEFrameModuls::AttributeCarrierHierarchy::addListItem(GNEAttributeCarrier* AC, FXTreeItem* itemParent, std::string prefix, std::string sufix) {
1542  // insert item in Tree list
1543  FXTreeItem* item = myTreelist->insertItem(nullptr, itemParent, (prefix + AC->getHierarchyName() + sufix).c_str(), AC->getIcon(), AC->getIcon());
1544  // insert item in map
1545  myTreeItemToACMap[item] = AC;
1546  // by default item is expanded
1547  item->setExpanded(true);
1548  // return created FXTreeItem
1549  return item;
1550 }
1551 
1552 
1553 FXTreeItem*
1554 GNEFrameModuls::AttributeCarrierHierarchy::addListItem(FXTreeItem* itemParent, const std::string& text, FXIcon* icon, bool expanded) {
1555  // insert item in Tree list
1556  FXTreeItem* item = myTreelist->insertItem(nullptr, itemParent, text.c_str(), icon, icon);
1557  // expand item depending of flag expanded
1558  item->setExpanded(expanded);
1559  // return created FXTreeItem
1560  return item;
1561 }
1562 
1563 // ---------------------------------------------------------------------------
1564 // GNEFrameModuls::DrawingShape - methods
1565 // ---------------------------------------------------------------------------
1566 
1568  FXGroupBox(frameParent->myContentFrame, "Drawing", GUIDesignGroupBoxFrame),
1569  myFrameParent(frameParent),
1570  myDeleteLastCreatedPoint(false) {
1571  // create start and stop buttons
1572  myStartDrawingButton = new FXButton(this, "Start drawing", 0, this, MID_GNE_STARTDRAWING, GUIDesignButton);
1573  myStopDrawingButton = new FXButton(this, "Stop drawing", 0, this, MID_GNE_STOPDRAWING, GUIDesignButton);
1574  myAbortDrawingButton = new FXButton(this, "Abort drawing", 0, this, MID_GNE_ABORTDRAWING, GUIDesignButton);
1575 
1576  // create information label
1577  std::ostringstream information;
1578  information
1579  << "- 'Start drawing' or ENTER\n"
1580  << " draws shape boundary.\n"
1581  << "- 'Stop drawing' or ENTER\n"
1582  << " creates shape.\n"
1583  << "- 'Shift + Click'\n"
1584  << " removes last created point.\n"
1585  << "- 'Abort drawing' or ESC\n"
1586  << " removes drawed shape.";
1587  myInformationLabel = new FXLabel(this, information.str().c_str(), 0, GUIDesignLabelFrameInformation);
1588  // disable stop and abort functions as init
1589  myStopDrawingButton->disable();
1590  myAbortDrawingButton->disable();
1591 }
1592 
1593 
1595 
1596 
1598  // abort current drawing before show
1599  abortDrawing();
1600  // show FXGroupBox
1601  FXGroupBox::show();
1602 }
1603 
1604 
1606  // abort current drawing before hide
1607  abortDrawing();
1608  // show FXGroupBox
1609  FXGroupBox::hide();
1610 }
1611 
1612 
1613 void
1615  // Only start drawing if DrawingShape modul is shown
1616  if (shown()) {
1617  // change buttons
1618  myStartDrawingButton->disable();
1619  myStopDrawingButton->enable();
1620  myAbortDrawingButton->enable();
1621  }
1622 }
1623 
1624 
1625 void
1627  // try to build shape
1628  if (myFrameParent->shapeDrawed()) {
1629  // clear created points
1630  myTemporalShapeShape.clear();
1631  myFrameParent->myViewNet->update();
1632  // change buttons
1633  myStartDrawingButton->enable();
1634  myStopDrawingButton->disable();
1635  myAbortDrawingButton->disable();
1636  } else {
1637  // abort drawing if shape cannot be created
1638  abortDrawing();
1639  }
1640 }
1641 
1642 
1643 void
1645  // clear created points
1646  myTemporalShapeShape.clear();
1647  myFrameParent->myViewNet->update();
1648  // change buttons
1649  myStartDrawingButton->enable();
1650  myStopDrawingButton->disable();
1651  myAbortDrawingButton->disable();
1652 }
1653 
1654 
1655 void
1657  if (myStopDrawingButton->isEnabled()) {
1658  myTemporalShapeShape.push_back(P);
1659  } else {
1660  throw ProcessError("A new point cannot be added if drawing wasn't started");
1661  }
1662 }
1663 
1664 
1665 void
1667 
1668 }
1669 
1670 
1671 const PositionVector&
1673  return myTemporalShapeShape;
1674 }
1675 
1676 
1677 bool
1679  return myStopDrawingButton->isEnabled();
1680 }
1681 
1682 
1683 void
1685  myDeleteLastCreatedPoint = value;
1686 }
1687 
1688 
1689 bool
1691  return myDeleteLastCreatedPoint;
1692 }
1693 
1694 
1695 long
1697  startDrawing();
1698  return 0;
1699 }
1700 
1701 
1702 long
1703 GNEFrameModuls::DrawingShape::onCmdStopDrawing(FXObject*, FXSelector, void*) {
1704  stopDrawing();
1705  return 0;
1706 }
1707 
1708 
1709 long
1711  abortDrawing();
1712  return 0;
1713 }
1714 
1715 // ---------------------------------------------------------------------------
1716 // GNEFrameModuls::SelectorParent - methods
1717 // ---------------------------------------------------------------------------
1718 
1720  FXGroupBox(frameParent->myContentFrame, "Parent selector", GUIDesignGroupBoxFrame),
1721  myFrameParent(frameParent),
1722  myParentTag(SUMO_TAG_NOTHING) {
1723  // Create label with the type of SelectorParent
1724  myParentsLabel = new FXLabel(this, "No additional selected", nullptr, GUIDesignLabelLeftThick);
1725  // Create list
1727  // Hide List
1729 }
1730 
1731 
1733 
1734 
1735 std::string
1737  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1738  if (myParentsList->isItemSelected(i)) {
1739  return myParentsList->getItem(i)->getText().text();
1740  }
1741  }
1742  return "";
1743 }
1744 
1745 
1746 void
1748  // first unselect all
1749  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1750  myParentsList->getItem(i)->setSelected(false);
1751  }
1752  // select element if correspond to given ID
1753  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1754  if (myParentsList->getItem(i)->getText().text() == id) {
1755  myParentsList->getItem(i)->setSelected(true);
1756  }
1757  }
1758  // recalc myFirstParentsList
1759  myParentsList->recalc();
1760 }
1761 
1762 
1763 bool
1765  // make sure that we're editing an additional tag
1766  auto listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL, false);
1767  for (auto i : listOfTags) {
1768  if (i == additionalType) {
1769  myParentTag = additionalType;
1770  myParentsLabel->setText(("Parent type: " + toString(additionalType)).c_str());
1771  refreshSelectorParentModul();
1772  show();
1773  return true;
1774  }
1775  }
1776  return false;
1777 }
1778 
1779 
1780 void
1782  myParentTag = SUMO_TAG_NOTHING;
1783  hide();
1784 }
1785 
1786 
1787 void
1789  myParentsList->clearItems();
1790  if (myParentTag != SUMO_TAG_NOTHING) {
1791  // fill list with IDs of additionals
1792  for (const auto& i : myFrameParent->getViewNet()->getNet()->getAttributeCarriers().additionals.at(myParentTag)) {
1793  myParentsList->appendItem(i.first.c_str());
1794  }
1795  }
1796 }
1797 
1798 // ---------------------------------------------------------------------------
1799 // GNEFrameModuls::OverlappedInspection - methods
1800 // ---------------------------------------------------------------------------
1801 
1803  FXGroupBox(frameParent->myContentFrame, "Overlapped elements", GUIDesignGroupBoxFrame),
1804  myFrameParent(frameParent),
1805  myFilteredTag(SUMO_TAG_NOTHING),
1806  myItemIndex(0) {
1807  // build elements
1808  buildFXElements();
1809 }
1810 
1811 
1813  FXGroupBox(frameParent->myContentFrame, ("Overlapped " + toString(filteredTag) + "s").c_str(), GUIDesignGroupBoxFrame),
1814  myFrameParent(frameParent),
1815  myFilteredTag(filteredTag),
1816  myItemIndex(0) {
1817  // build elements
1818  buildFXElements();
1819 }
1820 
1821 
1823 
1824 
1825 void
1827  // first clear myOverlappedACs
1828  myOverlappedACs.clear();
1829  // check if we have to filter objects under cursor
1830  if (myFilteredTag == SUMO_TAG_NOTHING) {
1831  myOverlappedACs = objectsUnderCursor.getClickedAttributeCarriers();
1832  } else {
1833  // filter objects under cursor
1834  for (const auto& i : objectsUnderCursor.getClickedAttributeCarriers()) {
1835  if (i->getTagProperty().getTag() == myFilteredTag) {
1836  myOverlappedACs.push_back(i);
1837  }
1838  }
1839  }
1840  mySavedClickedPosition = clickedPosition;
1841  // by default we inspect first element
1842  myItemIndex = 0;
1843  // update text of current index button
1844  myCurrentIndexButton->setText(("1 / " + toString(myOverlappedACs.size())).c_str());
1845  // clear and fill list again
1846  myOverlappedElementList->clearItems();
1847  for (int i = 0; i < (int)myOverlappedACs.size(); i++) {
1848  myOverlappedElementList->insertItem(i, myOverlappedACs.at(i)->getID().c_str(), myOverlappedACs.at(i)->getIcon());
1849  }
1850  // set first element as selected element
1851  myOverlappedElementList->getItem(0)->setSelected(TRUE);
1852  // by default list hidden
1853  myOverlappedElementList->hide();
1854  // show template editor
1855  show();
1856 }
1857 
1858 
1859 void
1861  // hide modul
1862  hide();
1863 }
1864 
1865 
1866 bool
1868  return shown();
1869 }
1870 
1871 
1872 int
1874  return (int)myOverlappedACs.size();
1875 }
1876 
1877 
1878 bool
1880  return (mySavedClickedPosition.distanceSquaredTo2D(clickedPosition) < 0.25);
1881 }
1882 
1883 
1884 bool
1886  // first check if OverlappedInspection is shown
1887  if (shown()) {
1888  // check if given position is near saved position
1889  if (checkSavedPosition(clickedPosition)) {
1890  // inspect next element
1891  onCmdNextElement(0, 0, 0);
1892  return true;
1893  } else {
1894  return false;
1895  }
1896  } else {
1897  return false;
1898  }
1899 }
1900 
1901 
1902 bool
1904  // first check if OverlappedInspection is shown
1905  if (shown()) {
1906  // check if given position is near saved position
1907  if (checkSavedPosition(clickedPosition)) {
1908  // inspect previousElement
1909  onCmdPreviousElement(0, 0, 0);
1910  return true;
1911  } else {
1912  return false;
1913  }
1914  } else {
1915  return false;
1916  }
1917 }
1918 
1919 
1920 long
1922  // check if there is items
1923  if (myOverlappedElementList->getNumItems() > 0) {
1924  // unselect current list element
1925  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(FALSE);
1926  // set index (it works as a ring)
1927  if (myItemIndex > 0) {
1928  myItemIndex--;
1929  } else {
1930  myItemIndex = (myOverlappedACs.size() - 1);
1931  }
1932  // selected current list element
1933  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(TRUE);
1934  myOverlappedElementList->update();
1935  // update current index button
1936  myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str());
1937  // inspect overlapped attribute carrier
1938  myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
1939  // show OverlappedInspection again (because it's hidden in inspectSingleElement)
1940  show();
1941  }
1942  return 1;
1943 }
1944 
1945 
1946 long
1948  // check if there is items
1949  if (myOverlappedElementList->getNumItems() > 0) {
1950  // unselect current list element
1951  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(FALSE);
1952  // set index (it works as a ring)
1953  myItemIndex = (myItemIndex + 1) % myOverlappedACs.size();
1954  // selected current list element
1955  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(TRUE);
1956  myOverlappedElementList->update();
1957  // update current index button
1958  myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str());
1959  // inspect overlapped attribute carrier
1960  myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
1961  // show OverlappedInspection again (because it's hidden in inspectSingleElement)
1962  show();
1963  }
1964  return 1;
1965 }
1966 
1967 
1968 long
1970  // show or hidde element list
1971  if (myOverlappedElementList->shown()) {
1972  myOverlappedElementList->hide();
1973  } else {
1974  myOverlappedElementList->show();
1975  }
1976  myOverlappedElementList->recalc();
1977  // recalc and update frame
1978  recalc();
1979  return 1;
1980 }
1981 
1982 long
1984  for (int i = 0; i < myOverlappedElementList->getNumItems(); i++) {
1985  if (myOverlappedElementList->getItem(i)->isSelected()) {
1986  myItemIndex = i;
1987  // update current index button
1988  myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str());
1989  // inspect overlapped attribute carrier
1990  myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
1991  // show OverlappedInspection again (because it's hidden in inspectSingleElement)
1992  show();
1993  return 1;
1994  }
1995  }
1996  return 0;
1997 }
1998 
1999 
2000 long
2002  FXDialogBox* helpDialog = new FXDialogBox(this, "GEO attributes Help", GUIDesignDialogBox);
2003  std::ostringstream help;
2004  help
2005  << " - Click in the same position\n"
2006  << " for inspect next element\n"
2007  << " - Shift + Click in the same\n"
2008  << " position for inspect\n"
2009  << " previous element";
2010  new FXLabel(helpDialog, help.str().c_str(), nullptr, GUIDesignLabelFrameInformation);
2011  // "OK"
2012  new FXButton(helpDialog, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), helpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK);
2013  helpDialog->create();
2014  helpDialog->show();
2015  return 1;
2016 }
2017 
2018 
2020  myFilteredTag(SUMO_TAG_NOTHING) {
2021 }
2022 
2023 
2024 void
2026  FXHorizontalFrame* frameButtons = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
2027  // Create previous Item Button
2028  myPreviousElement = new FXButton(frameButtons, "", GUIIconSubSys::getIcon(ICON_BIGARROWLEFT), this, MID_GNE_OVERLAPPED_PREVIOUS, GUIDesignButtonIconRectangular);
2029  // create current index button
2030  myCurrentIndexButton = new FXButton(frameButtons, "", nullptr, this, MID_GNE_OVERLAPPED_SHOWLIST, GUIDesignButton);
2031  // Create next Item Button
2032  myNextElement = new FXButton(frameButtons, "", GUIIconSubSys::getIcon(ICON_BIGARROWRIGHT), this, MID_GNE_OVERLAPPED_NEXT, GUIDesignButtonIconRectangular);
2033  // Create list of overlapped elements (by default hidden)
2034  myOverlappedElementList = new FXList(this, this, MID_GNE_OVERLAPPED_ITEMSELECTED, GUIDesignListSingleElement);
2035  // disable vertical scrolling
2036  myOverlappedElementList->setScrollStyle(VSCROLLING_OFF);
2037  // by default list of overlapped elements is hidden)
2038  myOverlappedElementList->hide();
2039  // Create help button
2040  myHelpButton = new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular);
2041 }
2042 
2043 /****************************************************************************/
GNEFrameModuls::OverlappedInspection::getNumberOfOverlappedACs
int getNumberOfOverlappedACs() const
get number of overlapped ACSs
Definition: GNEFrameModuls.cpp:1873
GNEFrameModuls::EdgePathCreator::myFinishCreationButton
FXButton * myFinishCreationButton
button for finish route creation
Definition: GNEFrameModuls.h:256
MID_GNE_TAG_SELECTED
tag selected in ComboBox
Definition: GUIAppEnum.h:666
MID_GNE_OVERLAPPED_SHOWLIST
show list of overlapped elements
Definition: GUIAppEnum.h:698
GNEDemandElement::myViewNet
GNEViewNet * myViewNet
The GNEViewNet this demand element element belongs.
Definition: GNEDemandElement.h:376
GNEFrameModuls::SelectorParent::showSelectorParentModul
bool showSelectorParentModul(SumoXMLTag additionalTypeParent)
Show list of SelectorParent Modul.
Definition: GNEFrameModuls.cpp:1764
GNEFrameModuls::AttributeCarrierHierarchy::hideAttributeCarrierHierarchy
void hideAttributeCarrierHierarchy()
hide AttributeCarrierHierarchy
Definition: GNEFrameModuls.cpp:877
GUIDesignTreeListFrame
#define GUIDesignTreeListFrame
Tree list used in frames to represent elements children.
Definition: GUIDesigns.h:507
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:273
GLO_MAX
empty max
Definition: GUIGlObjectTypes.h:165
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:133
ICON_ACCEPT
Definition: GUIIcons.h:386
GNENet::retrieveAdditional
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
Definition: GNENet.cpp:2183
GNEAttributeCarrier::getIcon
FXIcon * getIcon() const
get FXIcon associated to this AC
Definition: GNEAttributeCarrier.cpp:1279
GNEFrameModuls::AttributeCarrierHierarchy::showAttributeCarrierHierarchy
void showAttributeCarrierHierarchy(GNEAttributeCarrier *AC)
show AttributeCarrierHierarchy
Definition: GNEFrameModuls.cpp:866
GNEFrameModuls::DrawingShape::DrawingShape
DrawingShape(GNEFrame *frameParent)
FOX-declaration.
Definition: GNEFrameModuls.cpp:1567
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:55
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNEFrameModuls::EdgePathCreator::~EdgePathCreator
~EdgePathCreator()
destructor
Definition: GNEFrameModuls.cpp:540
GNEFrameModuls::EdgePathCreator::finishEdgePathCreation
void finishEdgePathCreation()
finish edge path creation
Definition: GNEFrameModuls.cpp:759
GNEFrameModuls::AttributeCarrierHierarchy::addListItem
FXTreeItem * addListItem(GNEAttributeCarrier *AC, FXTreeItem *itemParent=nullptr, std::string prefix="", std::string sufix="")
add item into list
Definition: GNEFrameModuls.cpp:1541
MFXMenuHeader.h
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:317
GNEFrameModuls::DrawingShape::showDrawingShape
void showDrawingShape()
show Drawing mode
Definition: GNEFrameModuls.cpp:1597
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1289
GNEFrameModuls::EdgePathCreator::setVClass
void setVClass(SUMOVehicleClass vClass)
set SUMOVehicleClass
Definition: GNEFrameModuls.cpp:581
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
GNEFrameModuls::TagSelector::~TagSelector
~TagSelector()
destructor
Definition: GNEFrameModuls.cpp:187
GNEAttributeCarrier::TagProperties::isAdditional
bool isAdditional() const
return true if tag correspond to an additional
Definition: GNEAttributeCarrier.cpp:698
GNEFrameModuls::DrawingShape::setDeleteLastCreatedPoint
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
Definition: GNEFrameModuls.cpp:1684
GNENet::retrievePOI
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
Definition: GNENet.cpp:1115
GNEDemandElement::getRouteCalculatorInstance
static RouteCalculator * getRouteCalculatorInstance()
obtain instance of RouteCalculator
Definition: GNEDemandElement.cpp:280
GNEFrameModuls::AttributeCarrierHierarchy::onCmdShowChildMenu
long onCmdShowChildMenu(FXObject *, FXSelector, void *data)
Definition: GNEFrameModuls.cpp:908
DEFAULT_PEDTYPE_ID
const std::string DEFAULT_PEDTYPE_ID
GNEAttributeCarrier::TagProperties::isTAZ
bool isTAZ() const
return true if tag correspond to a TAZ
Definition: GNEAttributeCarrier.cpp:709
GNEHierarchicalChildElements::getChildDemandElements
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
Definition: GNEHierarchicalChildElements.cpp:296
GNEFrameModuls::EdgePathCreator::onCmdAbortRouteCreation
long onCmdAbortRouteCreation(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:775
MID_GNE_SET_TYPE
used to select a type of element in a combo box
Definition: GUIAppEnum.h:662
MID_GNE_ACHIERARCHY_SHOWCHILDMENU
In AttributeCarrierHierarchy list, show child menu.
Definition: GUIAppEnum.h:682
GNEHierarchicalParentElements::getParentEdges
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
Definition: GNEHierarchicalParentElements.cpp:181
GNEFrameModuls::DrawingShape::stopDrawing
void stopDrawing()
stop drawing and check if shape can be created
Definition: GNEFrameModuls.cpp:1626
GNEFrameModuls::OverlappedInspection
Definition: GNEFrameModuls.h:520
GNEFrameModuls::DemandElementSelector::setDemandElement
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
Definition: GNEFrameModuls.cpp:372
GNEFrameModuls::DemandElementSelector::isDemandElementSelectorShown
bool isDemandElementSelectorShown() const
check if demand element selector is shown
Definition: GNEFrameModuls.cpp:411
GNELane::getParentEdge
GNEEdge * getParentEdge() const
Returns underlying parent edge.
Definition: GNELane.cpp:1371
GNEHierarchicalChildElements::getChildEdges
const std::vector< GNEEdge * > & getChildEdges() const
get child edges
Definition: GNEHierarchicalChildElements.cpp:376
GNEFrameModuls::EdgePathCreator::showEdgePathCreator
void showEdgePathCreator()
show EdgePathCreator
Definition: GNEFrameModuls.cpp:555
GNEPOI
Definition: GNEPOI.h:44
GNEFrameModuls::SelectorParent::setIDSelected
void setIDSelected(const std::string &id)
select manually a element of the list
Definition: GNEFrameModuls.cpp:1747
GNEFrameModuls::AttributeCarrierHierarchy::onCmdInspectItem
long onCmdInspectItem(FXObject *, FXSelector, void *)
called when user click over option "inspect" of child menu
Definition: GNEFrameModuls.cpp:948
GNEAttributeCarrier::TagProperties::isNetElement
bool isNetElement() const
return true if tag correspond to a netElement
Definition: GNEAttributeCarrier.cpp:692
GNEFrameModuls::DrawingShape::addNewPoint
void addNewPoint(const Position &P)
add new point to temporal shape
Definition: GNEFrameModuls.cpp:1656
GNEFrameModuls::DrawingShape::myStopDrawingButton
FXButton * myStopDrawingButton
button for stop drawing
Definition: GNEFrameModuls.h:466
MID_GNE_OVERLAPPED_ITEMSELECTED
list item selected in overlapped modul
Definition: GUIAppEnum.h:700
GNEFrameModuls::AttributeCarrierHierarchy::showAttributeCarrierChildren
void showAttributeCarrierChildren(GNEAttributeCarrier *AC, FXTreeItem *itemParent)
show child of current attributeCarrier
Definition: GNEFrameModuls.cpp:1377
GNEFrameModuls::DemandElementSelector::refreshDemandElementSelector
void refreshDemandElementSelector()
refresh demand element selector
Definition: GNEFrameModuls.cpp:417
GNEFrameModuls::DrawingShape::myInformationLabel
FXLabel * myInformationLabel
Label with information.
Definition: GNEFrameModuls.h:472
SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:49
GUIDesignButtonOK
#define GUIDesignButtonOK
Definition: GUIDesigns.h:98
GNEFrameModuls::DemandElementSelector::showDemandElementSelector
void showDemandElementSelector()
show demand element selector
Definition: GNEFrameModuls.cpp:386
MID_GNE_OVERLAPPED_NEXT
inspect next element in overlapped modul
Definition: GUIAppEnum.h:694
GNEFrameModuls::EdgePathCreator::addBusStop
bool addBusStop(GNEAdditional *busStop)
add busStop to route
Definition: GNEFrameModuls.cpp:669
GUIDesignComboBoxNCol
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:217
GNENet::retrieveDemandElement
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
Definition: GNENet.cpp:2316
GNEFrame
Definition: GNEFrame.h:34
SUMO_TAG_PTYPE
description of a person type (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:123
GNEJunction::getGNECrossings
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
Definition: GNEJunction.cpp:493
GNEFrameModuls::OverlappedInspection::onCmdOverlappingHelp
long onCmdOverlappingHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
Definition: GNEFrameModuls.cpp:2001
GNEHierarchicalParentElements::getParentLanes
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
Definition: GNEHierarchicalParentElements.cpp:235
MID_GNE_EDGEPATH_ABORT
abort edge path creation
Definition: GUIAppEnum.h:676
GNEAttributeCarrier::TagProperties::isShape
bool isShape() const
return true if tag correspond to a shape
Definition: GNEAttributeCarrier.cpp:703
GNEFrameModuls::DemandElementSelector::~DemandElementSelector
~DemandElementSelector()
destructor
Definition: GNEFrameModuls.cpp:357
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
GNEFrameModuls::DrawingShape::hideDrawingShape
void hideDrawingShape()
hide Drawing mode
Definition: GNEFrameModuls.cpp:1605
GNEFrameModuls::OverlappedInspection::onCmdListItemSelected
long onCmdListItemSelected(FXObject *, FXSelector, void *)
called when a list item is selected
Definition: GNEFrameModuls.cpp:1983
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:43
GLHelper.h
GUIDesigns.h
ICON_BIGARROWLEFT
Definition: GUIIcons.h:185
SUMO_TAG_VTYPE
description of a vehicle type
Definition: SUMOXMLDefinitions.h:121
GNEFrameModuls::AttributeCarrierHierarchy::onCmdMoveItemUp
long onCmdMoveItemUp(FXObject *, FXSelector, void *)
called when user click over option "Move up" of child menu
Definition: GNEFrameModuls.cpp:1005
GNEConnection::getEdgeTo
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
Definition: GNEConnection.cpp:172
PositionVector
A list of positions.
Definition: PositionVector.h:45
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GNEFrameModuls::OverlappedInspection::OverlappedInspection
OverlappedInspection()
FOX needs this.
Definition: GNEFrameModuls.cpp:2019
GNEFrameModuls::DrawingShape::removeLastPoint
void removeLastPoint()
remove last added point
Definition: GNEFrameModuls.cpp:1666
MID_GNE_CENTER
center element
Definition: GUIAppEnum.h:656
GNEFrameModuls::DrawingShape::getDeleteLastCreatedPoint
bool getDeleteLastCreatedPoint()
get flag delete last created point
Definition: GNEFrameModuls.cpp:1690
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:621
GNEFrameModuls::TagSelector::setCurrentTagType
void setCurrentTagType(GNEAttributeCarrier::TagType tagType)
set current type manually
Definition: GNEFrameModuls.cpp:209
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:41
GUIDesignButton
#define GUIDesignButton
Definition: GUIDesigns.h:50
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:523
GNEFrameModuls::EdgePathCreator::addEdge
bool addEdge(GNEEdge *edge)
add edge to route
Definition: GNEFrameModuls.cpp:605
GNEAdditional::myViewNet
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
Definition: GNEAdditional.h:335
GUIAppEnum.h
GNEJunction.h
GNEFrameModuls::DrawingShape::myStartDrawingButton
FXButton * myStartDrawingButton
button for start drawing
Definition: GNEFrameModuls.h:463
GUIDesignLabelFrameInformation
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:194
GNEChange_Children
Definition: GNEChange_Children.h:40
GNEFrameModuls::EdgePathCreator
Definition: GNEFrameModuls.h:174
GNENetElement::getHierarchyName
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNENetElement.cpp:152
GUIDesignButtonRectangular
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons)
Definition: GUIDesigns.h:56
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEAttributeCarrier::getHierarchyName
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
MID_HELP
help button
Definition: GUIAppEnum.h:553
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:1014
GNEHierarchicalChildElements::getChildLanes
const std::vector< GNELane * > & getChildLanes() const
get child lanes
Definition: GNEHierarchicalChildElements.cpp:408
MID_GNE_TAGTYPE_SELECTED
tag type selected in ComboBox
Definition: GUIAppEnum.h:664
GNEHierarchicalParentElements::getParentAdditionals
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
Definition: GNEHierarchicalParentElements.cpp:85
GNEFrameModuls::AttributeCarrierHierarchy::myTreelist
FXTreeList * myTreelist
tree list to show the children of the element to erase
Definition: GNEFrameModuls.h:380
GNEFrameModuls::AttributeCarrierHierarchy::AttributeCarrierHierarchy
AttributeCarrierHierarchy(GNEFrame *frameParent)
FOX-declaration.
Definition: GNEFrameModuls.cpp:843
ICON_MODEDELETE
Definition: GUIIcons.h:225
GNEFrameModuls::OverlappedInspection::overlappedInspectionShown
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
Definition: GNEFrameModuls.cpp:1867
GNEFrameModuls::AttributeCarrierHierarchy::onCmdCenterItem
long onCmdCenterItem(FXObject *, FXSelector, void *)
called when user click over option "center" of child Menu
Definition: GNEFrameModuls.cpp:922
GNEFrameModuls::OverlappedInspection::nextElement
bool nextElement(const Position &clickedPosition)
try to go to next element if clicked position is near to saved position
Definition: GNEFrameModuls.cpp:1885
GNEFrameModuls::AttributeCarrierHierarchy::createPopUpMenu
void createPopUpMenu(int X, int Y, GNEAttributeCarrier *clickedAC)
Definition: GNEFrameModuls.cpp:1037
SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
Definition: SUMOXMLDefinitions.h:149
GNECrossing
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:44
GNETAZ.h
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1273
GNEHierarchicalParentElements::getParentDemandElements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
Definition: GNEHierarchicalParentElements.cpp:114
GNEFrameModuls::EdgePathCreator::EdgePathCreator
EdgePathCreator(GNEFrame *frameParent, int edgePathCreatorModes)
default constructor
Definition: GNEFrameModuls.cpp:519
GNEAttributeCarrier::allowedTagsByCategory
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGTYPE_NETELEMENT,...
Definition: GNEAttributeCarrier.cpp:1333
SUMO_TAG_POILANE
begin/end of the description of a Point of interest over Lane (used by Netedit)
Definition: SUMOXMLDefinitions.h:55
RGBColor::ORANGE
static const RGBColor ORANGE
Definition: RGBColor.h:195
GNEFrameModuls::AttributeCarrierHierarchy::~AttributeCarrierHierarchy
~AttributeCarrierHierarchy()
destructor
Definition: GNEFrameModuls.cpp:862
GNEFrameModuls::EdgePathCreator::hideEdgePathCreator
void hideEdgePathCreator()
show EdgePathCreator
Definition: GNEFrameModuls.cpp:566
GNEConnection::getEdgeFrom
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
Definition: GNEConnection.cpp:166
GNEEdge::getNBEdge
NBEdge * getNBEdge() const
returns the internal NBEdge
Definition: GNEEdge.cpp:631
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:148
GNEFrameModuls::DemandElementSelector
Definition: GNEFrameModuls.h:112
GNEFrameModuls::EdgePathCreator::edgePathCreatorName
void edgePathCreatorName(const std::string &name)
update EdgePathCreator name
Definition: GNEFrameModuls.cpp:544
FXDEFMAP
FXDEFMAP(GNEFrameModuls::TagSelector) TagSelectorMap[]
GNEFrameModuls::TagSelector
Definition: GNEFrameModuls.h:44
GNEHierarchicalChildElements::getChildShapes
const std::vector< GNEShape * > & getChildShapes() const
get child shapes
Definition: GNEHierarchicalChildElements.cpp:444
GNEDemandElement.h
GNEAttributeCarrier::TagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNEAttributeCarrier.cpp:715
DEFAULT_VTYPE_ID
const std::string DEFAULT_VTYPE_ID
GNEViewNet.h
SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:159
GNEFrameModuls::OverlappedInspection::buildFXElements
void buildFXElements()
build Fox Toolkit elemements
Definition: GNEFrameModuls.cpp:2025
GNEFrameModuls::DemandElementSelector::getCurrentDemandElement
GNEDemandElement * getCurrentDemandElement() const
get current demand element
Definition: GNEFrameModuls.cpp:361
GNEFrameModuls::AttributeCarrierHierarchy::onCmdDeleteItem
long onCmdDeleteItem(FXObject *, FXSelector, void *)
called when user click over option "delete" of child menu
Definition: GNEFrameModuls.cpp:957
GNEFrameModuls::EdgePathCreator::setEdgePathCreatorModes
void setEdgePathCreatorModes(int edgePathCreatorModes)
set EdgePathCreatorModes
Definition: GNEFrameModuls.cpp:587
SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:47
GNEFrameModuls::DrawingShape
Definition: GNEFrameModuls.h:393
GNE_SUPERMODE_NETWORK
Network mode (Edges, junctions, etc..)
Definition: GNEViewNetHelper.h:46
ProcessError
Definition: UtilExceptions.h:39
GNENet::retrieveJunction
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
Definition: GNENet.cpp:1050
GNEFrameModuls::DrawingShape::startDrawing
void startDrawing()
start drawing
Definition: GNEFrameModuls.cpp:1614
MID_GNE_ACHIERARCHY_MOVEUP
In AttributeCarrierHierarchy list, move element to up.
Definition: GUIAppEnum.h:684
GNEFrameModuls::DemandElementSelector::getAllowedTags
const std::vector< SumoXMLTag > & getAllowedTags() const
Definition: GNEFrameModuls.cpp:367
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GNEApplicationWindow.h
GNEEdge.h
GUIDesignButtonIconRectangular
#define GUIDesignButtonIconRectangular
button only with icon (46x23)
Definition: GUIDesigns.h:62
MID_GNE_ABORTDRAWING
abort drawing polygon
Definition: GUIAppEnum.h:692
GNEFrameModuls::DrawingShape::onCmdStartDrawing
long onCmdStartDrawing(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:1696
GNEFrameModuls::AttributeCarrierHierarchy
Definition: GNEFrameModuls.h:287
GNEFrameModuls::OverlappedInspection::showOverlappedInspection
void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
show template editor
Definition: GNEFrameModuls.cpp:1826
GLHelper::drawLine
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
Definition: GLHelper.cpp:274
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:239
GNEFrameModuls::TagSelector::getCurrentTagProperties
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
Definition: GNEFrameModuls.cpp:203
GNEShape::getNet
GNENet * getNet() const
get Net in which this element is placed
Definition: GNEShape.cpp:61
GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
Definition: SUMOXMLDefinitions.h:1005
GNEFrameModuls::EdgePathCreator::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNEFrameModuls.cpp:699
GNEFrameModuls::EdgePathCreator::restoreEdgeColor
void restoreEdgeColor(const GNEEdge *edge)
restore colors of given edge
Definition: GNEFrameModuls.cpp:832
GNELane::getGNEIncomingConnections
std::vector< GNEConnection * > getGNEIncomingConnections()
returns a vector with the incoming GNEConnections of this lane
Definition: GNELane.cpp:1377
GNEEdge::getGNEJunctionDestiny
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
Definition: GNEEdge.cpp:493
GNEFrameModuls::AttributeCarrierHierarchy::onCmdMoveItemDown
long onCmdMoveItemDown(FXObject *, FXSelector, void *)
called when user click over option "Move down" of child menu
Definition: GNEFrameModuls.cpp:1021
GNECrossing.h
GNEEdge::getLanes
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
Definition: GNEEdge.cpp:874
MID_GNE_STARTDRAWING
start drawing polygon
Definition: GUIAppEnum.h:688
GNELane.h
GNEFrameModuls::SelectorParent::getIdSelected
std::string getIdSelected() const
get currently parent additional selected
Definition: GNEFrameModuls.cpp:1736
GNEFrameModuls::DemandElementSelector::onCmdSelectDemandElement
long onCmdSelectDemandElement(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:487
GNEFrameModuls::EdgePathCreator::myRemoveLastInsertedEdge
FXButton * myRemoveLastInsertedEdge
button for removing last inserted edge
Definition: GNEFrameModuls.h:262
NBEdge::getLanes
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
Definition: NBEdge.h:656
GNEFrameModuls::OverlappedInspection::onCmdPreviousElement
long onCmdPreviousElement(FXObject *, FXSelector, void *)
Inspect previous element (from top to bot)
Definition: GNEFrameModuls.cpp:1921
GNEFrameModuls::DrawingShape::onCmdAbortDrawing
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
Definition: GNEFrameModuls.cpp:1710
GNEFrameModuls::EdgePathCreator::clearEdges
void clearEdges()
clear edges (and restore colors)
Definition: GNEFrameModuls.cpp:680
GNEFrameModuls::TagSelector::hideTagSelector
void hideTagSelector()
hide item selector
Definition: GNEFrameModuls.cpp:197
GNELane::getGNEOutcomingConnections
std::vector< GNEConnection * > getGNEOutcomingConnections()
returns a vector with the outgoing GNEConnections of this lane
Definition: GNELane.cpp:1398
GNEFrameModuls::DrawingShape::~DrawingShape
~DrawingShape()
destructor
Definition: GNEFrameModuls.cpp:1594
GNEViewParent.h
MID_GNE_STOPDRAWING
stop drawing polygon
Definition: GUIAppEnum.h:690
GNEAdditional::setSpecialColor
void setSpecialColor(const RGBColor *color)
set special color
Definition: GNEAdditional.cpp:118
GLIncludes.h
GNEEdge::getGNEJunctionSource
GNEJunction * getGNEJunctionSource() const
returns the source-junction
Definition: GNEEdge.cpp:487
GNEFrameModuls::SelectorParent::SelectorParent
SelectorParent(GNEFrame *frameParent)
constructor
Definition: GNEFrameModuls.cpp:1719
GUIDesignListSingleElementFixedHeight
#define GUIDesignListSingleElementFixedHeight
design for FXLists that only allow a single selected elements selected and height fixed
Definition: GUIDesigns.h:519
GNENet::retrieveCrossing
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
Definition: GNENet.cpp:1164
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GNEAttributeCarrier::TagType
TagType
Definition: GNEAttributeCarrier.h:273
SUMO_TAG_BUS_STOP
A bus stop.
Definition: SUMOXMLDefinitions.h:97
GNEFrameModuls::TagSelector::setCurrentTag
void setCurrentTag(SumoXMLTag newTag)
set current type manually
Definition: GNEFrameModuls.cpp:234
GNEFrameModuls::TagSelector::onCmdSelectTag
long onCmdSelectTag(FXObject *, FXSelector, void *)
Called when the user select an elementin ComboBox.
Definition: GNEFrameModuls.cpp:295
GNEFrameModuls::AttributeCarrierHierarchy::showAttributeCarrierParents
FXTreeItem * showAttributeCarrierParents()
show child of current attributeCarrier
Definition: GNEFrameModuls.cpp:1125
GNEHierarchicalChildElements::getChildDemandElementsSortedByType
const std::set< GNEDemandElement * > & getChildDemandElementsSortedByType(SumoXMLTag tag) const
return child demand elements sorted by type
Definition: GNEHierarchicalChildElements.cpp:302
GNECrossing::getParentJunction
GNEJunction * getParentJunction() const
get parent Junction
Definition: GNECrossing.cpp:92
GUIDesignLabelLeftThick
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left and height of 23
Definition: GUIDesigns.h:161
MID_GNE_ACHIERARCHY_MOVEDOWN
In AttributeCarrierHierarchy list, move element to down.
Definition: GUIAppEnum.h:686
SUMO_TAG_CROSSING
crossing between edges for pedestrians
Definition: SUMOXMLDefinitions.h:226
GNEJunction::getGNEEdges
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
Definition: GNEJunction.cpp:475
GNEFrameModuls::DrawingShape::abortDrawing
void abortDrawing()
abort drawing
Definition: GNEFrameModuls.cpp:1644
GNENetElement::getNet
GNENet * getNet() const
get Net in which this element is placed
Definition: GNENetElement.cpp:58
MID_GNE_OVERLAPPED_PREVIOUS
inspect previous element in overlapped modul
Definition: GUIAppEnum.h:696
GNE_SUPERMODE_DEMAND
Demanding mode (Routes, Vehicles etc..)
Definition: GNEViewNetHelper.h:48
GNEFrameModuls::TagSelector::refreshTagProperties
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
Definition: GNEFrameModuls.cpp:251
GNEFrameModuls::OverlappedInspection::onCmdNextElement
long onCmdNextElement(FXObject *, FXSelector, void *)
Inspect next Element (from top to bot)
Definition: GNEFrameModuls.cpp:1947
GNEFrameModuls::TagSelector::onCmdSelectTagType
long onCmdSelectTagType(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:257
GUIDesignComboBox
#define GUIDesignComboBox
Definition: GUIDesigns.h:205
ICON_ARROW_DOWN
Definition: GUIIcons.h:192
ICON_RECENTERVIEW
Definition: GUIIcons.h:68
SUMO_TAG_CONNECTION
connectio between two lanes
Definition: SUMOXMLDefinitions.h:202
ICON_BIGARROWRIGHT
Definition: GUIIcons.h:186
GNEFrameModuls::OverlappedInspection::hideOverlappedInspection
void hideOverlappedInspection()
hide template editor
Definition: GNEFrameModuls.cpp:1860
GNEFrameModuls::OverlappedInspection::checkSavedPosition
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
Definition: GNEFrameModuls.cpp:1879
GNEFrameModuls
Definition: GNEFrameModuls.h:37
GNENet::retrieveEdge
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:1069
GNEConnection
Definition: GNEConnection.h:38
SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:125
GNEFrameModuls::DrawingShape::isDrawing
bool isDrawing() const
return true if currently a shape is drawed
Definition: GNEFrameModuls.cpp:1678
GNENet::retrieveLane
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
Definition: GNENet.cpp:1228
ICON_MODEINSPECT
Definition: GUIIcons.h:226
config.h
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1298
GNENet::retrieveConnection
GNEConnection * retrieveConnection(const std::string &id, bool failHard=true) const
get Connection by id
Definition: GNENet.cpp:1128
GNEFrameModuls::DemandElementSelector::hideDemandElementSelector
void hideDemandElementSelector()
hide demand element selector
Definition: GNEFrameModuls.cpp:405
GNEFrameModuls::EdgePathCreator::abortEdgePathCreation
void abortEdgePathCreation()
abort edge path creation
Definition: GNEFrameModuls.cpp:751
GNEFrameModuls::DrawingShape::onCmdStopDrawing
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
Definition: GNEFrameModuls.cpp:1703
GNEViewNetHelper::ObjectsUnderCursor::getClickedAttributeCarriers
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
Definition: GNEViewNetHelper.cpp:338
GNEFrameModuls::DemandElementSelector::DemandElementSelector
DemandElementSelector(GNEFrame *frameParent, SumoXMLTag demandElementTag)
FOX-declaration.
Definition: GNEFrameModuls.cpp:325
GNEDemandElement::RouteCalculator::calculateDijkstraRoute
std::vector< GNEEdge * > calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra route between a list of partial edges
Definition: GNEDemandElement.cpp:76
GNEFrameModuls::EdgePathCreator::myAbortCreationButton
FXButton * myAbortCreationButton
button for abort route creation
Definition: GNEFrameModuls.h:259
GNEFrameModuls::SelectorParent::~SelectorParent
~SelectorParent()
destructor
Definition: GNEFrameModuls.cpp:1732
GNEFrameModuls::OverlappedInspection::previousElement
bool previousElement(const Position &clickedPosition)
try to go to previous element if clicked position is near to saved position
Definition: GNEFrameModuls.cpp:1903
MID_GNE_DELETE
delete element
Definition: GUIAppEnum.h:650
GNEInspectorFrame.h
GNEFrameModuls::EdgePathCreator::getClickedEdges
std::vector< GNEEdge * > getClickedEdges() const
get current clicked edges
Definition: GNEFrameModuls.cpp:593
GNEPOI.h
GNEFrameModuls::AttributeCarrierHierarchy::refreshAttributeCarrierHierarchy
void refreshAttributeCarrierHierarchy()
refresh AttributeCarrierHierarchy
Definition: GNEFrameModuls.cpp:895
GNEFrameModuls::TagSelector::showTagSelector
void showTagSelector()
show item selector
Definition: GNEFrameModuls.cpp:191
GNEFrameModuls.h
MID_GNE_EDGEPATH_FINISH
finish edge path creation
Definition: GUIAppEnum.h:678
GNEFrameModuls::SelectorParent::myParentsList
FXList * myParentsList
List of parents.
Definition: GNEFrameModuls.h:513
GNEFrameModuls::SelectorParent::myParentsLabel
FXLabel * myParentsLabel
Label with parent name.
Definition: GNEFrameModuls.h:510
GNEJunction
Definition: GNEJunction.h:47
DEFAULT_BIKETYPE_ID
const std::string DEFAULT_BIKETYPE_ID
GNEFrameModuls::DemandElementSelector::myDemandElementTags
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
Definition: GNEFrameModuls.h:167
GNEFrameModuls::EdgePathCreator::onCmdFinishRouteCreation
long onCmdFinishRouteCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Finish route creation".
Definition: GNEFrameModuls.cpp:787
GUIDesignListSingleElement
#define GUIDesignListSingleElement
design for FXList sthat only allow a single selected elements selected
Definition: GUIDesigns.h:513
ICON_ARROW_UP
Definition: GUIIcons.h:191
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:284
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
GNEFrameModuls::EdgePathCreator::getClickedBusStop
GNEAdditional * getClickedBusStop() const
get current clicked edges
Definition: GNEFrameModuls.cpp:599
GNEHierarchicalChildElements::getChildAdditionals
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
Definition: GNEHierarchicalChildElements.cpp:131
GNEFrameModuls::EdgePathCreator::onCmdRemoveLastInsertedElement
long onCmdRemoveLastInsertedElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted edge/busStop".
Definition: GNEFrameModuls.cpp:811
MFXMenuHeader
Definition: MFXMenuHeader.h:27
GNEFrameModuls::SelectorParent::refreshSelectorParentModul
void refreshSelectorParentModul()
Refresh list of Additional Parents Modul.
Definition: GNEFrameModuls.cpp:1788
GNENet.h
GNEFrameModuls::SelectorParent::hideSelectorParentModul
void hideSelectorParentModul()
hide SelectorParent Modul
Definition: GNEFrameModuls.cpp:1781
SUMO_TAG_TRIP
a single trip definition (used by router)
Definition: SUMOXMLDefinitions.h:145
GNEChange_Children.h
MID_GNE_EDGEPATH_REMOVELAST
remove last inserted element in path
Definition: GUIAppEnum.h:680
GNEFrameModuls::DrawingShape::getTemporalShape
const PositionVector & getTemporalShape() const
get Temporal shape
Definition: GNEFrameModuls.cpp:1672
GNEFrameModuls::OverlappedInspection::~OverlappedInspection
~OverlappedInspection()
destructor
Definition: GNEFrameModuls.cpp:1822
SUMO_TAG_JUNCTION
begin/end of the description of a junction
Definition: SUMOXMLDefinitions.h:59
GNEUndoList.h
GNEFrameModuls::EdgePathCreator::removeLastInsertedElement
void removeLastInsertedElement()
remove last added element (either a BusStop or an edge)
Definition: GNEFrameModuls.cpp:767
MID_GNE_INSPECT
inspect element
Definition: GUIAppEnum.h:652
GNEFrameModuls::DrawingShape::myAbortDrawingButton
FXButton * myAbortDrawingButton
button for abort drawing
Definition: GNEFrameModuls.h:469
GUIDesignDialogBox
#define GUIDesignDialogBox
Definition: GUIDesigns.h:433
GNEFrameModuls::DemandElementSelector::myDemandElementsMatchBox
FXComboBox * myDemandElementsMatchBox
comboBox with the list of elements type
Definition: GNEFrameModuls.h:161
GNEConnection.h
GNEFrameModuls::OverlappedInspection::onCmdShowList
long onCmdShowList(FXObject *, FXSelector, void *)
show list of overlapped elements
Definition: GNEFrameModuls.cpp:1969