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-2021 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // Auxiliar class for GNEFrame Moduls
19 /****************************************************************************/
20 #include <config.h>
21 
23 #include <netedit/GNENet.h>
24 #include <netedit/GNEUndoList.h>
25 #include <netedit/GNEViewNet.h>
26 #include <netedit/GNEViewParent.h>
72 #include <utils/gui/div/GLHelper.h>
76 
77 #include "GNEFrameModuls.h"
78 
79 
80 // ===========================================================================
81 // FOX callback mapping
82 // ===========================================================================
83 
84 FXDEFMAP(GNEFrameModuls::TagSelector) TagSelectorMap[] = {
86 };
87 
88 FXDEFMAP(GNEFrameModuls::DemandElementSelector) DemandElementSelectorMap[] = {
90 };
91 
92 FXDEFMAP(GNEFrameModuls::HierarchicalElementTree) HierarchicalElementTreeMap[] = {
99 };
100 
101 FXDEFMAP(GNEFrameModuls::DrawingShape) DrawingShapeMap[] = {
105 };
106 
107 FXDEFMAP(GNEFrameModuls::OverlappedInspection) OverlappedInspectionMap[] = {
113 };
114 
115 FXDEFMAP(GNEFrameModuls::PathCreator) PathCreatorMap[] = {
120 };
121 
122 
123 // Object implementation
124 FXIMPLEMENT(GNEFrameModuls::TagSelector, FXGroupBoxModule, TagSelectorMap, ARRAYNUMBER(TagSelectorMap))
125 FXIMPLEMENT(GNEFrameModuls::DemandElementSelector, FXGroupBoxModule, DemandElementSelectorMap, ARRAYNUMBER(DemandElementSelectorMap))
126 FXIMPLEMENT(GNEFrameModuls::HierarchicalElementTree, FXGroupBoxModule, HierarchicalElementTreeMap, ARRAYNUMBER(HierarchicalElementTreeMap))
127 FXIMPLEMENT(GNEFrameModuls::DrawingShape, FXGroupBoxModule, DrawingShapeMap, ARRAYNUMBER(DrawingShapeMap))
128 FXIMPLEMENT(GNEFrameModuls::OverlappedInspection, FXGroupBoxModule, OverlappedInspectionMap, ARRAYNUMBER(OverlappedInspectionMap))
129 FXIMPLEMENT(GNEFrameModuls::PathCreator, FXGroupBoxModule, PathCreatorMap, ARRAYNUMBER(PathCreatorMap))
130 
131 
132 // ===========================================================================
133 // method definitions
134 // ===========================================================================
135 
136 // ---------------------------------------------------------------------------
137 // GNEFrameModuls::TagSelector - methods
138 // ---------------------------------------------------------------------------
139 
140 GNEFrameModuls::TagSelector::TagSelector(GNEFrame* frameParent, GNETagProperties::TagType type, SumoXMLTag tag, bool onlyDrawables) :
141  FXGroupBoxModule(frameParent->myContentFrame, "Element"),
142  myFrameParent(frameParent),
143  myTagType(type),
144  myCurrentTemplateAC(nullptr) {
145  // Create MFXIconComboBox
146  myTagsMatchBox = new MFXIconComboBox(getCollapsableFrame(), GUIDesignComboBoxNCol, this, MID_GNE_TAG_SELECTED, GUIDesignComboBox);
147  // set current tag type without notifying
148  setCurrentTagType(myTagType, onlyDrawables, false);
149  // set current tag without notifying
150  setCurrentTag(tag, false);
151  // TagSelector is always shown
152  show();
153 }
154 
155 
157  // clear myACTemplates and myTagsMatchBox
158  for (const auto &ACTemplate : myACTemplates) {
159  delete ACTemplate;
160  }
161  myACTemplates.clear();
162 }
163 
164 
165 void
167  show();
168 }
169 
170 
171 void
173  hide();
174 }
175 
176 
179  return myCurrentTemplateAC;
180 }
181 
182 
183 void
184 GNEFrameModuls::TagSelector::setCurrentTagType(GNETagProperties::TagType tagType, const bool onlyDrawables, const bool notifyFrameParent) {
185  // check if net has proj
186  const bool proj = (GeoConvHelper::getFinal().getProjString() != "!");
187  // set new tagType
188  myTagType = tagType;
189  // change TagSelector text
190  switch (myTagType) {
191  case GNETagProperties::TagType::NETWORKELEMENT:
192  setText("network elements");
193  break;
194  case GNETagProperties::TagType::ADDITIONALELEMENT:
195  setText("Additional elements");
196  break;
197  case GNETagProperties::TagType::SHAPE:
198  setText("Shape elements");
199  break;
200  case GNETagProperties::TagType::TAZELEMENT:
201  setText("TAZ elements");
202  break;
203  case GNETagProperties::TagType::VEHICLE:
204  setText("Vehicles");
205  break;
206  case GNETagProperties::TagType::STOP:
207  setText("Stops");
208  break;
209  case GNETagProperties::TagType::PERSON:
210  setText("Persons");
211  break;
212  case GNETagProperties::TagType::PERSONPLAN:
213  setText("Person plans");
214  break;
215  case GNETagProperties::TagType::CONTAINER:
216  setText("Container");
217  break;
218  case GNETagProperties::TagType::CONTAINERPLAN:
219  setText("Container plans");
220  break;
221  case GNETagProperties::TagType::PERSONTRIP:
222  setText("Person trips");
223  break;
224  case GNETagProperties::TagType::WALK:
225  setText("Walks");
226  break;
227  case GNETagProperties::TagType::RIDE:
228  setText("Rides");
229  break;
230  case GNETagProperties::TagType::STOPPERSON:
231  setText("Person stops");
232  break;
233  default:
234  throw ProcessError("invalid tag property");
235  }
236  // clear myACTemplates and myTagsMatchBox
237  for (const auto &ACTemplate : myACTemplates) {
238  delete ACTemplate;
239  }
240  myACTemplates.clear();
241  myTagsMatchBox->clearItems();
242  // get tag properties
243  const auto tagProperties = GNEAttributeCarrier::getTagPropertiesByType(myTagType);
244  // fill myACTemplates and myTagsMatchBox
245  for (const auto &tagProperty : tagProperties) {
246  if ((!onlyDrawables || tagProperty.isDrawable()) && (!tagProperty.requireProj() || proj)) {
247  myACTemplates.push_back(new ACTemplate(myFrameParent->getViewNet()->getNet(), tagProperty));
248  myTagsMatchBox->appendIconItem(tagProperty.getFieldString().c_str(), GUIIconSubSys::getIcon(tagProperty.getGUIIcon()), tagProperty.getBackGroundColor());
249  }
250  }
251  // set color of myTypeMatchBox to black (valid)
252  myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
253  // Set visible items
254  myTagsMatchBox->setNumVisible((int)myTagsMatchBox->getNumItems());
255  // set first myACTemplate as edited AC
256  myCurrentTemplateAC = myACTemplates.front()->getAC();
257  // call tag selected function
258  if (notifyFrameParent) {
259  myFrameParent->tagSelected();
260  }
261 }
262 
263 
264 void
265 GNEFrameModuls::TagSelector::setCurrentTag(SumoXMLTag newTag, const bool notifyFrameParent) {
266  // first reset myCurrentTemplateAC
267  myCurrentTemplateAC = nullptr;
268  // iterate over all myTagsMatchBox
269  for (int i = 0; i < (int)myACTemplates.size(); i++) {
270  if (myACTemplates.at(i)->getAC() && (myACTemplates.at(i)->getAC()->getTagProperty().getTag() == newTag)) {
271  // set current template and currentItem
272  myCurrentTemplateAC = myACTemplates.at(i)->getAC();
273  myTagsMatchBox->setCurrentItem(i);
274  // set color of myTypeMatchBox to black (valid)
275  myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
276  }
277  }
278  // call tag selected function
279  if (notifyFrameParent) {
280  myFrameParent->tagSelected();
281  }
282 }
283 
284 
285 void
287  // call tag selected function
288  myFrameParent->tagSelected();
289 }
290 
291 
292 long
293 GNEFrameModuls::TagSelector::onCmdSelectTag(FXObject*, FXSelector, void*) {
294  // iterate over all myTagsMatchBox
295  for (int i = 0; i < (int)myACTemplates.size(); i++) {
296  if (myACTemplates.at(i)->getAC() && myACTemplates.at(i)->getAC()->getTagProperty().getFieldString() == myTagsMatchBox->getText().text()) {
297  // set templateAC and currentItem
298  myCurrentTemplateAC = myACTemplates.at(i)->getAC();
299  myTagsMatchBox->setCurrentItem(i);
300  // set color of myTypeMatchBox to black (valid)
301  myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
302  // call tag selected function
303  myFrameParent->tagSelected();
304  // Write Warning in console if we're in testing mode
305  WRITE_DEBUG(("Selected item '" + myTagsMatchBox->getText() + "' in TagSelector").text());
306  return 1;
307  }
308  }
309  // reset templateAC
310  myCurrentTemplateAC = nullptr;
311  // set color of myTypeMatchBox to red (invalid)
312  myTagsMatchBox->setTextColor(FXRGB(255, 0, 0));
313  // Write Warning in console if we're in testing mode
314  WRITE_DEBUG("Selected invalid item in TagSelector");
315  // call tag selected function
316  myFrameParent->tagSelected();
317  return 1;
318 }
319 
320 
323  return myAC;
324 }
325 
326 
328  myAC(nullptr) {
329  // create attribute carrier depending of
330  switch (tagProperty.getTag()) {
331  // additional elements
332  case SUMO_TAG_BUS_STOP:
333  case SUMO_TAG_TRAIN_STOP:
334  myAC = new GNEBusStop(tagProperty.getTag(), net);
335  break;
336  case SUMO_TAG_ACCESS:
337  myAC = new GNEAccess(net);
338  break;
340  myAC = new GNEContainerStop(net);
341  break;
343  myAC = new GNEChargingStation(net);
344  break;
346  myAC = new GNEParkingArea(net);
347  break;
349  myAC = new GNEParkingSpace(net);
350  break;
351  case SUMO_TAG_E1DETECTOR:
352  myAC = new GNEDetectorE1(net);
353  break;
354  case SUMO_TAG_E2DETECTOR:
356  myAC = new GNEDetectorE2(tagProperty.getTag(), net);
357  break;
358  case SUMO_TAG_E3DETECTOR:
359  myAC = new GNEDetectorE3(net);
360  break;
361  case SUMO_TAG_DET_ENTRY:
362  case SUMO_TAG_DET_EXIT:
363  myAC = new GNEDetectorEntryExit(tagProperty.getTag(), net);
364  break;
366  myAC = new GNEDetectorE1Instant(net);
367  break;
368  case SUMO_TAG_VSS:
369  myAC = new GNEVariableSpeedSign(net);
370  break;
371  case SUMO_TAG_STEP:
372  myAC = new GNEVariableSpeedSignStep(net);
373  break;
374  case SUMO_TAG_CALIBRATOR:
376  myAC = new GNECalibrator(tagProperty.getTag(), net);
377  break;
379  myAC = new GNECalibratorFlow(net);
380  break;
381  case SUMO_TAG_REROUTER:
382  myAC = new GNERerouter(net);
383  break;
384  case SUMO_TAG_INTERVAL:
385  myAC = new GNERerouterInterval(net);
386  break;
388  myAC = new GNEClosingReroute(net);
389  break;
391  myAC = new GNEClosingLaneReroute(net);
392  break;
394  myAC = new GNEDestProbReroute(net);
395  break;
397  myAC = new GNEParkingAreaReroute(net);
398  break;
400  myAC = new GNERouteProbReroute(net);
401  break;
402  case SUMO_TAG_ROUTEPROBE:
403  myAC = new GNERouteProbe(net);
404  break;
405  case SUMO_TAG_VAPORIZER:
406  myAC = new GNEVaporizer(net);
407  break;
408  // shapes
409  case SUMO_TAG_POLY:
410  myAC = new GNEPoly(net);
411  break;
412  case SUMO_TAG_POI:
413  case GNE_TAG_POILANE:
414  case GNE_TAG_POIGEO:
415  myAC = new GNEPOI(tagProperty.getTag(), net);
416  break;
417  // TAZs
418  case SUMO_TAG_TAZ:
419  myAC = new GNETAZ(net);
420  break;
421  case SUMO_TAG_TAZSOURCE:
422  case SUMO_TAG_TAZSINK:
423  myAC = new GNETAZSourceSink(tagProperty.getTag(), net);
424  break;
425  // Demand elements
426  case SUMO_TAG_ROUTE:
428  myAC = new GNERoute(tagProperty.getTag(), net);
429  break;
430  case SUMO_TAG_VTYPE:
431  case SUMO_TAG_PTYPE:
432  myAC = new GNEVehicleType(tagProperty.getTag(), net);
433  break;
434  case SUMO_TAG_VEHICLE:
436  case GNE_TAG_FLOW_ROUTE:
438  case SUMO_TAG_TRIP:
439  case SUMO_TAG_FLOW:
440  myAC = new GNEVehicle(tagProperty.getTag(), net);
441  break;
442  case SUMO_TAG_STOP_LANE:
451  myAC = new GNEStop(tagProperty.getTag(), net);
452  break;
453  case SUMO_TAG_PERSON:
454  case SUMO_TAG_PERSONFLOW:
455  myAC = new GNEPerson(tagProperty.getTag(), net);
456  break;
457  case SUMO_TAG_CONTAINER:
459  myAC = new GNEContainer(tagProperty.getTag(), net);
460  break;
463  myAC = new GNETransport(tagProperty.getTag(), net);
464  break;
468  myAC = new GNETranship(tagProperty.getTag(), net);
469  break;
472  myAC = new GNEPersonTrip(tagProperty.getTag(), net);
473  break;
474  case GNE_TAG_WALK_EDGE:
476  case GNE_TAG_WALK_EDGES:
477  case GNE_TAG_WALK_ROUTE:
478  myAC = new GNEWalk(tagProperty.getTag(), net);
479  break;
480  case GNE_TAG_RIDE_EDGE:
482  myAC = new GNERide(tagProperty.getTag(), net);
483  break;
484  default:
485  throw ProcessError("Non-supported tagProperty in ACTemplate");
486  break;
487  }
488 }
489 
490 
492  delete myAC;
493 }
494 
495 // ---------------------------------------------------------------------------
496 // GNEFrameModuls::DemandElementSelector - methods
497 // ---------------------------------------------------------------------------
498 
500  FXGroupBoxModule(frameParent->myContentFrame, ("Parent " + toString(demandElementTag)).c_str()),
501  myFrameParent(frameParent),
502  myCurrentDemandElement(nullptr),
503  myDemandElementTags({demandElementTag}) {
504  // Create MFXIconComboBox
505  myDemandElementsMatchBox = new MFXIconComboBox(getCollapsableFrame(), GUIDesignComboBoxNCol, this, MID_GNE_SET_TYPE, GUIDesignComboBox);
506  // refresh demand element MatchBox
507  refreshDemandElementSelector();
508  // shown after creation
509  show();
510 }
511 
512 
513 GNEFrameModuls::DemandElementSelector::DemandElementSelector(GNEFrame* frameParent, const std::vector<GNETagProperties::TagType>& tagTypes) :
514  FXGroupBoxModule(frameParent->myContentFrame, "Parent element"),
515  myFrameParent(frameParent),
516  myCurrentDemandElement(nullptr) {
517  // fill myDemandElementTags
518  for (const auto& tagType : tagTypes) {
519  const auto tagProperties = GNEAttributeCarrier::getTagPropertiesByType(tagType);
520  for (const auto& tagProperty : tagProperties) {
521  myDemandElementTags.push_back(tagProperty.getTag());
522  }
523  }
524  // Create MFXIconComboBox
526  // refresh demand element MatchBox
528  // shown after creation
529  show();
530 }
531 
532 
534 
535 
538  return myCurrentDemandElement;
539 }
540 
541 
542 const std::vector<SumoXMLTag>&
544  return myDemandElementTags;
545 }
546 
547 
548 void
550  // first check that demandElement tag correspond to a tag of myDemandElementTags
551  if (std::find(myDemandElementTags.begin(), myDemandElementTags.end(), demandElement->getTagProperty().getTag()) != myDemandElementTags.end()) {
552  // update text of myDemandElementsMatchBox
553  myDemandElementsMatchBox->setItem(demandElement->getID().c_str(), demandElement->getIcon());
554  // Set new current demand element
555  myCurrentDemandElement = demandElement;
556  // call demandElementSelected function
557  myFrameParent->demandElementSelected();
558  }
559 }
560 
561 
562 void
564  // first refresh modul
565  refreshDemandElementSelector();
566  // if current selected item isn't valid, set DEFAULT_VTYPE_ID or DEFAULT_PEDTYPE_ID
567  if (myCurrentDemandElement) {
568  myDemandElementsMatchBox->setItem(myCurrentDemandElement->getID().c_str(), myCurrentDemandElement->getIcon());
569  } else if (myDemandElementTags.size() == 1) {
570  if (myDemandElementTags.at(0) == SUMO_TAG_VTYPE) {
571  const auto defaultVType = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID);
572  myDemandElementsMatchBox->setItem(defaultVType->getID().c_str(), defaultVType->getIcon());
573  } else if (myDemandElementTags.at(0) == SUMO_TAG_PTYPE) {
574  const auto defaultPType = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_PEDTYPE_ID);
575  myDemandElementsMatchBox->setItem(defaultPType->getID().c_str(), defaultPType->getIcon());
576  }
577  }
578  onCmdSelectDemandElement(nullptr, 0, nullptr);
579  show();
580 }
581 
582 
583 void
585  hide();
586 }
587 
588 
589 bool
591  return shown();
592 }
593 
594 
595 void
597  // get demand elemenst container
598  const auto& demandElements = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements();
599  // clear demand elements comboBox
600  myDemandElementsMatchBox->clearItems();
601  // fill myTypeMatchBox with list of demand elements
602  for (const auto& demandElementTag : myDemandElementTags) {
603  // special case for VTypes and PTypes
604  if (demandElementTag == SUMO_TAG_VTYPE) {
605  // add default Vehicle an Bike types in the first and second positions
606  myDemandElementsMatchBox->appendIconItem(DEFAULT_VTYPE_ID.c_str(), GUIIconSubSys::getIcon(GUIIcon::VTYPE));
607  myDemandElementsMatchBox->appendIconItem(DEFAULT_BIKETYPE_ID.c_str(), GUIIconSubSys::getIcon(GUIIcon::VTYPE));
608  // add rest of vTypes
609  for (const auto& vType : demandElements.at(demandElementTag)) {
610  // avoid insert duplicated default vType
611  if ((vType->getID() != DEFAULT_VTYPE_ID) && (vType->getID() != DEFAULT_BIKETYPE_ID)) {
612  myDemandElementsMatchBox->appendIconItem(vType->getID().c_str(), vType->getIcon());
613  }
614  }
615  } else if (demandElementTag == SUMO_TAG_PTYPE) {
616  // add default Person type in the firs
617  myDemandElementsMatchBox->appendIconItem(DEFAULT_PEDTYPE_ID.c_str(), GUIIconSubSys::getIcon(GUIIcon::PTYPE));
618  // add rest of pTypes
619  for (const auto& pType : demandElements.at(demandElementTag)) {
620  // avoid insert duplicated default pType
621  if (pType->getID() != DEFAULT_PEDTYPE_ID) {
622  myDemandElementsMatchBox->appendIconItem(pType->getID().c_str(), pType->getIcon());
623  }
624  }
625  } else {
626  // insert all Ids
627  for (const auto& demandElement : demandElements.at(demandElementTag)) {
628  myDemandElementsMatchBox->appendIconItem(demandElement->getID().c_str(), demandElement->getIcon());
629  }
630  }
631  }
632  // Set number of items (maximum 10)
633  if (myDemandElementsMatchBox->getNumItems() < 10) {
634  myDemandElementsMatchBox->setNumVisible((int)myDemandElementsMatchBox->getNumItems());
635  } else {
636  myDemandElementsMatchBox->setNumVisible(10);
637  }
638  // update myCurrentDemandElement
639  if (myDemandElementsMatchBox->getNumItems() == 0) {
640  myCurrentDemandElement = nullptr;
641  } else if (myCurrentDemandElement) {
642  for (int i = 0; i < myDemandElementsMatchBox->getNumItems(); i++) {
643  if (myDemandElementsMatchBox->getItem(i).text() == myCurrentDemandElement->getID()) {
644  myDemandElementsMatchBox->setCurrentItem(i, FALSE);
645  }
646  }
647  } else {
648  // set first element in the list as myCurrentDemandElement (Special case for default person and vehicle type)
649  if (myDemandElementsMatchBox->getItem(0).text() == DEFAULT_VTYPE_ID) {
650  myCurrentDemandElement = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDefaultVType();
651  } else if (myDemandElementsMatchBox->getItem(0).text() == DEFAULT_PEDTYPE_ID) {
652  myCurrentDemandElement = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDefaultPType();
653  } else {
654  // disable myCurrentDemandElement
655  myCurrentDemandElement = nullptr;
656  // update myCurrentDemandElement with the first allowed element
657  for (auto i = myDemandElementTags.begin(); (i != myDemandElementTags.end()) && (myCurrentDemandElement == nullptr); i++) {
658  if (demandElements.at(*i).size() > 0) {
659  myCurrentDemandElement = *demandElements.at(*i).begin();
660  }
661  }
662  }
663  }
664 }
665 
666 
667 GNEEdge*
669  if (myCurrentDemandElement == nullptr) {
670  return nullptr;
671  }
672  if (!myCurrentDemandElement->getTagProperty().isPerson()) {
673  return nullptr;
674  }
675  if (myCurrentDemandElement->getChildDemandElements().empty()) {
676  return nullptr;
677  }
678  // get last person plan
679  const GNEDemandElement* lastPersonPlan = myCurrentDemandElement->getChildDemandElements().back();
680  // check tag
681  switch (lastPersonPlan->getTagProperty().getTag()) {
682  // person trips
684  // rides
685  case GNE_TAG_RIDE_EDGE:
686  // walks
687  case GNE_TAG_WALK_EDGE:
688  case GNE_TAG_WALK_EDGES:
689  // stops
691  return lastPersonPlan->getParentEdges().back();
692  // person trips
694  // person trips
696  // walks
698  // stops
700  return lastPersonPlan->getParentAdditionals().back()->getParentLanes().front()->getParentEdge();
701  // route walks
702  case GNE_TAG_WALK_ROUTE:
703  return lastPersonPlan->getParentDemandElements().back()->getParentEdges().back();
704  default:
705  return nullptr;
706  }
707 }
708 
709 
710 GNEEdge*
712  if (myCurrentDemandElement == nullptr) {
713  return nullptr;
714  }
715  if (!myCurrentDemandElement->getTagProperty().isContainer()) {
716  return nullptr;
717  }
718  if (myCurrentDemandElement->getChildDemandElements().empty()) {
719  return nullptr;
720  }
721  // get last container plan
722  const GNEDemandElement* lastContainerPlan = myCurrentDemandElement->getChildDemandElements().back();
723  // check tag
724  switch (lastContainerPlan->getTagProperty().getTag()) {
725  // transport
727  // tranship
730  // stop
732  return lastContainerPlan->getParentEdges().back();
733  // transport
735  // tranship
737  // stop
739  return lastContainerPlan->getParentAdditionals().back()->getParentLanes().front()->getParentEdge();
740  default:
741  return nullptr;
742  }
743 }
744 
745 
746 long
748  // Check if value of myTypeMatchBox correspond to a demand element
749  for (const auto& demandElementTag : myDemandElementTags) {
750  for (const auto& demandElement : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(demandElementTag)) {
751  if (demandElement->getID() == myDemandElementsMatchBox->getText().text()) {
752  // set color of myTypeMatchBox to black (valid)
753  myDemandElementsMatchBox->setTextColor(FXRGB(0, 0, 0));
754  // Set new current demand element
755  myCurrentDemandElement = demandElement;
756  // call demandElementSelected function
757  myFrameParent->demandElementSelected();
758  // Write Warning in console if we're in testing mode
759  WRITE_DEBUG(("Selected item '" + myDemandElementsMatchBox->getText() + "' in DemandElementSelector").text());
760  return 1;
761  }
762  }
763  }
764  // if demand element selected is invalid, set demand element as null
765  myCurrentDemandElement = nullptr;
766  // call demandElementSelected function
767  myFrameParent->demandElementSelected();
768  // change color of myDemandElementsMatchBox to red (invalid)
769  myDemandElementsMatchBox->setTextColor(FXRGB(255, 0, 0));
770  // Write Warning in console if we're in testing mode
771  WRITE_DEBUG("Selected invalid item in DemandElementSelector");
772  return 1;
773 }
774 
775 // ---------------------------------------------------------------------------
776 // GNEFrameModuls::HierarchicalElementTree - methods
777 // ---------------------------------------------------------------------------
778 
780  FXGroupBoxModule(frameParent->myContentFrame, "Hierarchy"),
781  myFrameParent(frameParent),
782  myHE(nullptr),
783  myClickedAC(nullptr),
784  myClickedJunction(nullptr),
785  myClickedEdge(nullptr),
786  myClickedLane(nullptr),
787  myClickedCrossing(nullptr),
788  myClickedConnection(nullptr),
789  myClickedShape(nullptr),
790  myClickedTAZElement(nullptr),
791  myClickedAdditional(nullptr),
792  myClickedDemandElement(nullptr),
793  myClickedDataSet(nullptr),
794  myClickedDataInterval(nullptr),
795  myClickedGenericData(nullptr) {
796  // Create three list
798  hide();
799 }
800 
801 
803 
804 
805 void
807  myHE = dynamic_cast<GNEHierarchicalElement*>(AC);
808  // show HierarchicalElementTree and refresh HierarchicalElementTree
809  if (myHE) {
810  // refresh HierarchicalElementTree
811  refreshHierarchicalElementTree();
812  // show myTreeListDinamic
813  myTreeListDinamic->show();
814  //show modul
815  show();
816  }
817 }
818 
819 
820 void
822  // set all pointers null
823  myHE = nullptr;
824  myClickedAC = nullptr;
825  myClickedJunction = nullptr;
826  myClickedEdge = nullptr;
827  myClickedLane = nullptr;
828  myClickedCrossing = nullptr;
829  myClickedConnection = nullptr;
830  myClickedShape = nullptr;
831  myClickedTAZElement = nullptr;
832  myClickedAdditional = nullptr;
833  myClickedDemandElement = nullptr;
834  myClickedDataSet = nullptr;
835  myClickedDataInterval = nullptr;
836  myClickedGenericData = nullptr;
837  // hide myTreeListDinamic
838  myTreeListDinamic->hide();
839  // hide modul
840  hide();
841 }
842 
843 
844 void
846  // clear items
847  myTreeListDinamic->clearItems();
848  myTreeItemToACMap.clear();
849  myTreeItemsConnections.clear();
850  // show children of myHE
851  if (myHE) {
852  showHierarchicalElementChildren(myHE, showAttributeCarrierParents());
853  }
854 }
855 
856 
857 void
859  // simply check if AC is the same of myHE
860  if (AC == myHE) {
861  myHE = nullptr;
862  }
863 }
864 
865 
866 long
867 GNEFrameModuls::HierarchicalElementTree::onCmdShowChildMenu(FXObject*, FXSelector, void* eventData) {
868  // Obtain event
869  FXEvent* e = (FXEvent*)eventData;
870  // obtain FXTreeItem in the given position
871  FXTreeItem* item = myTreeListDinamic->getItemAt(e->win_x, e->win_y);
872  // open Pop-up if FXTreeItem has a Attribute Carrier vinculated
873  if (item && (myTreeItemsConnections.find(item) == myTreeItemsConnections.end())) {
874  createPopUpMenu(e->root_x, e->root_y, myTreeItemToACMap[item]);
875  }
876  return 1;
877 }
878 
879 
880 long
882  // Center item
883  if (myClickedJunction) {
884  myFrameParent->myViewNet->centerTo(myClickedJunction->getGlID(), true, -1);
885  } else if (myClickedEdge) {
886  myFrameParent->myViewNet->centerTo(myClickedEdge->getGlID(), true, -1);
887  } else if (myClickedLane) {
888  myFrameParent->myViewNet->centerTo(myClickedLane->getGlID(), true, -1);
889  } else if (myClickedCrossing) {
890  myFrameParent->myViewNet->centerTo(myClickedCrossing->getGlID(), true, -1);
891  } else if (myClickedConnection) {
892  myFrameParent->myViewNet->centerTo(myClickedConnection->getGlID(), true, -1);
893  } else if (myClickedAdditional) {
894  myFrameParent->myViewNet->centerTo(myClickedAdditional->getGlID(), true, -1);
895  } else if (myClickedShape) {
896  myFrameParent->myViewNet->centerTo(myClickedShape->getGlID(), true, -1);
897  } else if (myClickedTAZElement) {
898  myFrameParent->myViewNet->centerTo(myClickedTAZElement->getGlID(), true, -1);
899  } else if (myClickedDemandElement) {
900  myFrameParent->myViewNet->centerTo(myClickedDemandElement->getGlID(), true, -1);
901  } else if (myClickedGenericData) {
902  myFrameParent->myViewNet->centerTo(myClickedGenericData->getGlID(), true, -1);
903  }
904  // update view after centering
905  myFrameParent->myViewNet->updateViewNet();
906  return 1;
907 }
908 
909 
910 long
912  if ((myHE != nullptr) && (myClickedAC != nullptr)) {
913  myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectChild(myClickedAC, myHE);
914  }
915  return 1;
916 }
917 
918 
919 long
921  // Remove Attribute Carrier
922  if (myClickedJunction) {
923  myFrameParent->myViewNet->getNet()->deleteJunction(myClickedJunction, myFrameParent->myViewNet->getUndoList());
924  } else if (myClickedEdge) {
925  myFrameParent->myViewNet->getNet()->deleteEdge(myClickedEdge, myFrameParent->myViewNet->getUndoList(), false);
926  } else if (myClickedLane) {
927  myFrameParent->myViewNet->getNet()->deleteLane(myClickedLane, myFrameParent->myViewNet->getUndoList(), false);
928  } else if (myClickedCrossing) {
929  myFrameParent->myViewNet->getNet()->deleteCrossing(myClickedCrossing, myFrameParent->myViewNet->getUndoList());
930  } else if (myClickedConnection) {
931  myFrameParent->myViewNet->getNet()->deleteConnection(myClickedConnection, myFrameParent->myViewNet->getUndoList());
932  } else if (myClickedAdditional) {
933  myFrameParent->myViewNet->getNet()->deleteAdditional(myClickedAdditional, myFrameParent->myViewNet->getUndoList());
934  } else if (myClickedShape) {
935  myFrameParent->myViewNet->getNet()->deleteShape(myClickedShape, myFrameParent->myViewNet->getUndoList());
936  } else if (myClickedTAZElement) {
937  myFrameParent->myViewNet->getNet()->deleteTAZElement(myClickedTAZElement, myFrameParent->myViewNet->getUndoList());
938  } else if (myClickedDemandElement) {
939  // check that default VTypes aren't removed
940  if ((myClickedDemandElement->getTagProperty().getTag() == SUMO_TAG_VTYPE) && (GNEAttributeCarrier::parse<bool>(myClickedDemandElement->getAttribute(GNE_ATTR_DEFAULT_VTYPE)))) {
941  WRITE_WARNING("Default Vehicle Type '" + myClickedDemandElement->getAttribute(SUMO_ATTR_ID) + "' cannot be removed");
942  return 1;
943  } else if (myClickedDemandElement->getTagProperty().isPersonPlan() && (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().size() == 1)) {
944  // we need to check if we're removing the last person plan of a person.
945  myFrameParent->myViewNet->getNet()->deleteDemandElement(myClickedDemandElement->getParentDemandElements().front(), myFrameParent->myViewNet->getUndoList());
946  } else {
947  myFrameParent->myViewNet->getNet()->deleteDemandElement(myClickedDemandElement, myFrameParent->myViewNet->getUndoList());
948  }
949  } else if (myClickedDataSet) {
950  myFrameParent->myViewNet->getNet()->deleteDataSet(myClickedDataSet, myFrameParent->myViewNet->getUndoList());
951  } else if (myClickedDataInterval) {
952  // check if we have to remove data Set
953  if (myClickedDataInterval->getDataSetParent()->getDataIntervalChildren().size() == 1) {
954  myFrameParent->myViewNet->getNet()->deleteDataSet(myClickedDataInterval->getDataSetParent(), myFrameParent->myViewNet->getUndoList());
955  } else {
956  myFrameParent->myViewNet->getNet()->deleteDataInterval(myClickedDataInterval, myFrameParent->myViewNet->getUndoList());
957  }
958  } else if (myClickedGenericData) {
959  // check if we have to remove interval
960  if (myClickedGenericData->getDataIntervalParent()->getGenericDataChildren().size() == 1) {
961  // check if we have to remove data Set
962  if (myClickedGenericData->getDataIntervalParent()->getDataSetParent()->getDataIntervalChildren().size() == 1) {
963  myFrameParent->myViewNet->getNet()->deleteDataSet(myClickedGenericData->getDataIntervalParent()->getDataSetParent(), myFrameParent->myViewNet->getUndoList());
964  } else {
965  myFrameParent->myViewNet->getNet()->deleteDataInterval(myClickedGenericData->getDataIntervalParent(), myFrameParent->myViewNet->getUndoList());
966  }
967  } else {
968  myFrameParent->myViewNet->getNet()->deleteGenericData(myClickedGenericData, myFrameParent->myViewNet->getUndoList());
969  }
970  }
971  // update net
972  myFrameParent->myViewNet->updateViewNet();
973  // refresh AC Hierarchy
974  refreshHierarchicalElementTree();
975  // check if inspector frame has to be shown again
976  if (myFrameParent->myViewNet->getInspectedAttributeCarriers().size() == 1) {
977  if (myFrameParent->myViewNet->getInspectedAttributeCarriers().front() != myClickedAC) {
978  myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectSingleElement(myFrameParent->myViewNet->getInspectedAttributeCarriers().front());
979  } else {
980  // inspect a nullprt element to reset inspector frame
981  myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectSingleElement(nullptr);
982  }
983  }
984  return 1;
985 }
986 
987 
988 long
990  // currently only children of demand elements can be moved
991  if (myClickedDemandElement) {
992  myFrameParent->myViewNet->getUndoList()->begin(myClickedDemandElement->getTagProperty().getGUIIcon(), ("moving up " + myClickedDemandElement->getTagStr()).c_str());
993  // move element one position back
994  myFrameParent->myViewNet->getUndoList()->add(new GNEChange_Children(myClickedDemandElement->getParentDemandElements().at(0), myClickedDemandElement,
995  GNEChange_Children::Operation::MOVE_BACK), true);
996  myFrameParent->myViewNet->getUndoList()->end();
997  }
998  // refresh after moving child
999  refreshHierarchicalElementTree();
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()->begin(myClickedDemandElement->getTagProperty().getGUIIcon(), ("moving down " + myClickedDemandElement->getTagStr()).c_str());
1009  // move element one position front
1010  myFrameParent->myViewNet->getUndoList()->add(new GNEChange_Children(myClickedDemandElement->getParentDemandElements().at(0), myClickedDemandElement,
1011  GNEChange_Children::Operation::MOVE_FRONT), true);
1012  myFrameParent->myViewNet->getUndoList()->end();
1013  }
1014  // refresh after moving child
1015  refreshHierarchicalElementTree();
1016  return 1;
1017 }
1018 
1019 
1020 void
1022  // get attributeCarrirs
1023  const auto& attributeCarriers = myFrameParent->myViewNet->getNet()->getAttributeCarriers();
1024  // first check that AC exist
1025  if (clickedAC) {
1026  // set current clicked AC
1027  myClickedAC = clickedAC;
1028  // cast all elements
1029  myClickedJunction = attributeCarriers->retrieveJunction(clickedAC->getID(), false);
1030  myClickedEdge = attributeCarriers->retrieveEdge(clickedAC->getID(), false);
1031  myClickedLane = attributeCarriers->retrieveLane(clickedAC, false);
1032  myClickedCrossing = attributeCarriers->retrieveCrossing(clickedAC, false);
1033  myClickedConnection = attributeCarriers->retrieveConnection(clickedAC, false);
1034  myClickedShape = attributeCarriers->retrieveShape(clickedAC, false);
1035  myClickedTAZElement = attributeCarriers->retrieveTAZElement(clickedAC, false);
1036  myClickedAdditional = attributeCarriers->retrieveAdditional(clickedAC, false);
1037  myClickedDemandElement = attributeCarriers->retrieveDemandElement(clickedAC, false);
1038  myClickedDataSet = attributeCarriers->retrieveDataSet(clickedAC, false);
1039  myClickedDataInterval = attributeCarriers->retrieveDataInterval(clickedAC, false);
1040  myClickedGenericData = attributeCarriers->retrieveGenericData(clickedAC, false);
1041  // create FXMenuPane
1042  FXMenuPane* pane = new FXMenuPane(myTreeListDinamic);
1043  // set item name and icon
1044  new MFXMenuHeader(pane, myFrameParent->myViewNet->getViewParent()->getGUIMainWindow()->getBoldFont(), myClickedAC->getPopUpID().c_str(), myClickedAC->getIcon());
1045  // insert separator
1046  new FXMenuSeparator(pane);
1047  // create center menu command
1048  FXMenuCommand* centerMenuCommand = GUIDesigns::buildFXMenuCommand(pane, "Center", GUIIconSubSys::getIcon(GUIIcon::RECENTERVIEW), this, MID_GNE_CENTER);
1049  // disable Centering for Vehicle Types, data sets and data intervals
1050  if (myClickedAC->getTagProperty().isVehicleType() || (myClickedAC->getTagProperty().getTag() == SUMO_TAG_DATASET) ||
1051  (myClickedAC->getTagProperty().getTag() == SUMO_TAG_DATAINTERVAL)) {
1052  centerMenuCommand->disable();
1053  }
1054  // create inspect and delete menu commands
1055  FXMenuCommand* inspectMenuCommand = GUIDesigns::buildFXMenuCommand(pane, "Inspect", GUIIconSubSys::getIcon(GUIIcon::MODEINSPECT), this, MID_GNE_INSPECT);
1056  FXMenuCommand* deleteMenuCommand = GUIDesigns::buildFXMenuCommand(pane, "Delete", GUIIconSubSys::getIcon(GUIIcon::MODEDELETE), this, MID_GNE_DELETE);
1057  // check if inspect and delete menu commands has to be disabled
1058  if (GNEFrameAttributesModuls::isSupermodeValid(myFrameParent->myViewNet, myClickedAC) == false) {
1059  inspectMenuCommand->disable();
1060  deleteMenuCommand->disable();
1061  }
1062  // now chec if given AC support manually moving of their item up and down (Currently only for certain demand elements)
1063  /* if (myClickedDemandElement && myClickedAC->getTagProperty().canBeSortedManually()) {
1064  // insert separator
1065  new FXMenuSeparator(pane);
1066  // create both moving menu commands
1067  FXMenuCommand* moveUpMenuCommand = GUIDesigns::buildFXMenuCommand(pane, "Move up", GUIIconSubSys::getIcon(GUIIcon::ARROW_UP), this, MID_GNE_ACHIERARCHY_MOVEUP);
1068  FXMenuCommand* moveDownMenuCommand = GUIDesigns::buildFXMenuCommand(pane, "Move down", GUIIconSubSys::getIcon(GUIIcon::ARROW_DOWN), this, MID_GNE_ACHIERARCHY_MOVEDOWN);
1069  // check if both commands has to be disabled
1070  if (myClickedDemandElement->getTagProperty().isStopPerson()) {
1071  moveUpMenuCommand->setText("Move up (Stops cannot be moved)");
1072  moveDownMenuCommand->setText("Move down (Stops cannot be moved)");
1073  moveUpMenuCommand->disable();
1074  moveDownMenuCommand->disable();
1075  } else {
1076  // check if moveUpMenuCommand has to be disabled
1077  if (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().front() == myClickedDemandElement) {
1078  moveUpMenuCommand->setText("Move up (It's already the first element)");
1079  moveUpMenuCommand->disable();
1080  } else if (myClickedDemandElement->getParentDemandElements().front()->getPreviousChildDemandElement(myClickedDemandElement)->getTagProperty().isStopPerson()) {
1081  moveUpMenuCommand->setText("Move up (Previous element is a Stop)");
1082  moveUpMenuCommand->disable();
1083  }
1084  // check if moveDownMenuCommand has to be disabled
1085  if (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().back() == myClickedDemandElement) {
1086  moveDownMenuCommand->setText("Move down (It's already the last element)");
1087  moveDownMenuCommand->disable();
1088  } else if (myClickedDemandElement->getParentDemandElements().front()->getNextChildDemandElement(myClickedDemandElement)->getTagProperty().isStopPerson()) {
1089  moveDownMenuCommand->setText("Move down (Next element is a Stop)");
1090  moveDownMenuCommand->disable();
1091  }
1092  }
1093  } */
1094  // Center in the mouse position and create pane
1095  pane->setX(X);
1096  pane->setY(Y);
1097  pane->create();
1098  pane->show();
1099  } else {
1100  // set all clicked elements to null
1101  myClickedAC = nullptr;
1102  myClickedJunction = nullptr;
1103  myClickedEdge = nullptr;
1104  myClickedLane = nullptr;
1105  myClickedCrossing = nullptr;
1106  myClickedConnection = nullptr;
1107  myClickedShape = nullptr;
1108  myClickedTAZElement = nullptr;
1109  myClickedAdditional = nullptr;
1110  myClickedDemandElement = nullptr;
1111  myClickedDataSet = nullptr;
1112  myClickedDataInterval = nullptr;
1113  myClickedGenericData = nullptr;
1114  }
1115 }
1116 
1117 
1118 FXTreeItem*
1120  // get attributeCarrirs
1121  const auto& attributeCarriers = myFrameParent->myViewNet->getNet()->getAttributeCarriers();
1122  // check tags
1123  if (myHE->getTagProperty().isNetworkElement()) {
1124  // check demand element type
1125  switch (myHE->getTagProperty().getTag()) {
1126  case SUMO_TAG_EDGE: {
1127  // obtain Edge
1128  GNEEdge* edge = attributeCarriers->retrieveEdge(myHE->getID(), false);
1129  if (edge) {
1130  // insert Junctions of edge in tree (Pararell because a edge has always two Junctions)
1131  FXTreeItem* junctionSourceItem = myTreeListDinamic->insertItem(nullptr, nullptr, (edge->getFromJunction()->getHierarchyName() + " origin").c_str(), edge->getFromJunction()->getIcon(), edge->getFromJunction()->getIcon());
1132  FXTreeItem* junctionDestinyItem = myTreeListDinamic->insertItem(nullptr, nullptr, (edge->getFromJunction()->getHierarchyName() + " destiny").c_str(), edge->getFromJunction()->getIcon(), edge->getFromJunction()->getIcon());
1133  junctionDestinyItem->setExpanded(true);
1134  // Save items in myTreeItemToACMap
1135  myTreeItemToACMap[junctionSourceItem] = edge->getFromJunction();
1136  myTreeItemToACMap[junctionDestinyItem] = edge->getToJunction();
1137  // return junction destiny Item
1138  return junctionDestinyItem;
1139  } else {
1140  return nullptr;
1141  }
1142  }
1143  case SUMO_TAG_LANE: {
1144  // obtain lane
1145  GNELane* lane = attributeCarriers->retrieveLane(myHE->getID(), false);
1146  if (lane) {
1147  // obtain parent edge
1148  GNEEdge* edge = attributeCarriers->retrieveEdge(lane->getParentEdge()->getID());
1149  //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions)
1150  FXTreeItem* junctionSourceItem = myTreeListDinamic->insertItem(nullptr, nullptr, (edge->getFromJunction()->getHierarchyName() + " origin").c_str(), edge->getFromJunction()->getIcon(), edge->getFromJunction()->getIcon());
1151  FXTreeItem* junctionDestinyItem = myTreeListDinamic->insertItem(nullptr, nullptr, (edge->getFromJunction()->getHierarchyName() + " destiny").c_str(), edge->getFromJunction()->getIcon(), edge->getFromJunction()->getIcon());
1152  junctionDestinyItem->setExpanded(true);
1153  // Create edge item
1154  FXTreeItem* edgeItem = myTreeListDinamic->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon());
1155  edgeItem->setExpanded(true);
1156  // Save items in myTreeItemToACMap
1157  myTreeItemToACMap[junctionSourceItem] = edge->getFromJunction();
1158  myTreeItemToACMap[junctionDestinyItem] = edge->getToJunction();
1159  myTreeItemToACMap[edgeItem] = edge;
1160  // return edge item
1161  return edgeItem;
1162  } else {
1163  return nullptr;
1164  }
1165  }
1166  case SUMO_TAG_CROSSING: {
1167  // obtain crossing parent junction
1168  GNEJunction* junction = attributeCarriers->retrieveCrossing(myHE)->getParentJunction();
1169  // create junction item
1170  FXTreeItem* junctionItem = myTreeListDinamic->insertItem(nullptr, nullptr, junction->getHierarchyName().c_str(), junction->getIcon(), junction->getIcon());
1171  junctionItem->setExpanded(true);
1172  // Save items in myTreeItemToACMap
1173  myTreeItemToACMap[junctionItem] = junction;
1174  // return junction Item
1175  return junctionItem;
1176  }
1177  case SUMO_TAG_CONNECTION: {
1178  // obtain Connection
1179  GNEConnection* connection = attributeCarriers->retrieveConnection(myHE->getID(), false);
1180  if (connection) {
1181  // create edge from item
1182  FXTreeItem* edgeFromItem = myTreeListDinamic->insertItem(nullptr, nullptr, connection->getEdgeFrom()->getHierarchyName().c_str(), connection->getEdgeFrom()->getIcon(), connection->getEdgeFrom()->getIcon());
1183  edgeFromItem->setExpanded(true);
1184  // create edge to item
1185  FXTreeItem* edgeToItem = myTreeListDinamic->insertItem(nullptr, nullptr, connection->getEdgeTo()->getHierarchyName().c_str(), connection->getEdgeTo()->getIcon(), connection->getEdgeTo()->getIcon());
1186  edgeToItem->setExpanded(true);
1187  // create connection item
1188  FXTreeItem* connectionItem = myTreeListDinamic->insertItem(nullptr, edgeToItem, connection->getHierarchyName().c_str(), connection->getIcon(), connection->getIcon());
1189  connectionItem->setExpanded(true);
1190  // Save items in myTreeItemToACMap
1191  myTreeItemToACMap[edgeFromItem] = connection->getEdgeFrom();
1192  myTreeItemToACMap[edgeToItem] = connection->getEdgeTo();
1193  myTreeItemToACMap[connectionItem] = connection;
1194  // return connection item
1195  return connectionItem;
1196  } else {
1197  return nullptr;
1198  }
1199  }
1200  default:
1201  break;
1202  }
1203  } else if (myHE->getTagProperty().getTag() == GNE_TAG_POILANE) {
1204  // Obtain POILane
1205  const GNEShape* POILane = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveShape(myHE);
1206  // obtain parent lane
1207  GNELane* lane = attributeCarriers->retrieveLane(POILane->getParentLanes().at(0)->getID());
1208  // obtain parent edge
1209  GNEEdge* edge = attributeCarriers->retrieveEdge(lane->getParentEdge()->getID());
1210  //inser Junctions of lane of edge in tree (Pararell because a edge has always two Junctions)
1211  FXTreeItem* junctionSourceItem = myTreeListDinamic->insertItem(nullptr, nullptr, (edge->getFromJunction()->getHierarchyName() + " origin").c_str(), edge->getFromJunction()->getIcon(), edge->getFromJunction()->getIcon());
1212  FXTreeItem* junctionDestinyItem = myTreeListDinamic->insertItem(nullptr, nullptr, (edge->getFromJunction()->getHierarchyName() + " destiny").c_str(), edge->getFromJunction()->getIcon(), edge->getFromJunction()->getIcon());
1213  junctionDestinyItem->setExpanded(true);
1214  // Create edge item
1215  FXTreeItem* edgeItem = myTreeListDinamic->insertItem(nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon());
1216  edgeItem->setExpanded(true);
1217  // Create lane item
1218  FXTreeItem* laneItem = myTreeListDinamic->insertItem(nullptr, edgeItem, lane->getHierarchyName().c_str(), lane->getIcon(), lane->getIcon());
1219  laneItem->setExpanded(true);
1220  // Save items in myTreeItemToACMap
1221  myTreeItemToACMap[junctionSourceItem] = edge->getFromJunction();
1222  myTreeItemToACMap[junctionDestinyItem] = edge->getToJunction();
1223  myTreeItemToACMap[edgeItem] = edge;
1224  myTreeItemToACMap[laneItem] = lane;
1225  // return Lane item
1226  return laneItem;
1227  } else if (myHE->getTagProperty().isAdditionalElement()) {
1228  // Obtain Additional
1229  const GNEAdditional* additional = attributeCarriers->retrieveAdditional(myHE);
1230  // declare auxiliar FXTreeItem, due a demand element can have multiple "roots"
1231  FXTreeItem* root = nullptr;
1232  // check if there is demand elements parents
1233  if (additional->getParentAdditionals().size() > 0) {
1234  // check if we have more than one edge
1235  if (additional->getParentAdditionals().size() > 1) {
1236  // insert first item
1237  addListItem(additional->getParentAdditionals().front());
1238  // insert "spacer"
1239  if (additional->getParentAdditionals().size() > 2) {
1240  addListItem(nullptr, ("..." + toString((int)additional->getParentAdditionals().size() - 2) + " additionals...").c_str(), 0, false);
1241  }
1242  }
1243  // return last inserted item
1244  root = addListItem(additional->getParentAdditionals().back());
1245  }
1246  // check if there is parent demand elements
1247  if (additional->getParentDemandElements().size() > 0) {
1248  // check if we have more than one demand element
1249  if (additional->getParentDemandElements().size() > 1) {
1250  // insert first item
1251  addListItem(additional->getParentDemandElements().front());
1252  // insert "spacer"
1253  if (additional->getParentDemandElements().size() > 2) {
1254  addListItem(nullptr, ("..." + toString((int)additional->getParentDemandElements().size() - 2) + " demand elements...").c_str(), 0, false);
1255  }
1256  }
1257  // return last inserted item
1258  root = addListItem(additional->getParentDemandElements().back());
1259  }
1260  // check if there is parent edges
1261  if (additional->getParentEdges().size() > 0) {
1262  // check if we have more than one edge
1263  if (additional->getParentEdges().size() > 1) {
1264  // insert first item
1265  addListItem(additional->getParentEdges().front());
1266  // insert "spacer"
1267  if (additional->getParentEdges().size() > 2) {
1268  addListItem(nullptr, ("..." + toString((int)additional->getParentEdges().size() - 2) + " edges...").c_str(), 0, false);
1269  }
1270  }
1271  // return last inserted item
1272  root = addListItem(additional->getParentEdges().back());
1273  }
1274  // check if there is parent lanes
1275  if (additional->getParentLanes().size() > 0) {
1276  // check if we have more than one parent lane
1277  if (additional->getParentLanes().size() > 1) {
1278  // insert first item
1279  addListItem(additional->getParentLanes().front());
1280  // insert "spacer"
1281  if (additional->getParentLanes().size() > 2) {
1282  addListItem(nullptr, ("..." + toString((int)additional->getParentLanes().size() - 2) + " lanes...").c_str(), 0, false);
1283  }
1284  }
1285  // return last inserted item
1286  root = addListItem(additional->getParentLanes().back());
1287  }
1288  // return last inserted list item
1289  return root;
1290  } else if (myHE->getTagProperty().isTAZElement()) {
1291  // Obtain TAZElement
1292  const GNETAZElement* TAZElement = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveTAZElement(myHE);
1293  // declare auxiliar FXTreeItem, due a demand element can have multiple "roots"
1294  FXTreeItem* root = nullptr;
1295  // check if there is demand elements parents
1296  if (TAZElement->getParentTAZElements().size() > 0) {
1297  // check if we have more than one edge
1298  if (TAZElement->getParentTAZElements().size() > 1) {
1299  // insert first item
1300  addListItem(TAZElement->getParentTAZElements().front());
1301  // insert "spacer"
1302  if (TAZElement->getParentTAZElements().size() > 2) {
1303  addListItem(nullptr, ("..." + toString((int)TAZElement->getParentTAZElements().size() - 2) + " TAZElements...").c_str(), 0, false);
1304  }
1305  }
1306  // return last inserted item
1307  root = addListItem(TAZElement->getParentTAZElements().back());
1308  }
1309  // check if there is parent demand elements
1310  if (TAZElement->getParentDemandElements().size() > 0) {
1311  // check if we have more than one demand element
1312  if (TAZElement->getParentDemandElements().size() > 1) {
1313  // insert first item
1314  addListItem(TAZElement->getParentDemandElements().front());
1315  // insert "spacer"
1316  if (TAZElement->getParentDemandElements().size() > 2) {
1317  addListItem(nullptr, ("..." + toString((int)TAZElement->getParentDemandElements().size() - 2) + " demand elements...").c_str(), 0, false);
1318  }
1319  }
1320  // return last inserted item
1321  root = addListItem(TAZElement->getParentDemandElements().back());
1322  }
1323  // check if there is parent edges
1324  if (TAZElement->getParentEdges().size() > 0) {
1325  // check if we have more than one edge
1326  if (TAZElement->getParentEdges().size() > 1) {
1327  // insert first item
1328  addListItem(TAZElement->getParentEdges().front());
1329  // insert "spacer"
1330  if (TAZElement->getParentEdges().size() > 2) {
1331  addListItem(nullptr, ("..." + toString((int)TAZElement->getParentEdges().size() - 2) + " edges...").c_str(), 0, false);
1332  }
1333  }
1334  // return last inserted item
1335  root = addListItem(TAZElement->getParentEdges().back());
1336  }
1337  // check if there is parent lanes
1338  if (TAZElement->getParentLanes().size() > 0) {
1339  // check if we have more than one parent lane
1340  if (TAZElement->getParentLanes().size() > 1) {
1341  // insert first item
1342  addListItem(TAZElement->getParentLanes().front());
1343  // insert "spacer"
1344  if (TAZElement->getParentLanes().size() > 2) {
1345  addListItem(nullptr, ("..." + toString((int)TAZElement->getParentLanes().size() - 2) + " lanes...").c_str(), 0, false);
1346  }
1347  }
1348  // return last inserted item
1349  root = addListItem(TAZElement->getParentLanes().back());
1350  }
1351  // return last inserted list item
1352  return root;
1353  } else if (myHE->getTagProperty().isDemandElement()) {
1354  // Obtain DemandElement
1355  GNEDemandElement* demandElement = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveDemandElement(myHE);
1356  // declare auxiliar FXTreeItem, due a demand element can have multiple "roots"
1357  FXTreeItem* root = nullptr;
1358  // check if there are demand element parents
1359  if (demandElement->getParentAdditionals().size() > 0) {
1360  // check if we have more than one edge
1361  if (demandElement->getParentAdditionals().size() > 1) {
1362  // insert first item
1363  addListItem(demandElement->getParentAdditionals().front());
1364  // insert "spacer"
1365  if (demandElement->getParentAdditionals().size() > 2) {
1366  addListItem(nullptr, ("..." + toString((int)demandElement->getParentAdditionals().size() - 2) + " additionals...").c_str(), 0, false);
1367  }
1368  }
1369  // return last inserted item
1370  root = addListItem(demandElement->getParentAdditionals().back());
1371  }
1372  // check if there is parent demand elements
1373  if (demandElement->getParentDemandElements().size() > 0) {
1374  // check if we have more than one demand element
1375  if (demandElement->getParentDemandElements().size() > 1) {
1376  // insert first item
1377  addListItem(demandElement->getParentDemandElements().front());
1378  // insert "spacer"
1379  if (demandElement->getParentDemandElements().size() > 2) {
1380  addListItem(nullptr, ("..." + toString((int)demandElement->getParentDemandElements().size() - 2) + " demand elements...").c_str(), 0, false);
1381  }
1382  }
1383  // return last inserted item
1384  root = addListItem(demandElement->getParentDemandElements().back());
1385  }
1386  // check if there is parent edges
1387  if (demandElement->getParentEdges().size() > 0) {
1388  // check if we have more than one edge
1389  if (demandElement->getParentEdges().size() > 1) {
1390  // insert first item
1391  addListItem(demandElement->getParentEdges().front());
1392  // insert "spacer"
1393  if (demandElement->getParentEdges().size() > 2) {
1394  addListItem(nullptr, ("..." + toString((int)demandElement->getParentEdges().size() - 2) + " edges...").c_str(), 0, false);
1395  }
1396  }
1397  // return last inserted item
1398  root = addListItem(demandElement->getParentEdges().back());
1399  }
1400  // check if there is parent lanes
1401  if (demandElement->getParentLanes().size() > 0) {
1402  // check if we have more than one parent lane
1403  if (demandElement->getParentLanes().size() > 1) {
1404  // insert first item
1405  addListItem(demandElement->getParentLanes().front());
1406  // insert "spacer"
1407  if (demandElement->getParentLanes().size() > 2) {
1408  addListItem(nullptr, ("..." + toString((int)demandElement->getParentLanes().size() - 2) + " lanes...").c_str(), 0, false);
1409  }
1410  }
1411  // return last inserted item
1412  root = addListItem(demandElement->getParentLanes().back());
1413  }
1414  // return last inserted list item
1415  return root;
1416  } else if (myHE->getTagProperty().isDataElement()) {
1417  // check if is a GNEDataInterval or a GNEGenericData
1418  if (myHE->getTagProperty().getTag() == SUMO_TAG_DATASET) {
1419  return nullptr;
1420  } else if (myHE->getTagProperty().getTag() == SUMO_TAG_DATAINTERVAL) {
1421  return addListItem(myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveDataSet(myHE->getID()));
1422  } else {
1423  // Obtain DataElement
1424  GNEGenericData* dataElement = dynamic_cast<GNEGenericData*>(myHE);
1425  if (dataElement) {
1426  // declare auxiliar FXTreeItem, due a data element can have multiple "roots"
1427  FXTreeItem* root = nullptr;
1428  // set dataset
1429  addListItem(dataElement->getDataIntervalParent()->getDataSetParent());
1430  // set data interval
1431  addListItem(dataElement->getDataIntervalParent());
1432  // check if there is data elements parents
1433  if (dataElement->getParentAdditionals().size() > 0) {
1434  // check if we have more than one edge
1435  if (dataElement->getParentAdditionals().size() > 1) {
1436  // insert first item
1437  addListItem(dataElement->getParentAdditionals().front());
1438  // insert "spacer"
1439  if (dataElement->getParentAdditionals().size() > 2) {
1440  addListItem(nullptr, ("..." + toString((int)dataElement->getParentAdditionals().size() - 2) + " additionals...").c_str(), 0, false);
1441  }
1442  }
1443  // return last inserted item
1444  root = addListItem(dataElement->getParentAdditionals().back());
1445  }
1446  // check if there is parent demand elements
1447  if (dataElement->getParentDemandElements().size() > 0) {
1448  // check if we have more than one demand element
1449  if (dataElement->getParentDemandElements().size() > 1) {
1450  // insert first item
1451  addListItem(dataElement->getParentDemandElements().front());
1452  // insert "spacer"
1453  if (dataElement->getParentDemandElements().size() > 2) {
1454  addListItem(nullptr, ("..." + toString((int)dataElement->getParentDemandElements().size() - 2) + " demand elements...").c_str(), 0, false);
1455  }
1456  }
1457  // return last inserted item
1458  root = addListItem(dataElement->getParentDemandElements().back());
1459  }
1460  // check if there is parent edges
1461  if (dataElement->getParentEdges().size() > 0) {
1462  // check if we have more than one edge
1463  if (dataElement->getParentEdges().size() > 1) {
1464  // insert first ege
1465  if (dataElement->getTagProperty().getTag() == SUMO_TAG_EDGEREL) {
1466  addListItem(dataElement->getParentEdges().front(), nullptr, "from ");
1467  } else {
1468  addListItem(dataElement->getParentEdges().front());
1469  }
1470  // insert "spacer"
1471  if (dataElement->getParentEdges().size() > 2) {
1472  addListItem(nullptr, ("..." + toString((int)dataElement->getParentEdges().size() - 2) + " edges...").c_str(), 0, false);
1473  }
1474  }
1475  // insert last ege
1476  if (dataElement->getTagProperty().getTag() == SUMO_TAG_EDGEREL) {
1477  addListItem(dataElement->getParentEdges().back(), nullptr, "to ");
1478  } else {
1479  addListItem(dataElement->getParentEdges().back());
1480  }
1481  }
1482  // check if there is parent lanes
1483  if (dataElement->getParentLanes().size() > 0) {
1484  // check if we have more than one parent lane
1485  if (dataElement->getParentLanes().size() > 1) {
1486  // insert first item
1487  addListItem(dataElement->getParentLanes().front());
1488  // insert "spacer"
1489  if (dataElement->getParentLanes().size() > 2) {
1490  addListItem(nullptr, ("..." + toString((int)dataElement->getParentLanes().size() - 2) + " lanes...").c_str(), 0, false);
1491  }
1492  }
1493  // return last inserted item
1494  root = addListItem(dataElement->getParentLanes().back());
1495  }
1496  // return last inserted list item
1497  return root;
1498  }
1499  }
1500  }
1501  // there aren't parents
1502  return nullptr;
1503 }
1504 
1505 
1506 void
1508  if (HE->getTagProperty().isNetworkElement()) {
1509  // Switch gl type of ac
1510  switch (HE->getTagProperty().getTag()) {
1511  case SUMO_TAG_JUNCTION: {
1512  // retrieve junction
1513  GNEJunction* junction = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveJunction(HE->getID(), false);
1514  if (junction) {
1515  // insert junction item
1516  FXTreeItem* junctionItem = addListItem(HE, itemParent);
1517  // insert edges
1518  for (const auto& edge : junction->getChildEdges()) {
1519  showHierarchicalElementChildren(edge, junctionItem);
1520  }
1521  // insert crossings
1522  for (const auto& crossing : junction->getGNECrossings()) {
1523  showHierarchicalElementChildren(crossing, junctionItem);
1524  }
1525  }
1526  break;
1527  }
1528  case SUMO_TAG_EDGE: {
1529  // retrieve edge
1530  GNEEdge* edge = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveEdge(HE->getID(), false);
1531  if (edge) {
1532  // insert edge item
1533  FXTreeItem* edgeItem = addListItem(HE, itemParent);
1534  // insert lanes
1535  for (const auto& lane : edge->getLanes()) {
1536  showHierarchicalElementChildren(lane, edgeItem);
1537  }
1538  // insert child additional
1539  for (const auto& additional : edge->getChildAdditionals()) {
1540  showHierarchicalElementChildren(additional, edgeItem);
1541  }
1542  // insert child shapes
1543  for (const auto& shape : edge->getChildShapes()) {
1544  showHierarchicalElementChildren(shape, edgeItem);
1545  }
1546  // insert child TAZElements
1547  for (const auto& TAZElement : edge->getChildTAZElements()) {
1548  // use addListItem because TAZElement doesn't have children
1549  addListItem(TAZElement, edgeItem);
1550  }
1551  // insert child demand elements
1552  for (const auto& demandElement : edge->getChildDemandElements()) {
1553  showHierarchicalElementChildren(demandElement, edgeItem);
1554  }
1555  /*
1556  CHECK THIS
1557 
1558  // insert demand elements children (note: use getChildDemandElementsSortedByType to avoid duplicated elements)
1559  for (const auto& route : edge->getChildDemandElementsByType(SUMO_TAG_ROUTE)) {
1560  showHierarchicalElementChildren(route, edgeItem);
1561  }
1562  for (const auto& trip : edge->getChildDemandElementsByType(SUMO_TAG_TRIP)) {
1563  showHierarchicalElementChildren(trip, edgeItem);
1564  }
1565  for (const auto& flow : edge->getChildDemandElementsByType(SUMO_TAG_FLOW)) {
1566  showHierarchicalElementChildren(flow, edgeItem);
1567  }
1568  */
1569  // show data elements
1570  for (const auto& genericDatas : edge->getChildGenericDatas()) {
1571  showHierarchicalElementChildren(genericDatas, edgeItem);
1572  }
1573  }
1574  break;
1575  }
1576  case SUMO_TAG_LANE: {
1577  // retrieve lane
1578  GNELane* lane = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveLane(HE->getID(), false);
1579  if (lane) {
1580  // insert lane item
1581  FXTreeItem* laneItem = addListItem(HE, itemParent);
1582  // insert child additional
1583  for (const auto& additional : lane->getChildAdditionals()) {
1584  showHierarchicalElementChildren(additional, laneItem);
1585  }
1586  // insert child shapes
1587  for (const auto& shape : lane->getChildShapes()) {
1588  showHierarchicalElementChildren(shape, laneItem);
1589  }
1590  // insert child TAZElements
1591  for (const auto& TAZElement : lane->getChildTAZElements()) {
1592  // use addListItem because TAZElement doesn't have children
1593  addListItem(TAZElement, laneItem);
1594  }
1595  // insert demand elements children
1596  for (const auto& demandElement : lane->getChildDemandElements()) {
1597  showHierarchicalElementChildren(demandElement, laneItem);
1598  }
1599  // insert incoming connections of lanes (by default isn't expanded)
1600  if (lane->getGNEIncomingConnections().size() > 0) {
1601  std::vector<GNEConnection*> incomingLaneConnections = lane->getGNEIncomingConnections();
1602  // insert intermediate list item
1603  FXTreeItem* incomingConnections = addListItem(laneItem, "Incomings", incomingLaneConnections.front()->getIcon(), false);
1604  // insert incoming connections
1605  for (const auto& connection : incomingLaneConnections) {
1606  showHierarchicalElementChildren(connection, incomingConnections);
1607  }
1608  }
1609  // insert outcoming connections of lanes (by default isn't expanded)
1610  if (lane->getGNEOutcomingConnections().size() > 0) {
1611  std::vector<GNEConnection*> outcomingLaneConnections = lane->getGNEOutcomingConnections();
1612  // insert intermediate list item
1613  FXTreeItem* outgoingConnections = addListItem(laneItem, "Outgoing", outcomingLaneConnections.front()->getIcon(), false);
1614  // insert outcoming connections
1615  for (const auto& connection : outcomingLaneConnections) {
1616  showHierarchicalElementChildren(connection, outgoingConnections);
1617  }
1618  }
1619  }
1620  break;
1621  }
1622  case SUMO_TAG_CROSSING:
1623  case SUMO_TAG_CONNECTION: {
1624  // insert connection item
1625  addListItem(HE, itemParent);
1626  break;
1627  }
1628  default:
1629  break;
1630  }
1632  // insert additional item
1633  FXTreeItem* treeItem = addListItem(HE, itemParent);
1634  // insert child edges
1635  for (const auto& edge : HE->getChildEdges()) {
1636  showHierarchicalElementChildren(edge, treeItem);
1637  }
1638  // insert child lanes
1639  for (const auto& lane : HE->getChildLanes()) {
1640  showHierarchicalElementChildren(lane, treeItem);
1641  }
1642  // insert additional symbols
1643  std::vector<GNEAdditional*> symbols;
1644  for (const auto& additional : HE->getChildAdditionals()) {
1645  if (additional->getTagProperty().isSymbol()) {
1646  symbols.push_back(additional);
1647  }
1648  }
1649  if (symbols.size() > 0) {
1650  // insert intermediate list item
1651  const auto additionalParent = symbols.front()->getParentAdditionals().front();
1652  const std::string symbolType = additionalParent->getTagProperty().hasAttribute(SUMO_ATTR_EDGES) ? "Edges" : "Lanes";
1653  GUIIcon symbolIcon = additionalParent->getTagProperty().hasAttribute(SUMO_ATTR_EDGES) ? GUIIcon::EDGE : GUIIcon::LANE;
1654  FXTreeItem* symbolListItem = addListItem(treeItem, symbolType, GUIIconSubSys::getIcon(symbolIcon), false);
1655  // insert symbols
1656  for (const auto& symbol : symbols) {
1657  showHierarchicalElementChildren(symbol, symbolListItem);
1658  }
1659  }
1660  // insert additional children
1661  for (const auto& additional : HE->getChildAdditionals()) {
1662  if (!additional->getTagProperty().isSymbol()) {
1663  showHierarchicalElementChildren(additional, treeItem);
1664  }
1665  }
1666  // insert child shapes
1667  for (const auto& shape : HE->getChildShapes()) {
1668  showHierarchicalElementChildren(shape, treeItem);
1669  }
1670  // insert TAZElements children
1671  for (const auto& TAZElement : HE->getChildTAZElements()) {
1672  // use addListItem because TAZElement doesn't have children
1673  addListItem(TAZElement, treeItem);
1674  }
1675  // insert child demand elements
1676  for (const auto& demandElement : HE->getChildDemandElements()) {
1677  showHierarchicalElementChildren(demandElement, treeItem);
1678  }
1679  } else if (HE->getTagProperty().isDataElement()) {
1680  // insert data item
1681  FXTreeItem* dataElementItem = addListItem(HE, itemParent);
1682  // insert intervals
1683  if (HE->getTagProperty().getTag() == SUMO_TAG_DATASET) {
1684  GNEDataSet* dataSet = myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveDataSet(HE->getID());
1685  // iterate over intevals
1686  for (const auto& interval : dataSet->getDataIntervalChildren()) {
1687  showHierarchicalElementChildren(interval.second, dataElementItem);
1688  }
1689  } else if (HE->getTagProperty().getTag() == SUMO_TAG_DATAINTERVAL) {
1690  GNEDataInterval* dataInterval = dynamic_cast<GNEDataInterval*>(HE);
1691  // iterate over generic datas
1692  for (const auto& genericData : dataInterval->getGenericDataChildren()) {
1693  showHierarchicalElementChildren(genericData, dataElementItem);
1694  }
1695  }
1696  }
1697 }
1698 
1699 
1700 FXTreeItem*
1701 GNEFrameModuls::HierarchicalElementTree::addListItem(GNEAttributeCarrier* AC, FXTreeItem* itemParent, std::string prefix, std::string sufix) {
1702  // insert item in Tree list
1703  FXTreeItem* item = myTreeListDinamic->insertItem(nullptr, itemParent, (prefix + AC->getHierarchyName() + sufix).c_str(), AC->getIcon(), AC->getIcon());
1704  // insert item in map
1705  myTreeItemToACMap[item] = AC;
1706  // by default item is expanded
1707  item->setExpanded(true);
1708  // return created FXTreeItem
1709  return item;
1710 }
1711 
1712 
1713 FXTreeItem*
1714 GNEFrameModuls::HierarchicalElementTree::addListItem(FXTreeItem* itemParent, const std::string& text, FXIcon* icon, bool expanded) {
1715  // insert item in Tree list
1716  FXTreeItem* item = myTreeListDinamic->insertItem(nullptr, itemParent, text.c_str(), icon, icon);
1717  // expand item depending of flag expanded
1718  item->setExpanded(expanded);
1719  // return created FXTreeItem
1720  return item;
1721 }
1722 
1723 // ---------------------------------------------------------------------------
1724 // GNEFrameModuls::DrawingShape - methods
1725 // ---------------------------------------------------------------------------
1726 
1728  FXGroupBoxModule(frameParent->myContentFrame, "Drawing"),
1729  myFrameParent(frameParent),
1730  myDeleteLastCreatedPoint(false) {
1731  // create start and stop buttons
1732  myStartDrawingButton = new FXButton(getCollapsableFrame(), "Start drawing", 0, this, MID_GNE_STARTDRAWING, GUIDesignButton);
1733  myStopDrawingButton = new FXButton(getCollapsableFrame(), "Stop drawing", 0, this, MID_GNE_STOPDRAWING, GUIDesignButton);
1734  myAbortDrawingButton = new FXButton(getCollapsableFrame(), "Abort drawing", 0, this, MID_GNE_ABORTDRAWING, GUIDesignButton);
1735  // create information label
1736  std::ostringstream information;
1737  information
1738  << "- 'Start drawing' or ENTER\n"
1739  << " to create shape.\n"
1740  << "- 'Stop drawing' or ENTER to\n"
1741  << " finish shape creation.\n"
1742  << "- 'Abort drawing' or ESC to\n"
1743  << " abort shape creation.\n"
1744  << "- 'Shift + Click' to remove\n"
1745  << " last inserted point.";
1746  myInformationLabel = new FXLabel(getCollapsableFrame(), information.str().c_str(), 0, GUIDesignLabelFrameInformation);
1747  // disable stop and abort functions as init
1748  myStopDrawingButton->disable();
1749  myAbortDrawingButton->disable();
1750 }
1751 
1752 
1754 
1755 
1757  // abort current drawing before show
1758  abortDrawing();
1759  // show FXGroupBoxModule
1760  FXGroupBoxModule::show();
1761 }
1762 
1763 
1765  // abort current drawing before hide
1766  abortDrawing();
1767  // show FXGroupBoxModule
1768  FXGroupBoxModule::hide();
1769 }
1770 
1771 
1772 void
1774  // Only start drawing if DrawingShape modul is shown
1775  if (shown()) {
1776  // change buttons
1777  myStartDrawingButton->disable();
1778  myStopDrawingButton->enable();
1779  myAbortDrawingButton->enable();
1780  }
1781 }
1782 
1783 
1784 void
1786  // try to build shape
1787  if (myFrameParent->shapeDrawed()) {
1788  // clear created points
1789  myTemporalShape.clear();
1790  // change buttons
1791  myStartDrawingButton->enable();
1792  myStopDrawingButton->disable();
1793  myAbortDrawingButton->disable();
1794  } else {
1795  // abort drawing if shape cannot be created
1796  abortDrawing();
1797  }
1798 }
1799 
1800 
1801 void
1803  // clear created points
1804  myTemporalShape.clear();
1805  // change buttons
1806  myStartDrawingButton->enable();
1807  myStopDrawingButton->disable();
1808  myAbortDrawingButton->disable();
1809 }
1810 
1811 
1812 void
1814  if (myStopDrawingButton->isEnabled()) {
1815  myTemporalShape.push_back(P);
1816  } else {
1817  throw ProcessError("A new point cannot be added if drawing wasn't started");
1818  }
1819 }
1820 
1821 
1822 void
1824  if (myTemporalShape.size() > 1) {
1825  myTemporalShape.pop_back();
1826  }
1827 }
1828 
1829 
1830 const PositionVector&
1832  return myTemporalShape;
1833 }
1834 
1835 
1836 bool
1838  return myStopDrawingButton->isEnabled();
1839 }
1840 
1841 
1842 void
1844  myDeleteLastCreatedPoint = value;
1845 }
1846 
1847 
1848 bool
1850  return myDeleteLastCreatedPoint;
1851 }
1852 
1853 
1854 long
1856  startDrawing();
1857  return 0;
1858 }
1859 
1860 
1861 long
1862 GNEFrameModuls::DrawingShape::onCmdStopDrawing(FXObject*, FXSelector, void*) {
1863  stopDrawing();
1864  return 0;
1865 }
1866 
1867 
1868 long
1870  abortDrawing();
1871  return 0;
1872 }
1873 
1874 // ---------------------------------------------------------------------------
1875 // GNEFrameModuls::SelectorParent - methods
1876 // ---------------------------------------------------------------------------
1877 
1879  FXGroupBoxModule(frameParent->myContentFrame, "Parent selector"),
1880  myFrameParent(frameParent) {
1881  // Create label with the type of SelectorParent
1882  myParentsLabel = new FXLabel(getCollapsableFrame(), "No additional selected", nullptr, GUIDesignLabelLeftThick);
1883  // Create list
1885  // Hide List
1887 }
1888 
1889 
1891 
1892 
1893 std::string
1895  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1896  if (myParentsList->isItemSelected(i)) {
1897  return myParentsList->getItem(i)->getText().text();
1898  }
1899  }
1900  return "";
1901 }
1902 
1903 
1904 void
1906  // first unselect all
1907  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1908  myParentsList->getItem(i)->setSelected(false);
1909  }
1910  // select element if correspond to given ID
1911  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1912  if (myParentsList->getItem(i)->getText().text() == id) {
1913  myParentsList->getItem(i)->setSelected(true);
1914  }
1915  }
1916  // recalc myFirstParentsList
1917  myParentsList->recalc();
1918 }
1919 
1920 
1921 bool
1922 GNEFrameModuls::SelectorParent::showSelectorParentModul(const std::vector<SumoXMLTag>& additionalTypeParents) {
1923  // make sure that we're editing an additional tag
1924  const auto listOfTags = GNEAttributeCarrier::getTagPropertiesByType(GNETagProperties::TagType::ADDITIONALELEMENT);
1925  for (const auto& tagIt : listOfTags) {
1926  if (std::find(additionalTypeParents.begin(), additionalTypeParents.end(), tagIt.getTag()) != additionalTypeParents.end()) {
1927  myParentTags = additionalTypeParents;
1928  myParentsLabel->setText(("Parent type: " + tagIt.getFieldString()).c_str());
1929  refreshSelectorParentModul();
1930  show();
1931  return true;
1932  }
1933  }
1934  return false;
1935 }
1936 
1937 
1938 void
1940  myParentTags.clear();
1941  hide();
1942 }
1943 
1944 
1945 void
1947  // save current edited elements
1948  std::set<std::string> selectedItems;
1949  for (int i = 0; i < myParentsList->getNumItems(); i++) {
1950  if (myParentsList->isItemSelected(i)) {
1951  selectedItems.insert(myParentsList->getItem(i)->getText().text());
1952  }
1953  }
1954  myParentsList->clearItems();
1955  if (myParentTags.size() > 0) {
1956  // insert additionals sorted
1957  std::set<std::string> IDs;
1958  // fill list with IDs of additionals
1959  for (const auto& parentTag : myParentTags) {
1960  for (const auto& additional : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getAdditionals().at(parentTag)) {
1961  IDs.insert(additional->getID().c_str());
1962  }
1963  }
1964  // fill list with IDs of additionals
1965  for (const auto& ID : IDs) {
1966  const int item = myParentsList->appendItem(ID.c_str());
1967  if (selectedItems.find(ID) != selectedItems.end()) {
1968  myParentsList->selectItem(item);
1969  }
1970  }
1971  }
1972 }
1973 
1974 // ---------------------------------------------------------------------------
1975 // GNEFrameModuls::OverlappedInspection - methods
1976 // ---------------------------------------------------------------------------
1977 
1979  FXGroupBoxModule(frameParent->myContentFrame, "Overlapped elements"),
1980  myFrameParent(frameParent),
1981  myFilteredTag(SUMO_TAG_NOTHING),
1982  myItemIndex(0) {
1983  // build elements
1984  buildFXElements();
1985 }
1986 
1987 
1989  FXGroupBoxModule(frameParent->myContentFrame, ("Overlapped " + toString(filteredTag) + "s").c_str()),
1990  myFrameParent(frameParent),
1991  myFilteredTag(filteredTag),
1992  myItemIndex(0) {
1993  // build elements
1994  buildFXElements();
1995 }
1996 
1997 
1999 
2000 
2001 void
2003  // first clear myOverlappedACs
2004  myOverlappedACs.clear();
2005  // reserve
2006  myOverlappedACs.reserve(objectsUnderCursor.getClickedAttributeCarriers().size());
2007  // iterate over objects under cursor
2008  for (const auto& AC : objectsUnderCursor.getClickedAttributeCarriers()) {
2009  bool insert = true;
2010  // check supermode demand
2011  if (myFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
2012  !AC->getTagProperty().isDemandElement()) {
2013  insert = false;
2014  }
2015  // check supermode data
2016  if (myFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData() &&
2017  !AC->getTagProperty().isGenericData()) {
2018  insert = false;
2019  }
2020  // check filter
2021  if ((myFilteredTag != SUMO_TAG_NOTHING) && (AC->getTagProperty().getTag() != myFilteredTag)) {
2022  insert = false;
2023  }
2024  if (insert) {
2025  myOverlappedACs.push_back(AC);
2026  }
2027  }
2028  // continue depending of number of myOverlappedACs
2029  if (myOverlappedACs.size() > 1) {
2030  mySavedClickedPosition = clickedPosition;
2031  // by default we inspect first element
2032  myItemIndex = 0;
2033  // update text of current index button
2034  myCurrentIndexButton->setText(("1 / " + toString(myOverlappedACs.size())).c_str());
2035  // clear and fill list again
2036  myOverlappedElementList->clearItems();
2037  for (int i = 0; i < (int)myOverlappedACs.size(); i++) {
2038  myOverlappedElementList->insertItem(i, myOverlappedACs.at(i)->getID().c_str(), myOverlappedACs.at(i)->getIcon());
2039  }
2040  // set first element as selected element
2041  myOverlappedElementList->getItem(0)->setSelected(TRUE);
2042  // by default list hidden
2043  myOverlappedElementList->hide();
2044  // show OverlappedInspection modul
2045  show();
2046  } else {
2047  // hide OverlappedInspection modul
2048  hide();
2049  }
2050 }
2051 
2052 
2053 void
2055  // hide OverlappedInspection modul
2056  hide();
2057 }
2058 
2059 
2060 bool
2062  // show OverlappedInspection modul
2063  return shown();
2064 }
2065 
2066 
2067 int
2069  return (int)myOverlappedACs.size();
2070 }
2071 
2072 
2073 bool
2075  return (mySavedClickedPosition.distanceSquaredTo2D(clickedPosition) < 0.25);
2076 }
2077 
2078 
2079 bool
2081  // first check if OverlappedInspection is shown
2082  if (shown()) {
2083  // check if given position is near saved position
2084  if (checkSavedPosition(clickedPosition)) {
2085  // inspect next element
2086  onCmdNextElement(0, 0, 0);
2087  return true;
2088  } else {
2089  return false;
2090  }
2091  } else {
2092  return false;
2093  }
2094 }
2095 
2096 
2097 bool
2099  // first check if OverlappedInspection is shown
2100  if (shown()) {
2101  // check if given position is near saved position
2102  if (checkSavedPosition(clickedPosition)) {
2103  // inspect previousElement
2104  onCmdPreviousElement(0, 0, 0);
2105  return true;
2106  } else {
2107  return false;
2108  }
2109  } else {
2110  return false;
2111  }
2112 }
2113 
2114 
2115 long
2117  // check if there is items
2118  if (myOverlappedElementList->getNumItems() > 0) {
2119  // unselect current list element
2120  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(FALSE);
2121  // set index (it works as a ring)
2122  if (myItemIndex > 0) {
2123  myItemIndex--;
2124  } else {
2125  myItemIndex = (myOverlappedACs.size() - 1);
2126  }
2127  // selected current list element
2128  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(TRUE);
2129  myOverlappedElementList->update();
2130  // update current index button
2131  myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str());
2132  // inspect overlapped attribute carrier
2133  myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
2134  // show OverlappedInspection again (because it's hidden in inspectSingleElement)
2135  show();
2136  }
2137  return 1;
2138 }
2139 
2140 
2141 long
2143  // check if there is items
2144  if (myOverlappedElementList->getNumItems() > 0) {
2145  // unselect current list element
2146  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(FALSE);
2147  // set index (it works as a ring)
2148  myItemIndex = (myItemIndex + 1) % myOverlappedACs.size();
2149  // selected current list element
2150  myOverlappedElementList->getItem((int)myItemIndex)->setSelected(TRUE);
2151  myOverlappedElementList->update();
2152  // update current index button
2153  myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str());
2154  // inspect overlapped attribute carrier
2155  myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
2156  // show OverlappedInspection again (because it's hidden in inspectSingleElement)
2157  show();
2158  }
2159  return 1;
2160 }
2161 
2162 
2163 long
2165  // show or hidde element list
2166  if (myOverlappedElementList->shown()) {
2167  myOverlappedElementList->hide();
2168  } else {
2169  myOverlappedElementList->show();
2170  }
2171  if (myOverlappedElementList->getNumItems() <= 10) {
2172  myOverlappedElementList->setHeight(23 * myOverlappedElementList->getNumItems());
2173  } else {
2174  myOverlappedElementList->setHeight(230);
2175  }
2176  myOverlappedElementList->recalc();
2177  // recalc and update frame
2178  recalc();
2179  return 1;
2180 }
2181 
2182 long
2184  for (int i = 0; i < myOverlappedElementList->getNumItems(); i++) {
2185  if (myOverlappedElementList->getItem(i)->isSelected()) {
2186  myItemIndex = i;
2187  // update current index button
2188  myCurrentIndexButton->setText((toString(myItemIndex + 1) + " / " + toString(myOverlappedACs.size())).c_str());
2189  // inspect overlapped attribute carrier
2190  myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
2191  // show OverlappedInspection again (because it's hidden in inspectSingleElement)
2192  show();
2193  return 1;
2194  }
2195  }
2196  return 0;
2197 }
2198 
2199 
2200 long
2202  FXDialogBox* helpDialog = new FXDialogBox(getCollapsableFrame(), "GEO attributes Help", GUIDesignDialogBox);
2203  std::ostringstream help;
2204  help
2205  << " - Click in the same position\n"
2206  << " for inspect next element\n"
2207  << " - Shift + Click in the same\n"
2208  << " position for inspect\n"
2209  << " previous element";
2210  new FXLabel(helpDialog, help.str().c_str(), nullptr, GUIDesignLabelFrameInformation);
2211  // "OK"
2212  new FXButton(helpDialog, "OK\t\tclose", GUIIconSubSys::getIcon(GUIIcon::ACCEPT), helpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK);
2213  helpDialog->create();
2214  helpDialog->show();
2215  return 1;
2216 }
2217 
2218 
2220  myFrameParent(nullptr),
2221  myPreviousElement(nullptr),
2222  myCurrentIndexButton(nullptr),
2223  myNextElement(nullptr),
2224  myOverlappedElementList(nullptr),
2225  myHelpButton(nullptr),
2226  myFilteredTag(SUMO_TAG_NOTHING),
2227  myItemIndex(0) {
2228 }
2229 
2230 
2231 void
2233  FXHorizontalFrame* frameButtons = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
2234  // Create previous Item Button
2235  myPreviousElement = new FXButton(frameButtons, "", GUIIconSubSys::getIcon(GUIIcon::BIGARROWLEFT), this, MID_GNE_OVERLAPPED_PREVIOUS, GUIDesignButtonIconRectangular);
2236  // create current index button
2237  myCurrentIndexButton = new FXButton(frameButtons, "", nullptr, this, MID_GNE_OVERLAPPED_SHOWLIST, GUIDesignButton);
2238  // Create next Item Button
2239  myNextElement = new FXButton(frameButtons, "", GUIIconSubSys::getIcon(GUIIcon::BIGARROWRIGHT), this, MID_GNE_OVERLAPPED_NEXT, GUIDesignButtonIconRectangular);
2240  // Create list of overlapped elements (by default hidden)
2241  myOverlappedElementList = new FXList(getCollapsableFrame(), this, MID_GNE_OVERLAPPED_ITEMSELECTED, GUIDesignListFixedHeight);
2242  // by default list of overlapped elements is hidden)
2243  myOverlappedElementList->hide();
2244  // Create help button
2245  myHelpButton = new FXButton(getCollapsableFrame(), "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular);
2246 }
2247 
2248 // ---------------------------------------------------------------------------
2249 // GNEFrameModuls::PathCreator - methods
2250 // ---------------------------------------------------------------------------
2251 
2253  mySubPath({edge}),
2254  myFromBusStop(nullptr),
2255  myToBusStop(nullptr),
2256  myConflictVClass(false),
2257 myConflictDisconnected(false) {
2258  // check if we have to change vClass flag
2259  if (edge->getNBEdge()->getNumLanesThatAllow(vClass) == 0) {
2260  myConflictVClass = true;
2261  }
2262 }
2263 
2264 
2266  myFromBusStop(nullptr),
2267  myToBusStop(nullptr),
2268  myConflictVClass(false),
2269  myConflictDisconnected(false) {
2270  // calculate subpath
2271  mySubPath = viewNet->getNet()->getPathManager()->getPathCalculator()->calculateDijkstraPath(vClass, {edgeFrom, edgeTo});
2272  // if subPath is empty, try it with pedestrian (i.e. ignoring vCass)
2273  if (mySubPath.empty()) {
2274  mySubPath = viewNet->getNet()->getPathManager()->getPathCalculator()->calculateDijkstraPath(SVC_PEDESTRIAN, {edgeFrom, edgeTo});
2275  if (mySubPath.empty()) {
2276  mySubPath = { edgeFrom, edgeTo };
2277  myConflictDisconnected = true;
2278  } else {
2279  myConflictVClass = true;
2280  }
2281  }
2282 }
2283 
2284 
2285 const std::vector<GNEEdge*>&
2287  return mySubPath;
2288 }
2289 
2290 
2292  return myFromBusStop;
2293 }
2294 
2295 
2297  return myToBusStop;
2298 }
2299 
2300 
2301 bool
2303  return myConflictVClass;
2304 }
2305 
2306 
2307 bool
2309  return myConflictDisconnected;
2310 }
2311 
2312 
2314  myFromBusStop(nullptr),
2315  myToBusStop(nullptr),
2316  myConflictVClass(false),
2317  myConflictDisconnected(false) {
2318 }
2319 
2320 
2322  FXGroupBoxModule(frameParent->myContentFrame, "Route creator"),
2323  myFrameParent(frameParent),
2325  myCreationMode(0),
2326  myToStoppingPlace(nullptr),
2327  myRoute(nullptr) {
2328  // create label for route info
2329  myInfoRouteLabel = new FXLabel(getCollapsableFrame(), "No edges selected", 0, GUIDesignLabelFrameThicked);
2330  // create button for finish route creation
2331  myFinishCreationButton = new FXButton(getCollapsableFrame(), "Finish route creation", nullptr, this, MID_GNE_EDGEPATH_FINISH, GUIDesignButton);
2332  myFinishCreationButton->disable();
2333  // create button for abort route creation
2334  myAbortCreationButton = new FXButton(getCollapsableFrame(), "Abort route creation", nullptr, this, MID_GNE_EDGEPATH_ABORT, GUIDesignButton);
2335  myAbortCreationButton->disable();
2336  // create button for remove last inserted edge
2337  myRemoveLastInsertedElement = new FXButton(getCollapsableFrame(), "Remove last inserted edge", nullptr, this, MID_GNE_EDGEPATH_REMOVELAST, GUIDesignButton);
2338  myRemoveLastInsertedElement->disable();
2339  // create check button
2340  myShowCandidateEdges = new FXCheckButton(getCollapsableFrame(), "Show candidate edges", this, MID_GNE_EDGEPATH_SHOWCANDIDATES, GUIDesignCheckButton);
2341  myShowCandidateEdges->setCheck(TRUE);
2342  // create shift label
2343  myShiftLabel = new FXLabel(this,
2344  "SHIFT-click: ignore vClass",
2346  // create control label
2347  myControlLabel = new FXLabel(this,
2348  "CTRL-click: add disconnected",
2350  // create backspace label (always shown)
2351  new FXLabel(this,
2352  "BACKSPACE: undo click",
2354 }
2355 
2356 
2358 
2359 
2360 void
2361 GNEFrameModuls::PathCreator::showPathCreatorModul(SumoXMLTag element, const bool firstElement, const bool consecutives) {
2362  // declare flag
2363  bool showPathCreator = true;
2364  // first abort creation
2365  abortPathCreation();
2366  // disable buttons
2367  myFinishCreationButton->disable();
2368  myAbortCreationButton->disable();
2369  myRemoveLastInsertedElement->disable();
2370  // reset creation mode
2371  myCreationMode = 0;
2372  // set first element
2373  if (firstElement) {
2374  myCreationMode |= REQUIRE_FIRSTELEMENT;
2375  }
2376  // set consecutive or non consecuives
2377  if (consecutives) {
2378  myCreationMode |= CONSECUTIVE_EDGES;
2379  } else {
2380  myCreationMode |= NONCONSECUTIVE_EDGES;
2381  }
2382  // set specific mode depending of tag
2383  switch (element) {
2384  // routes
2385  case SUMO_TAG_ROUTE:
2387  myCreationMode |= SHOW_CANDIDATE_EDGES;
2388  myCreationMode |= START_EDGE;
2389  myCreationMode |= END_EDGE;
2390  break;
2391  // vehicles
2392  case SUMO_TAG_VEHICLE:
2393  case GNE_TAG_FLOW_ROUTE:
2394  case GNE_TAG_WALK_ROUTE:
2395  myCreationMode |= SINGLE_ELEMENT;
2396  myCreationMode |= ROUTE;
2397  break;
2398  case SUMO_TAG_TRIP:
2399  case SUMO_TAG_FLOW:
2402  myCreationMode |= SHOW_CANDIDATE_EDGES;
2403  myCreationMode |= START_EDGE;
2404  myCreationMode |= END_EDGE;
2405  break;
2406  // walk edges
2407  case GNE_TAG_WALK_EDGES:
2408  myCreationMode |= SHOW_CANDIDATE_EDGES;
2409  myCreationMode |= START_EDGE;
2410  myCreationMode |= END_EDGE;
2411  break;
2412  // edge->edge
2414  case GNE_TAG_RIDE_EDGE:
2415  case GNE_TAG_WALK_EDGE:
2416  myCreationMode |= SHOW_CANDIDATE_EDGES;
2417  myCreationMode |= ONLY_FROMTO;
2418  myCreationMode |= START_EDGE;
2419  myCreationMode |= END_EDGE;
2420  break;
2421  // edge->busStop
2423  case GNE_TAG_RIDE_BUSSTOP:
2424  case GNE_TAG_WALK_BUSSTOP:
2425  myCreationMode |= SHOW_CANDIDATE_EDGES;
2426  myCreationMode |= ONLY_FROMTO;
2427  myCreationMode |= END_BUSSTOP;
2428  break;
2429  // stops
2431  myCreationMode |= SINGLE_ELEMENT;
2432  myCreationMode |= END_BUSSTOP;
2433  break;
2435  myCreationMode |= SINGLE_ELEMENT;
2436  myCreationMode |= START_EDGE;
2437  break;
2438  // generic datas
2439  case SUMO_TAG_EDGEREL:
2440  myCreationMode |= ONLY_FROMTO;
2441  myCreationMode |= START_EDGE;
2442  myCreationMode |= END_EDGE;
2443  break;
2444  default:
2445  showPathCreator = false;
2446  break;
2447  }
2448  // check if show path creator
2449  if (showPathCreator) {
2450  // update edge colors
2451  updateEdgeColors();
2452  // recalc before show (to avoid graphic problems)
2453  recalc();
2454  // show modul
2455  show();
2456  } else {
2457  // hide modul
2458  hide();
2459  }
2460 }
2461 
2462 
2463 void
2465  // clear path
2466  clearPath();
2467  // hide modul
2468  hide();
2469 }
2470 
2471 
2474  return myVClass;
2475 }
2476 
2477 
2478 void
2480  myVClass = vClass;
2481  // update edge colors
2482  updateEdgeColors();
2483 }
2484 
2485 
2486 bool
2487 GNEFrameModuls::PathCreator::addEdge(GNEEdge* edge, const bool shiftKeyPressed, const bool controlKeyPressed) {
2488  // check if edges are allowed
2489  if (((myCreationMode & CONSECUTIVE_EDGES) + (myCreationMode & NONCONSECUTIVE_EDGES) +
2490  (myCreationMode & START_EDGE) + (myCreationMode & END_EDGE)) == 0) {
2491  return false;
2492  }
2493  // check if only an edge is allowed
2494  if ((myCreationMode & SINGLE_ELEMENT) && (mySelectedEdges.size() == 1)) {
2495  return false;
2496  }
2497  // continue depending of number of selected eges
2498  if (mySelectedEdges.size() > 0) {
2499  // check double edges
2500  if (mySelectedEdges.back() == edge) {
2501  // Write warning
2502  WRITE_WARNING("Double edges aren't allowed");
2503  // abort add edge
2504  return false;
2505  }
2506  // check consecutive edges
2507  if (myCreationMode & Mode::CONSECUTIVE_EDGES) {
2508  // check that new edge is consecutive
2509  const auto& outgoingEdges = mySelectedEdges.back()->getToJunction()->getGNEOutgoingEdges();
2510  if (std::find(outgoingEdges.begin(), outgoingEdges.end(), edge) == outgoingEdges.end()) {
2511  // Write warning
2512  WRITE_WARNING("Only consecutives edges are allowed");
2513  // abort add edge
2514  return false;
2515  }
2516  }
2517  }
2518  // check number of edges
2519  if (mySelectedEdges.size() == 2 && (myCreationMode & Mode::ONLY_FROMTO)) {
2520  // Write warning
2521  WRITE_WARNING("Only two edges are allowed");
2522  // abort add edge
2523  return false;
2524  }
2525  // check candidate edge
2526  if ((myShowCandidateEdges->getCheck() == TRUE) && !edge->isPossibleCandidate()) {
2527  if (edge->isSpecialCandidate()) {
2528  if (!shiftKeyPressed) {
2529  // Write warning
2530  WRITE_WARNING("Invalid edge (SHIFT + click to add an invalid vClass edge)");
2531  // abort add edge
2532  return false;
2533  }
2534  } else if (edge->isConflictedCandidate()) {
2535  if (!controlKeyPressed) {
2536  // Write warning
2537  WRITE_WARNING("Invalid edge (CONTROL + click to add a disconnected edge)");
2538  // abort add edge
2539  return false;
2540  }
2541  }
2542  }
2543  // All checks ok, then add it in selected elements
2544  mySelectedEdges.push_back(edge);
2545  // enable abort route button
2546  myAbortCreationButton->enable();
2547  // enable finish button
2548  myFinishCreationButton->enable();
2549  // disable undo/redo
2550  myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("route creation");
2551  // enable or disable remove last edge button
2552  if (mySelectedEdges.size() > 1) {
2553  myRemoveLastInsertedElement->enable();
2554  } else {
2555  myRemoveLastInsertedElement->disable();
2556  }
2557  // recalculate path
2558  recalculatePath();
2559  // update info route label
2560  updateInfoRouteLabel();
2561  // update edge colors
2562  updateEdgeColors();
2563  return true;
2564 }
2565 
2566 
2567 std::vector<GNEEdge*>
2569  return mySelectedEdges;
2570 }
2571 
2572 
2573 bool
2574 GNEFrameModuls::PathCreator::addStoppingPlace(GNEAdditional* stoppingPlace, const bool /*shiftKeyPressed*/, const bool /*controlKeyPressed*/) {
2575  // check if stoppingPlaces aren allowed
2576  if ((myCreationMode & END_BUSSTOP) == 0) {
2577  return false;
2578  }
2579  // check if previously stopping place from was set
2580  if (myToStoppingPlace) {
2581  return false;
2582  } else {
2583  myToStoppingPlace = stoppingPlace;
2584  }
2585  // enable abort route button
2586  myAbortCreationButton->enable();
2587  // enable finish button
2588  myFinishCreationButton->enable();
2589  // disable undo/redo
2590  myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("route creation");
2591  // enable or disable remove last stoppingPlace button
2592  if (myToStoppingPlace) {
2593  myRemoveLastInsertedElement->enable();
2594  } else {
2595  myRemoveLastInsertedElement->disable();
2596  }
2597  // recalculate path
2598  recalculatePath();
2599  // update info route label
2600  updateInfoRouteLabel();
2601  // update stoppingPlace colors
2602  updateEdgeColors();
2603  return true;
2604 }
2605 
2606 
2609  if (myToStoppingPlace && (myToStoppingPlace->getTagProperty().getTag() == expectedTag)) {
2610  return myToStoppingPlace;
2611  } else {
2612  return nullptr;
2613  }
2614 }
2615 
2616 
2617 bool
2618 GNEFrameModuls::PathCreator::addRoute(GNEDemandElement* route, const bool /*shiftKeyPressed*/, const bool /*controlKeyPressed*/) {
2619  // check if routes aren allowed
2620  if ((myCreationMode & ROUTE) == 0) {
2621  return false;
2622  }
2623  // check if previously a route was added
2624  if (myRoute) {
2625  return false;
2626  }
2627  // set route
2628  myRoute = route;
2629  // recalculate path
2630  recalculatePath();
2631  updateInfoRouteLabel();
2632  updateEdgeColors();
2633  return true;
2634 }
2635 
2636 
2637 void
2639  // set route
2640  myRoute = nullptr;
2641  // recalculate path
2642  recalculatePath();
2643  updateInfoRouteLabel();
2644  updateEdgeColors();
2645 }
2646 
2647 
2650  return myRoute;
2651 }
2652 
2653 
2654 const std::vector<GNEFrameModuls::PathCreator::Path>&
2656  return myPath;
2657 }
2658 
2659 
2660 bool
2662  return (myShowCandidateEdges->getCheck() == TRUE);
2663 }
2664 
2665 
2666 void
2668  // reset all flags
2669  for (const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2670  edge.second->resetCandidateFlags();
2671  }
2672  // set reachability
2673  if (mySelectedEdges.size() > 0) {
2674  // only coloring edges if checkbox "show candidate edges" is enabled
2675  if ((myShowCandidateEdges->getCheck() == TRUE) && (myCreationMode & SHOW_CANDIDATE_EDGES)) {
2676  // mark all edges as conflicted (to mark special candidates)
2677  for (const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2678  edge.second->setConflictedCandidate(true);
2679  }
2680  // set special candidates (Edges that are connected but aren't compatibles with current vClass
2681  setSpecialCandidates(mySelectedEdges.back());
2682  // mark again all edges as conflicted (to mark possible candidates)
2683  for (const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2684  edge.second->setConflictedCandidate(true);
2685  }
2686  // set possible candidates (Edges that are connected AND are compatibles with current vClass
2687  setPossibleCandidates(mySelectedEdges.back(), myVClass);
2688  }
2689  // now mark selected eges
2690  for (const auto& edge : mySelectedEdges) {
2691  edge->resetCandidateFlags();
2692  edge->setSourceCandidate(true);
2693  }
2694  // finally mark last selected element as target
2695  mySelectedEdges.back()->resetCandidateFlags();
2696  mySelectedEdges.back()->setTargetCandidate(true);
2697  } else if (myShowCandidateEdges->getCheck() == TRUE && (myCreationMode & SHOW_CANDIDATE_EDGES)) {
2698  // mark all edges that have at least one lane that allow given vClass
2699  for (const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2700  if (edge.second->getNBEdge()->getNumLanesThatAllow(myVClass) > 0) {
2701  edge.second->setPossibleCandidate(true);
2702  } else {
2703  edge.second->setSpecialCandidate(true);
2704  }
2705  }
2706  }
2707  // update view net
2708  myFrameParent->myViewNet->updateViewNet();
2709 }
2710 
2711 
2712 #if defined(_MSC_VER) && _MSC_VER == 1800
2713 #pragma warning(push)
2714 #pragma warning(disable: 4100) // do not warn about "unused" parameters which get optimized away
2715 #endif
2716 void
2718  if (myPath.size() > 0) {
2719  const double lineWidth = 0.35;
2720  const double lineWidthin = 0.25;
2721  // Add a draw matrix
2723  // Start with the drawing of the area traslating matrix to origin
2724  glTranslated(0, 0, GLO_MAX - 0.1);
2725  // set first color
2727  // iterate over path
2728  for (int i = 0; i < (int)myPath.size(); i++) {
2729  // get path
2730  const GNEFrameModuls::PathCreator::Path& path = myPath.at(i);
2731  // draw line over
2732  for (int j = 0; j < (int)path.getSubPath().size(); j++) {
2733  const GNELane* lane = path.getSubPath().at(j)->getLanes().back();
2734  if (((i == 0) && (j == 0)) || (j > 0)) {
2735  GLHelper::drawBoxLines(lane->getLaneShape(), lineWidth);
2736  }
2737  // draw connection between lanes
2738  if ((j + 1) < (int)path.getSubPath().size()) {
2739  const GNELane* nextLane = path.getSubPath().at(j + 1)->getLanes().back();
2740  if (lane->getLane2laneConnections().exist(nextLane)) {
2742  } else {
2743  GLHelper::drawBoxLines({lane->getLaneShape().back(), nextLane->getLaneShape().front()}, lineWidth);
2744  }
2745  }
2746  }
2747  }
2748  glTranslated(0, 0, 0.1);
2749  // iterate over path again
2750  for (int i = 0; i < (int)myPath.size(); i++) {
2751  // get path
2752  const GNEFrameModuls::PathCreator::Path& path = myPath.at(i);
2753  // set path color color
2754  if ((myCreationMode & SHOW_CANDIDATE_EDGES) == 0) {
2756  } else if (path.isConflictDisconnected()) {
2758  } else if (path.isConflictVClass()) {
2760  } else {
2762  }
2763  // draw line over
2764  for (int j = 0; j < (int)path.getSubPath().size(); j++) {
2765  const GNELane* lane = path.getSubPath().at(j)->getLanes().back();
2766  if (((i == 0) && (j == 0)) || (j > 0)) {
2767  GLHelper::drawBoxLines(lane->getLaneShape(), lineWidthin);
2768  }
2769  // draw connection between lanes
2770  if ((j + 1) < (int)path.getSubPath().size()) {
2771  const GNELane* nextLane = path.getSubPath().at(j + 1)->getLanes().back();
2772  if (lane->getLane2laneConnections().exist(nextLane)) {
2774  } else {
2775  GLHelper::drawBoxLines({ lane->getLaneShape().back(), nextLane->getLaneShape().front() }, lineWidthin);
2776  }
2777  }
2778  }
2779  }
2780  // Pop last matrix
2782  }
2783 }
2784 #if defined(_MSC_VER) && _MSC_VER == 1800
2785 #pragma warning(pop)
2786 #endif
2787 
2788 
2789 void
2791  // call create path implemented in frame parent
2792  myFrameParent->createPath();
2793 }
2794 
2795 
2796 void
2798  // first check that there is elements
2799  if ((mySelectedEdges.size() > 0) || myToStoppingPlace || myRoute) {
2800  // unblock undo/redo
2801  myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo();
2802  // clear edges
2803  clearPath();
2804  // disable buttons
2805  myFinishCreationButton->disable();
2806  myAbortCreationButton->disable();
2807  myRemoveLastInsertedElement->disable();
2808  // update info route label
2809  updateInfoRouteLabel();
2810  // update reachability
2811  updateEdgeColors();
2812  // update view (to see the new route)
2813  myFrameParent->getViewNet()->updateViewNet();
2814  }
2815 }
2816 
2817 
2818 void
2820  if (mySelectedEdges.size() > 1) {
2821  // remove special color of last selected edge
2822  mySelectedEdges.back()->resetCandidateFlags();
2823  // remove last edge
2824  mySelectedEdges.pop_back();
2825  // change last edge flag
2826  if ((mySelectedEdges.size() > 0) && mySelectedEdges.back()->isSourceCandidate()) {
2827  mySelectedEdges.back()->setSourceCandidate(false);
2828  mySelectedEdges.back()->setTargetCandidate(true);
2829  }
2830  // enable or disable remove last edge button
2831  if (mySelectedEdges.size() > 1) {
2832  myRemoveLastInsertedElement->enable();
2833  } else {
2834  myRemoveLastInsertedElement->disable();
2835  }
2836  // recalculate path
2837  recalculatePath();
2838  // update info route label
2839  updateInfoRouteLabel();
2840  // update reachability
2841  updateEdgeColors();
2842  // update view
2843  myFrameParent->myViewNet->updateViewNet();
2844  }
2845 }
2846 
2847 
2848 long
2849 GNEFrameModuls::PathCreator::onCmdCreatePath(FXObject*, FXSelector, void*) {
2850  // just call create path
2851  createPath();
2852  return 1;
2853 }
2854 
2855 
2856 long
2858  // just call abort path creation
2859  abortPathCreation();
2860  return 1;
2861 }
2862 
2863 
2864 long
2866  // just call remove last element
2867  removeLastElement();
2868  return 1;
2869 }
2870 
2871 
2872 long
2874  // update labels
2875  if (myShowCandidateEdges->getCheck() == TRUE) {
2876  myShiftLabel->show();
2877  myControlLabel->show();
2878  } else {
2879  myShiftLabel->hide();
2880  myControlLabel->hide();
2881  }
2882  // recalc frame
2883  recalc();
2884  // update edge colors (view will be updated within function)
2885  updateEdgeColors();
2886  return 1;
2887 }
2888 
2889 
2890 void
2892  if (myPath.size() > 0) {
2893  // declare variables for route info
2894  double length = 0;
2895  double speed = 0;
2896  int pathSize = 0;
2897  for (const auto& path : myPath) {
2898  for (const auto& edge : path.getSubPath()) {
2899  length += edge->getNBEdge()->getLength();
2900  speed += edge->getNBEdge()->getSpeed();
2901  }
2902  pathSize += (int)path.getSubPath().size();
2903  }
2904  // declare ostringstream for label and fill it
2905  std::ostringstream information;
2906  information
2907  << "- Selected edges: " << toString(mySelectedEdges.size()) << "\n"
2908  << "- Path edges: " << toString(pathSize) << "\n"
2909  << "- Length: " << toString(length) << "\n"
2910  << "- Average speed: " << toString(speed / pathSize);
2911  // set new label
2912  myInfoRouteLabel->setText(information.str().c_str());
2913  } else {
2914  myInfoRouteLabel->setText("No edges selected");
2915  }
2916 }
2917 
2918 
2919 void
2921  // reset all flags
2922  for (const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2923  edge.second->resetCandidateFlags();
2924  }
2925  // clear edges, additionals and route
2926  mySelectedEdges.clear();
2927  myToStoppingPlace = nullptr;
2928  myRoute = nullptr;
2929  // clear path
2930  myPath.clear();
2931  // update info route label
2932  updateInfoRouteLabel();
2933 }
2934 
2935 
2936 void
2938  // first clear path
2939  myPath.clear();
2940  // set edges
2941  std::vector<GNEEdge*> edges;
2942  // add route edges
2943  if (myRoute) {
2944  edges = myRoute->getParentEdges();
2945  } else {
2946  // add selected edges
2947  for (const auto& edge : mySelectedEdges) {
2948  edges.push_back(edge);
2949  }
2950  // add to stopping place edge
2951  if (myToStoppingPlace) {
2952  edges.push_back(myToStoppingPlace->getParentLanes().front()->getParentEdge());
2953  }
2954  }
2955  // fill paths
2956  if (edges.size() == 1) {
2957  myPath.push_back(Path(myVClass, edges.front()));
2958  } else {
2959  // add every segment
2960  for (int i = 1; i < (int)edges.size(); i++) {
2961  myPath.push_back(Path(myFrameParent->getViewNet(), myVClass, edges.at(i - 1), edges.at(i)));
2962  }
2963  }
2964 }
2965 
2966 
2967 void
2969  // first calculate reachability for pedestrians (we use it, because pedestran can walk in almost all edges)
2970  myFrameParent->getViewNet()->getNet()->getPathManager()->getPathCalculator()->calculateReachability(SVC_PEDESTRIAN, originEdge);
2971  // change flags
2972  for (const auto& edge : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
2973  for (const auto& lane : edge.second->getLanes()) {
2974  if (lane->getReachability() > 0) {
2975  lane->getParentEdge()->resetCandidateFlags();
2976  lane->getParentEdge()->setSpecialCandidate(true);
2977  }
2978  }
2979  }
2980 }
2981 
2982 void
2984  // first calculate reachability for pedestrians
2985  myFrameParent->getViewNet()->getNet()->getPathManager()->getPathCalculator()->calculateReachability(vClass, originEdge);
2986  // change flags
2987  for (const auto& edge : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
2988  for (const auto& lane : edge.second->getLanes()) {
2989  if (lane->getReachability() > 0) {
2990  lane->getParentEdge()->resetCandidateFlags();
2991  lane->getParentEdge()->setPossibleCandidate(true);
2992  }
2993  }
2994  }
2995 }
2996 
2997 // ---------------------------------------------------------------------------
2998 // GNERouteFrame::Legend - methods
2999 // ---------------------------------------------------------------------------
3000 
3002  FXGroupBoxModule(frameParent->myContentFrame, "Information") {
3003  // declare label
3004  FXLabel* legendLabel = nullptr;
3005  // edge candidate
3006  legendLabel = new FXLabel(getCollapsableFrame(), " edge candidate", 0, GUIDesignLabelLeft);
3007  legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.possible));
3008  legendLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
3009  // last edge selected
3010  legendLabel = new FXLabel(getCollapsableFrame(), " last edge selected", 0, GUIDesignLabelLeft);
3011  legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));
3012  // edge selected
3013  legendLabel = new FXLabel(getCollapsableFrame(), " edge selected", 0, GUIDesignLabelLeft);
3014  legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.source));
3015  // edge conflict (vClass)
3016  legendLabel = new FXLabel(getCollapsableFrame(), " edge conflict (vClass)", 0, GUIDesignLabelLeft);
3017  legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.special));
3018  // edge disconnected
3019  legendLabel = new FXLabel(getCollapsableFrame(), " edge disconnected", 0, GUIDesignLabelLeft);
3020  legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.conflict));
3021 }
3022 
3023 
3025 
3026 
3027 void
3029  show();
3030 }
3031 
3032 void
3034  hide();
3035 }
3036 
3037 // ---------------------------------------------------------------------------
3038 // GNEFrameModuls - methods
3039 // ---------------------------------------------------------------------------
3040 
3041 FXLabel*
3042 GNEFrameModuls::buildRainbow(FXComposite* parent) {
3043  // create label for color information
3044  FXLabel* label = new FXLabel(parent, "Scale: Min -> Max", nullptr, GUIDesignLabelCenterThick);
3045  // create frame for color scale
3046  FXHorizontalFrame* horizontalFrameColors = new FXHorizontalFrame(parent, GUIDesignAuxiliarHorizontalFrame);
3047  for (const auto& color : GNEViewNetHelper::getRainbowScaledColors()) {
3048  FXLabel* colorLabel = new FXLabel(horizontalFrameColors, "", nullptr, GUIDesignLabelLeft);
3049  colorLabel->setBackColor(MFXUtils::getFXColor(color));
3050  }
3051  // return label
3052  return label;
3053 }
3054 
3055 /****************************************************************************/
GNEAttributeCarrier::getTagPropertiesByType
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
Definition: GNEAttributeCarrier.cpp:611
SUMO_TAG_TRAIN_STOP
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
Definition: SUMOXMLDefinitions.h:65
GNEFrameModuls::OverlappedInspection::getNumberOfOverlappedACs
int getNumberOfOverlappedACs() const
get number of overlapped ACSs
Definition: GNEFrameModuls.cpp:2068
RGBColor::GREY
static const RGBColor GREY
Definition: RGBColor.h:191
GNE_TAG_STOPCONTAINER_EDGE
@ GNE_TAG_STOPCONTAINER_EDGE
Definition: SUMOXMLDefinitions.h:428
GNEFrameModuls::DemandElementSelector::myDemandElementsMatchBox
MFXIconComboBox * myDemandElementsMatchBox
comboBox with the list of elements type
Definition: GNEFrameModuls.h:186
MID_GNE_ACHIERARCHY_MOVEDOWN
@ MID_GNE_ACHIERARCHY_MOVEDOWN
In HierarchicalElementTree list, move element to down.
Definition: GUIAppEnum.h:845
GNEAccess
Definition: GNEAccess.h:36
GNEFrameModuls::HierarchicalElementTree::showHierarchicalElementTree
void showHierarchicalElementTree(GNEAttributeCarrier *AC)
show HierarchicalElementTree
Definition: GNEFrameModuls.cpp:806
GUIDesignLabelFrameThicked
#define GUIDesignLabelFrameThicked
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:238
GNEFrameModuls::HierarchicalElementTree::~HierarchicalElementTree
~HierarchicalElementTree()
destructor
Definition: GNEFrameModuls.cpp:802
GNEFrameModuls::PathCreator::addEdge
bool addEdge(GNEEdge *edge, const bool shiftKeyPressed, const bool controlKeyPressed)
add edge
Definition: GNEFrameModuls.cpp:2487
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:334
GLO_MAX
@ GLO_MAX
empty max
Definition: GUIGlObjectTypes.h:262
SVC_PEDESTRIAN
@ SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:156
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:133
GNEVariableSpeedSign.h
GNE_TAG_VEHICLE_WITHROUTE
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:398
MID_GNE_ACHIERARCHY_SHOWCHILDMENU
@ MID_GNE_ACHIERARCHY_SHOWCHILDMENU
In HierarchicalElementTree list, show child menu.
Definition: GUIAppEnum.h:841
GNEFrameModuls::PathCreator::myToStoppingPlace
GNEAdditional * myToStoppingPlace
to additional (usually a busStop)
Definition: GNEFrameModuls.h:722
GNEAttributeCarrier::getIcon
FXIcon * getIcon() const
get FXIcon associated to this AC
Definition: GNEAttributeCarrier.cpp:577
GNEDetectorEntryExit.h
GNEFrameModuls::DrawingShape::DrawingShape
DrawingShape(GNEFrame *frameParent)
FOX-declaration.
Definition: GNEFrameModuls.cpp:1727
GNEFrameModuls::HierarchicalElementTree::showAttributeCarrierParents
FXTreeItem * showAttributeCarrierParents()
show child of current attributeCarrier
Definition: GNEFrameModuls.cpp:1119
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:52
GNEFrameModuls::TagSelector::ACTemplate::ACTemplate
ACTemplate(GNENet *net, const GNETagProperties tagProperty)
constructor
Definition: GNEFrameModuls.cpp:327
GNEFrameModuls::PathCreator::showPathCreatorModul
void showPathCreatorModul(SumoXMLTag element, const bool firstElement, const bool consecutives)
show PathCreator for the given tag
Definition: GNEFrameModuls.cpp:2361
GNEHierarchicalElement::getParentAdditionals
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
Definition: GNEHierarchicalElement.cpp:144
GUIVisualizationCandidateColorSettings::possible
static const RGBColor possible
color for possible candidate element
Definition: GUIVisualizationSettings.h:265
SUMO_TAG_LANECALIBRATOR
@ SUMO_TAG_LANECALIBRATOR
A calibrator placed over lane (used in netedit)
Definition: SUMOXMLDefinitions.h:107
GNE_TAG_TRANSHIP_EDGES
@ GNE_TAG_TRANSHIP_EDGES
Definition: SUMOXMLDefinitions.h:425
GNEDetectorE2
Definition: GNEDetectorE2.h:32
GUIIconSubSys::getIcon
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:768
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNETransport.h
SUMO_TAG_STOP_PARKINGAREA
@ SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
Definition: SUMOXMLDefinitions.h:208
GNEFrameModuls::TagSelector::myFrameParent
GNEFrame * myFrameParent
pointer to Frame Parent
Definition: GNEFrameModuls.h:112
GNEParkingAreaReroute.h
MFXMenuHeader.h
GNEFrameModuls::DrawingShape::showDrawingShape
void showDrawingShape()
show Drawing mode
Definition: GNEFrameModuls.cpp:1756
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:280
GNEFrameModuls::TagSelector::~TagSelector
~TagSelector()
destructor
Definition: GNEFrameModuls.cpp:156
GNEFrameModuls::DrawingShape::setDeleteLastCreatedPoint
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
Definition: GNEFrameModuls.cpp:1843
GNEFrameModuls::DemandElementSelector::getContainerPlanPreviousEdge
GNEEdge * getContainerPlanPreviousEdge() const
get previous edge for the current container plan
Definition: GNEFrameModuls.cpp:711
SUMO_TAG_POLY
@ SUMO_TAG_POLY
begin/end of the description of a polygon
Definition: SUMOXMLDefinitions.h:53
GNEFrameModuls::PathCreator::Path::getFromBusStop
GNEAdditional * getFromBusStop() const
get from additional
Definition: GNEFrameModuls.cpp:2291
GNEFrameModuls::PathCreator::removeRoute
void removeRoute()
remove route
Definition: GNEFrameModuls.cpp:2638
GNERerouterInterval
Definition: GNERerouterInterval.h:43
GNEAttributeCarrier::getTagProperty
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
Definition: GNEAttributeCarrier.cpp:587
GNENetHelper::AttributeCarriers::retrieveShape
GNEShape * retrieveShape(SumoXMLTag, const std::string &id, bool hardFail=true) const
Returns the named shape.
Definition: GNENetHelper.cpp:1059
DEFAULT_PEDTYPE_ID
const std::string DEFAULT_PEDTYPE_ID
GNE_TAG_STOPPERSON_BUSSTOP
@ GNE_TAG_STOPPERSON_BUSSTOP
Definition: SUMOXMLDefinitions.h:417
SUMO_TAG_STOP_LANE
@ SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
Definition: SUMOXMLDefinitions.h:200
GNEFrameModuls::HierarchicalElementTree::refreshHierarchicalElementTree
void refreshHierarchicalElementTree()
refresh HierarchicalElementTree
Definition: GNEFrameModuls.cpp:845
MID_GNE_ACHIERARCHY_MOVEUP
@ MID_GNE_ACHIERARCHY_MOVEUP
In HierarchicalElementTree list, move element to up.
Definition: GUIAppEnum.h:843
GNEHierarchicalElement::getChildShapes
const std::vector< GNEShape * > & getChildShapes() const
get child shapes
Definition: GNEHierarchicalElement.cpp:198
GNEFrameModuls::PathCreator
Definition: GNEFrameModuls.h:545
GNENetHelper::AttributeCarriers::retrieveEdge
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
Definition: GNENetHelper.cpp:643
GNEVariableSpeedSignStep
Definition: GNEVariableSpeedSignStep.h:38
GNEFrameModuls::HierarchicalElementTree::myTreeListDinamic
FXTreeListDinamic * myTreeListDinamic
tree list dinamic to show the children of the element to erase
Definition: GNEFrameModuls.h:308
GNEFrameModuls::PathCreator::updateInfoRouteLabel
void updateInfoRouteLabel()
update InfoRouteLabel
Definition: GNEFrameModuls.cpp:2891
GNEFrameModuls::PathCreator::setPossibleCandidates
void setPossibleCandidates(GNEEdge *originEdge, const SUMOVehicleClass vClass)
set edgereachability (This function will be called recursively)
Definition: GNEFrameModuls.cpp:2983
GNEFrameModuls::PathCreator::hidePathCreatorModul
void hidePathCreatorModul()
show PathCreator
Definition: GNEFrameModuls.cpp:2464
GNEFrameModuls::DrawingShape::stopDrawing
void stopDrawing()
stop drawing and check if shape can be created
Definition: GNEFrameModuls.cpp:1785
GNEFrameModuls::OverlappedInspection
Definition: GNEFrameModuls.h:448
GNE_TAG_FLOW_ROUTE
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:402
GNEFrameModuls::HierarchicalElementTree::hideHierarchicalElementTree
void hideHierarchicalElementTree()
hide HierarchicalElementTree
Definition: GNEFrameModuls.cpp:821
GNEHierarchicalElement::getChildLanes
const std::vector< GNELane * > & getChildLanes() const
get child lanes
Definition: GNEHierarchicalElement.cpp:186
GNEFrameModuls::DemandElementSelector::setDemandElement
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
Definition: GNEFrameModuls.cpp:549
GNEFrameModuls::DemandElementSelector::isDemandElementSelectorShown
bool isDemandElementSelectorShown() const
check if demand element selector is shown
Definition: GNEFrameModuls.cpp:590
GNELane::getParentEdge
GNEEdge * getParentEdge() const
get arent edge
Definition: GNELane.cpp:113
GLHelper::drawBoxLines
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
Definition: GLHelper.cpp:277
GNENetHelper::AttributeCarriers::retrieveJunction
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
Definition: GNENetHelper.cpp:423
GNEFrameModuls::HierarchicalElementTree::onCmdMoveItemDown
long onCmdMoveItemDown(FXObject *, FXSelector, void *)
called when user click over option "Move down" of child menu
Definition: GNEFrameModuls.cpp:1005
GNEFrameModuls::PathCreator::getSelectedEdges
std::vector< GNEEdge * > getSelectedEdges() const
get current selected additionals
Definition: GNEFrameModuls.cpp:2568
GNERouteProbe.h
GNEPOI
Definition: GNEPOI.h:43
GNEFrameModuls::SelectorParent::setIDSelected
void setIDSelected(const std::string &id)
select manually a element of the list
Definition: GNEFrameModuls.cpp:1905
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
GNEPersonTrip.h
GNEFrameModuls::DemandElementSelector::getPersonPlanPreviousEdge
GNEEdge * getPersonPlanPreviousEdge() const
get previous edge for the current person plan
Definition: GNEFrameModuls.cpp:668
GNEFrameModuls::PathCreator::myCreationMode
int myCreationMode
current creation mode
Definition: GNEFrameModuls.h:716
GNEHierarchicalElement::getChildGenericDatas
const std::vector< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
Definition: GNEHierarchicalElement.cpp:216
GNETagProperties::TagType
TagType
Definition: GNETagProperties.h:42
GNEFrameModuls::DrawingShape::addNewPoint
void addNewPoint(const Position &P)
add new point to temporal shape
Definition: GNEFrameModuls.cpp:1813
GUIIcon::RECENTERVIEW
@ RECENTERVIEW
GNEFrameModuls::TagSelector::ACTemplate::~ACTemplate
~ACTemplate()
destructor
Definition: GNEFrameModuls.cpp:491
GUIGeometry::getShape
const PositionVector & getShape() const
The shape of the additional element.
Definition: GUIGeometry.cpp:195
GNEFrameModuls::PathCreator::myAbortCreationButton
FXButton * myAbortCreationButton
button for abort route creation
Definition: GNEFrameModuls.h:737
GNEFrameModuls::DrawingShape::myStopDrawingButton
FXButton * myStopDrawingButton
button for stop drawing
Definition: GNEFrameModuls.h:394
SUMO_TAG_TAZSOURCE
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
Definition: SUMOXMLDefinitions.h:161
SUMO_TAG_CONTAINER_STOP
@ SUMO_TAG_CONTAINER_STOP
A container stop.
Definition: SUMOXMLDefinitions.h:71
GNETagProperties::isAdditionalElement
bool isAdditionalElement() const
return true if tag correspond to an additional element
Definition: GNETagProperties.cpp:276
GNEFrame::getViewNet
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:133
GNEFrameModuls::DemandElementSelector::refreshDemandElementSelector
void refreshDemandElementSelector()
refresh demand element selector
Definition: GNEFrameModuls.cpp:596
GNEPoly
Definition: GNEPoly.h:43
GNECandidateElement::isConflictedCandidate
bool isConflictedCandidate() const
check if this element is a conflicted candidate
Definition: GNECandidateElement.cpp:81
SUMO_TAG_PERSON
@ SUMO_TAG_PERSON
Definition: SUMOXMLDefinitions.h:318
GNEFrameModuls::DrawingShape::myInformationLabel
FXLabel * myInformationLabel
Label with information.
Definition: GNEFrameModuls.h:400
GNEFrameModuls::TagSelector::myACTemplates
std::vector< ACTemplate * > myACTemplates
list with ACTemplates
Definition: GNEFrameModuls.h:124
SUMO_TAG_LANE
@ SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:49
GNEWalk
Definition: GNEWalk.h:36
GUIDesignButtonOK
#define GUIDesignButtonOK
Definition: GUIDesigns.h:124
GNEViewNetHelper::getRainbowScaledColors
static const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors
Definition: GNEViewNetHelper.cpp:3692
GNEFrameModuls::DemandElementSelector::showDemandElementSelector
void showDemandElementSelector()
show demand element selector
Definition: GNEFrameModuls.cpp:563
GNERoute
Definition: GNERoute.h:39
GNEHierarchicalElement::getParentLanes
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
Definition: GNEHierarchicalElement.cpp:138
GNEPerson.h
GUIDesignComboBoxNCol
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:276
GNEVariableSpeedSign
Definition: GNEVariableSpeedSign.h:37
GUIVisualizationCandidateColorSettings::target
static const RGBColor target
color for selected candidate target
Definition: GUIVisualizationSettings.h:271
GUIDesignListFixedHeight
#define GUIDesignListFixedHeight
design for FXLists with height fixed
Definition: GUIDesigns.h:606
GNEFrame
Definition: GNEFrame.h:33
SUMO_TAG_PTYPE
@ SUMO_TAG_PTYPE
description of a person type (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:151
GNEGenericData
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEGenericData.h:54
GNEJunction::getGNECrossings
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
Definition: GNEJunction.cpp:619
GNEFrameModuls::OverlappedInspection::onCmdOverlappingHelp
long onCmdOverlappingHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
Definition: GNEFrameModuls.cpp:2201
GNERide.h
SUMO_TAG_POI
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
Definition: SUMOXMLDefinitions.h:55
GNEViewNet
Definition: GNEViewNet.h:43
GUIIcon::ACCEPT
@ ACCEPT
GNEFrameModuls::PathCreator::abortPathCreation
void abortPathCreation()
abort path creation
Definition: GNEFrameModuls.cpp:2797
GNEFrameModuls::HierarchicalElementTree::addListItem
FXTreeItem * addListItem(GNEAttributeCarrier *AC, FXTreeItem *itemParent=nullptr, std::string prefix="", std::string sufix="")
add item into list
Definition: GNEFrameModuls.cpp:1701
GNEFrameModuls::DemandElementSelector::~DemandElementSelector
~DemandElementSelector()
destructor
Definition: GNEFrameModuls.cpp:533
GUIIcon::MODEINSPECT
@ MODEINSPECT
GNELane::getLane2laneConnections
const GNELane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
Definition: GNELane.cpp:810
SUMO_ATTR_ID
@ SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:515
GNEFrameModuls::DrawingShape::hideDrawingShape
void hideDrawingShape()
hide Drawing mode
Definition: GNEFrameModuls.cpp:1764
GNE_TAG_RIDE_EDGE
@ GNE_TAG_RIDE_EDGE
Definition: SUMOXMLDefinitions.h:414
GNEFrameModuls::OverlappedInspection::onCmdListItemSelected
long onCmdListItemSelected(FXObject *, FXSelector, void *)
called when a list item is selected
Definition: GNEFrameModuls.cpp:2183
SUMO_TAG_DET_ENTRY
@ SUMO_TAG_DET_ENTRY
an e3 entry point
Definition: SUMOXMLDefinitions.h:97
SUMO_TAG_NOTHING
@ SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:41
GLHelper.h
GNEDetectorE1
Definition: GNEDetectorE1.h:32
GNE_TAG_WALK_EDGES
@ GNE_TAG_WALK_EDGES
Definition: SUMOXMLDefinitions.h:411
GUIDesigns.h
GNEFrameModuls::TagSelector::ACTemplate::getAC
GNEAttributeCarrier * getAC() const
get template AC
Definition: GNEFrameModuls.cpp:322
SUMO_TAG_VTYPE
@ SUMO_TAG_VTYPE
description of a vehicle type
Definition: SUMOXMLDefinitions.h:149
MID_HELP
@ MID_HELP
help button
Definition: GUIAppEnum.h:598
GNE_TAG_FLOW_CALIBRATOR
@ GNE_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator
Definition: SUMOXMLDefinitions.h:109
GNERerouter
Definition: GNERerouter.h:37
GNENet::getAttributeCarriers
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:125
GNEHierarchicalElement::getChildDemandElements
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
Definition: GNEHierarchicalElement.cpp:210
SUMO_TAG_CONTAINER
@ SUMO_TAG_CONTAINER
Definition: SUMOXMLDefinitions.h:333
GNEConnection::getEdgeTo
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
Definition: GNEConnection.cpp:203
PositionVector
A list of positions.
Definition: PositionVector.h:43
GNE_TAG_POILANE
@ GNE_TAG_POILANE
Point of interest over Lane.
Definition: SUMOXMLDefinitions.h:390
GNEFrameModuls::PathCreator::~PathCreator
~PathCreator()
destructor
Definition: GNEFrameModuls.cpp:2357
SUMO_TAG_PARKING_SPACE
@ SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
Definition: SUMOXMLDefinitions.h:77
GNEClosingLaneReroute.h
GNEFrameModuls::OverlappedInspection::OverlappedInspection
OverlappedInspection()
FOX needs this.
Definition: GNEFrameModuls.cpp:2219
GNEFrameModuls::DrawingShape::removeLastPoint
void removeLastPoint()
remove last added point
Definition: GNEFrameModuls.cpp:1823
GNEFrameModuls::DrawingShape::getDeleteLastCreatedPoint
bool getDeleteLastCreatedPoint()
get flag delete last created point
Definition: GNEFrameModuls.cpp:1849
GNEFrameModuls::PathCreator::getRoute
GNEDemandElement * getRoute() const
get route
Definition: GNEFrameModuls.cpp:2649
GNEFrameModuls::PathCreator::getVClass
SUMOVehicleClass getVClass() const
get vClass
Definition: GNEFrameModuls.cpp:2473
GNERide
Definition: GNERide.h:36
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:507
GNEDataInterval::getGenericDataChildren
const std::vector< GNEGenericData * > & getGenericDataChildren() const
get generic data children
Definition: GNEDataInterval.cpp:217
GNEFrameModuls::SelectorParent::showSelectorParentModul
bool showSelectorParentModul(const std::vector< SumoXMLTag > &additionalTypeParents)
Show list of SelectorParent Modul.
Definition: GNEFrameModuls.cpp:1922
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:39
GNEFrameModuls::PathCreator::Path::getSubPath
const std::vector< GNEEdge * > & getSubPath() const
get sub path
Definition: GNEFrameModuls.cpp:2286
GNEFrameModuls::PathCreator::Path::Path
Path()
default constructor
Definition: GNEFrameModuls.cpp:2313
GeoConvHelper::getProjString
const std::string & getProjString() const
Returns the original projection definition.
Definition: GeoConvHelper.cpp:507
GNETagProperties::isShape
bool isShape() const
return true if tag correspond to a shape
Definition: GNETagProperties.cpp:282
GUIDesignButton
#define GUIDesignButton
Definition: GUIDesigns.h:68
SUMO_TAG_DATASET
@ SUMO_TAG_DATASET
Definition: SUMOXMLDefinitions.h:327
GNEFrameModuls::HierarchicalElementTree::onCmdMoveItemUp
long onCmdMoveItemUp(FXObject *, FXSelector, void *)
called when user click over option "Move up" of child menu
Definition: GNEFrameModuls.cpp:989
GNEHierarchicalElement::getParentTAZElements
const std::vector< GNETAZElement * > & getParentTAZElements() const
get parent TAZElements
Definition: GNEHierarchicalElement.cpp:156
GNERouteProbe
Representation of a RouteProbe in netedit.
Definition: GNERouteProbe.h:32
GUIAppEnum.h
GLHelper::pushMatrix
static void pushMatrix()
push matrix
Definition: GLHelper.cpp:114
GNELane2laneConnection::getLane2laneGeometry
const GUIGeometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
Definition: GNELane2laneConnection.cpp:80
GNEFrameModuls::DrawingShape::myStartDrawingButton
FXButton * myStartDrawingButton
button for start drawing
Definition: GNEFrameModuls.h:391
GUIDesignLabelFrameInformation
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:235
GNEChange_Children
Definition: GNEChange_Children.h:32
GNECalibratorFlow.h
GUIDesignButtonRectangular
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
Definition: GUIDesigns.h:74
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
GNEFrameModuls::PathCreator::getPath
const std::vector< Path > & getPath() const
get path route
Definition: GNEFrameModuls.cpp:2655
GUIIcon::MODEDELETE
@ MODEDELETE
GNEAttributeCarrier::getHierarchyName
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:1352
GNEChargingStation
Definition: GNEChargingStation.h:29
GNEFrameModuls::PathCreator::myInfoRouteLabel
FXLabel * myInfoRouteLabel
label with route info
Definition: GNEFrameModuls.h:731
GNERoute.h
GNETransport
Definition: GNETransport.h:36
GNEFrameModuls::TagSelector::getCurrentTemplateAC
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
Definition: GNEFrameModuls.cpp:178
GNEFrameModuls::PathCreator::onCmdShowCandidateEdges
long onCmdShowCandidateEdges(FXObject *, FXSelector, void *)
Called when the user click over check button "show candidate edges".
Definition: GNEFrameModuls.cpp:2873
SUMO_TAG_DEST_PROB_REROUTE
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destiny of a reroute
Definition: SUMOXMLDefinitions.h:115
GNEParkingArea
A lane area vehicles can park at (netedit-version)
Definition: GNEParkingArea.h:33
GNERerouterInterval.h
GNEDataSet
Definition: GNEDataSet.h:43
GNEFrameModuls::OverlappedInspection::overlappedInspectionShown
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
Definition: GNEFrameModuls.cpp:2061
GNEFrameModuls::PathCreator::PathCreator
PathCreator(GNEFrame *frameParent)
default constructor
Definition: GNEFrameModuls.cpp:2321
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:2080
GNE_TAG_E2DETECTOR_MULTILANE
@ GNE_TAG_E2DETECTOR_MULTILANE
an e2 detector over multiple lanes (placed here due create Additional Frame)
Definition: SUMOXMLDefinitions.h:85
MID_GNE_INSPECT
@ MID_GNE_INSPECT
inspect element
Definition: GUIAppEnum.h:791
GNEDetectorE3.h
GNEFrameModuls::HierarchicalElementTree::HierarchicalElementTree
HierarchicalElementTree(GNEFrame *frameParent)
FOX-declaration.
Definition: GNEFrameModuls.cpp:779
SUMO_TAG_FLOW
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
Definition: SUMOXMLDefinitions.h:173
GNETAZ.h
GNEFrameModuls::TagSelector::refreshTagSelector
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
Definition: GNEFrameModuls.cpp:286
GNE_TAG_STOPCONTAINER_CONTAINERSTOP
@ GNE_TAG_STOPCONTAINER_CONTAINERSTOP
Definition: SUMOXMLDefinitions.h:427
SUMO_TAG_CHARGING_STATION
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
Definition: SUMOXMLDefinitions.h:73
SUMO_TAG_STOP_CHARGINGSTATION
@ SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
Definition: SUMOXMLDefinitions.h:206
GNEShape
Definition: GNEShape.h:33
MID_GNE_ABORTDRAWING
@ MID_GNE_ABORTDRAWING
abort drawing polygon
Definition: GUIAppEnum.h:851
GeoConvHelper::getFinal
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
Definition: GeoConvHelper.h:103
GUIVisualizationSettings::candidateColorSettings
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
Definition: GUIVisualizationSettings.h:958
GNETranship
Definition: GNETranship.h:37
GNE_TAG_ROUTE_EMBEDDED
@ GNE_TAG_ROUTE_EMBEDDED
embedded route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:400
GNELane::getLaneShape
const PositionVector & getLaneShape() const
get elements shape
Definition: GNELane.cpp:131
GUIIcon::PTYPE
@ PTYPE
RGBColor::ORANGE
static const RGBColor ORANGE
Definition: RGBColor.h:188
SUMO_TAG_VSS
@ SUMO_TAG_VSS
A variable speed sign.
Definition: SUMOXMLDefinitions.h:125
GNEAccess.h
GNEDataSet::getDataIntervalChildren
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
Definition: GNEDataSet.cpp:292
GNEConnection::getEdgeFrom
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
Definition: GNEConnection.cpp:197
GNEFrameModuls::PathLegend::showPathLegendModul
void showPathLegendModul()
show Legend modul
Definition: GNEFrameModuls.cpp:3028
GNEVehicleType
Definition: GNEVehicleType.h:34
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:158
MID_GNE_STARTDRAWING
@ MID_GNE_STARTDRAWING
start drawing polygon
Definition: GUIAppEnum.h:847
GNEFrameModuls::DemandElementSelector
Definition: GNEFrameModuls.h:131
GNEParkingSpace.h
GNEDetectorE1.h
GNEEdge::getFromJunction
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
Definition: GNEEdge.h:77
GNEFrameModuls::PathCreator::Path::myConflictVClass
bool myConflictVClass
flag to mark this path as conflicted
Definition: GNEFrameModuls.h:586
MID_GNE_EDGEPATH_ABORT
@ MID_GNE_EDGEPATH_ABORT
abort edge path creation
Definition: GUIAppEnum.h:825
FXDEFMAP
FXDEFMAP(GNEFrameModuls::TagSelector) TagSelectorMap[]
GNEFrameModuls::TagSelector
Definition: GNEFrameModuls.h:48
GNEStop
Definition: GNEStop.h:32
GNEFrameModuls::HierarchicalElementTree::onCmdDeleteItem
long onCmdDeleteItem(FXObject *, FXSelector, void *)
called when user click over option "delete" of child menu
Definition: GNEFrameModuls.cpp:920
GNEClosingReroute
Definition: GNEClosingReroute.h:38
DEFAULT_VTYPE_ID
const std::string DEFAULT_VTYPE_ID
GNERouteProbReroute
Definition: GNERouteProbReroute.h:40
GNETagProperties::isDataElement
bool isDataElement() const
return true if tag correspond to a data element
Definition: GNETagProperties.cpp:300
GNEViewNet.h
GNEFrameModuls::PathCreator::myRemoveLastInsertedElement
FXButton * myRemoveLastInsertedElement
button for removing last inserted element
Definition: GNEFrameModuls.h:740
GNEFrameModuls::PathCreator::myShiftLabel
FXLabel * myShiftLabel
label for shift information
Definition: GNEFrameModuls.h:746
SVC_PASSENGER
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:159
SUMO_ATTR_EDGES
@ SUMO_ATTR_EDGES
the edges of a route
Definition: SUMOXMLDefinitions.h:560
GNEFrameModuls::PathCreator::removeLastElement
void removeLastElement()
remove path element
Definition: GNEFrameModuls.cpp:2819
GNEFrameModuls::OverlappedInspection::buildFXElements
void buildFXElements()
build Fox Toolkit elemements
Definition: GNEFrameModuls.cpp:2232
SUMO_TAG_PARKING_AREA
@ SUMO_TAG_PARKING_AREA
A parking area.
Definition: SUMOXMLDefinitions.h:75
GNEFrameModuls::DemandElementSelector::getCurrentDemandElement
GNEDemandElement * getCurrentDemandElement() const
get current demand element
Definition: GNEFrameModuls.cpp:537
GNECandidateElement::isSpecialCandidate
bool isSpecialCandidate() const
check if this element is a special candidate
Definition: GNECandidateElement.cpp:75
SUMO_TAG_EDGE
@ SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:47
GNEDetectorE1Instant.h
GUIDesignLabelLeft
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:187
GNEFrameModuls::DrawingShape
Definition: GNEFrameModuls.h:321
ProcessError
Definition: UtilExceptions.h:37
SUMO_TAG_STEP
@ SUMO_TAG_STEP
trigger: a step description
Definition: SUMOXMLDefinitions.h:127
GNEFrameModuls::DrawingShape::startDrawing
void startDrawing()
start drawing
Definition: GNEFrameModuls.cpp:1773
GNECalibrator
Definition: GNECalibrator.h:39
GUIDesignCheckButton
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:145
MID_GNE_DELETE
@ MID_GNE_DELETE
delete element
Definition: GUIAppEnum.h:789
GNEFrameModuls::DemandElementSelector::getAllowedTags
const std::vector< SumoXMLTag > & getAllowedTags() const
Definition: GNEFrameModuls.cpp:543
MID_GNE_STOPDRAWING
@ MID_GNE_STOPDRAWING
stop drawing polygon
Definition: GUIAppEnum.h:849
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
GNEApplicationWindow.h
GNETagProperties::isTAZElement
bool isTAZElement() const
return true if tag correspond to a TAZ element
Definition: GNETagProperties.cpp:288
MID_GNE_TAG_SELECTED
@ MID_GNE_TAG_SELECTED
tag selected in ComboBox
Definition: GUIAppEnum.h:807
SUMO_TAG_ROUTE_PROB_REROUTE
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
Definition: SUMOXMLDefinitions.h:121
GNEFrameModuls::PathCreator::myShowCandidateEdges
FXCheckButton * myShowCandidateEdges
CheckBox for show candidate edges.
Definition: GNEFrameModuls.h:743
GUIDesignButtonIconRectangular
#define GUIDesignButtonIconRectangular
button only with icon
Definition: GUIDesigns.h:80
GNEAttributeCarrier::getID
virtual const std::string & getID() const =0
return ID of object
GNEFrameModuls::DrawingShape::onCmdStartDrawing
long onCmdStartDrawing(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:1855
GNE_TAG_POIGEO
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
Definition: SUMOXMLDefinitions.h:392
GNETAZ
Definition: GNETAZ.h:34
GNEGenericData::getDataIntervalParent
GNEDataInterval * getDataIntervalParent() const
get data interval parent
Definition: GNEGenericData.cpp:79
GNEFrameModuls::OverlappedInspection::showOverlappedInspection
void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
show template editor
Definition: GNEFrameModuls.cpp:2002
GNEFrameModuls::HierarchicalElementTree::showHierarchicalElementChildren
void showHierarchicalElementChildren(GNEHierarchicalElement *HE, FXTreeItem *itemParent)
show children of given hierarchical element
Definition: GNEFrameModuls.cpp:1507
GNEFrameModuls::PathCreator::recalculatePath
void recalculatePath()
recalculate path
Definition: GNEFrameModuls.cpp:2937
GNEVariableSpeedSignStep.h
SUMO_TAG_REROUTER
@ SUMO_TAG_REROUTER
A rerouter.
Definition: SUMOXMLDefinitions.h:111
GNEFrameModuls::HierarchicalElementTree
Definition: GNEFrameModuls.h:199
GNEDetectorE3
Definition: GNEDetectorE3.h:32
GNEFrameModuls::PathCreator::myFrameParent
GNEFrame * myFrameParent
current frame parent
Definition: GNEFrameModuls.h:710
GNEFrameModuls::PathCreator::addStoppingPlace
bool addStoppingPlace(GNEAdditional *stoppingPlace, const bool shiftKeyPressed, const bool controlKeyPressed)
add stoppingPlace
Definition: GNEFrameModuls.cpp:2574
GNE_ATTR_DEFAULT_VTYPE
@ GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
Definition: SUMOXMLDefinitions.h:1272
GNENetHelper::AttributeCarriers::retrieveTAZElement
GNETAZElement * retrieveTAZElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named TAZElement.
Definition: GNENetHelper.cpp:1191
GUIIcon::ROUTE
@ ROUTE
GUIIcon::EDGE
@ EDGE
GNELane::getGNEIncomingConnections
std::vector< GNEConnection * > getGNEIncomingConnections()
returns a vector with the incoming GNEConnections of this lane
Definition: GNELane.cpp:1628
GNEPerson
Definition: GNEPerson.h:34
GNE_TAG_PERSONTRIP_EDGE
@ GNE_TAG_PERSONTRIP_EDGE
Definition: SUMOXMLDefinitions.h:406
GNEDetectorE2.h
GUIIcon
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:33
GNECrossing.h
GNE_TAG_STOPPERSON_EDGE
@ GNE_TAG_STOPPERSON_EDGE
Definition: SUMOXMLDefinitions.h:418
GNENetHelper::AttributeCarriers::retrieveDemandElement
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
Definition: GNENetHelper.cpp:1312
GNEEdge::getLanes
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
Definition: GNEEdge.cpp:782
SUMO_TAG_CLOSING_REROUTE
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
Definition: SUMOXMLDefinitions.h:117
SUMO_TAG_VEHICLE
@ SUMO_TAG_VEHICLE
description of a vehicle
Definition: SUMOXMLDefinitions.h:147
GNEParkingSpace
vehicle space used by GNEParkingAreas
Definition: GNEParkingSpace.h:37
GNEContainer.h
Element
Definition: Element.h:50
GNEBusStop
A lane area vehicles can halt at (netedit-version)
Definition: GNEBusStop.h:33
GUIDesignTreeListDinamic
#define GUIDesignTreeListDinamic
Definition: GUIDesigns.h:590
GUIIcon::BIGARROWRIGHT
@ BIGARROWRIGHT
MID_GNE_EDGEPATH_SHOWCANDIDATES
@ MID_GNE_EDGEPATH_SHOWCANDIDATES
enable or disable show path candidates
Definition: GUIAppEnum.h:831
GNETagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNETagProperties.cpp:67
GNEFrameModuls::SelectorParent::getIdSelected
std::string getIdSelected() const
get currently parent additional selected
Definition: GNEFrameModuls.cpp:1894
GNEDataInterval
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDataInterval.h:48
GUIIcon::BIGARROWLEFT
@ BIGARROWLEFT
GNEFrameAttributesModuls::isSupermodeValid
static bool isSupermodeValid(const GNEViewNet *viewNet, const GNEAttributeCarrier *AC)
return true if AC can be edited in the current supermode
Definition: GNEFrameAttributesModuls.cpp:2697
GNECalibratorFlow
Definition: GNECalibratorFlow.h:40
GNEFrameModuls::DemandElementSelector::onCmdSelectDemandElement
long onCmdSelectDemandElement(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:747
GNEContainerStop.h
GNEFrameModuls::OverlappedInspection::onCmdPreviousElement
long onCmdPreviousElement(FXObject *, FXSelector, void *)
Inspect previous element (from top to bot)
Definition: GNEFrameModuls.cpp:2116
MID_GNE_EDGEPATH_REMOVELAST
@ MID_GNE_EDGEPATH_REMOVELAST
remove last inserted element in path
Definition: GUIAppEnum.h:829
GNEWalk.h
GUIDesignLabelCenterThick
#define GUIDesignLabelCenterThick
label extended over frame with thick and with text justify to center
Definition: GUIDesigns.h:205
GNEPathManager::PathCalculator::calculateDijkstraPath
std::vector< GNEEdge * > calculateDijkstraPath(const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra path between a list of partial edges
Definition: GNEPathManager.cpp:269
GNEClosingLaneReroute
Definition: GNEClosingLaneReroute.h:39
GNETAZElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNETAZElement.h:45
GNEFrameModuls::DrawingShape::onCmdAbortDrawing
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
Definition: GNEFrameModuls.cpp:1869
GNEFrameModuls::TagSelector::hideTagSelector
void hideTagSelector()
hide item selector
Definition: GNEFrameModuls.cpp:172
FXTreeListDinamic
FXTreeListDinamic.
Definition: FXTreeListDinamic.h:28
SUMO_TAG_TAZ
@ SUMO_TAG_TAZ
a traffic assignment zone
Definition: SUMOXMLDefinitions.h:159
GNENetworkElement::getHierarchyName
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNENetworkElement.cpp:121
GNELane::getGNEOutcomingConnections
std::vector< GNEConnection * > getGNEOutcomingConnections()
returns a vector with the outgoing GNEConnections of this lane
Definition: GNELane.cpp:1649
GNEHierarchicalElement::getParentEdges
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
Definition: GNEHierarchicalElement.cpp:132
GNEFrameModuls::DrawingShape::~DrawingShape
~DrawingShape()
destructor
Definition: GNEFrameModuls.cpp:1753
GNEViewParent.h
GNEFrameModuls::PathCreator::getToStoppingPlace
GNEAdditional * getToStoppingPlace(SumoXMLTag expectedTag) const
get to stoppingPlace
Definition: GNEFrameModuls.cpp:2608
GNEHierarchicalElement::getChildEdges
const std::vector< GNEEdge * > & getChildEdges() const
get child edges
Definition: GNEHierarchicalElement.cpp:180
GUIVisualizationCandidateColorSettings::source
static const RGBColor source
color for selected candidate source
Definition: GUIVisualizationSettings.h:268
GNEFrameModuls::PathCreator::setVClass
void setVClass(SUMOVehicleClass vClass)
set vClass
Definition: GNEFrameModuls.cpp:2479
GLIncludes.h
GNEFrameModuls::SelectorParent::SelectorParent
SelectorParent(GNEFrame *frameParent)
constructor
Definition: GNEFrameModuls.cpp:1878
GUIDesignListSingleElementFixedHeight
#define GUIDesignListSingleElementFixedHeight
design for FXLists that only allow a single selected elements selected and height fixed
Definition: GUIDesigns.h:609
GNETagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNETagProperties.cpp:294
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
GNEPoly.h
GNENetworkElement::getID
const std::string & getID() const
get ID
Definition: GNENetworkElement.cpp:50
SUMO_TAG_BUS_STOP
@ SUMO_TAG_BUS_STOP
A bus stop.
Definition: SUMOXMLDefinitions.h:63
GNEFrameModuls::PathCreator::Path
FOX-declaration.
Definition: GNEFrameModuls.h:551
SUMO_TAG_TAZSINK
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
Definition: SUMOXMLDefinitions.h:163
GNEFrameModuls::TagSelector::onCmdSelectTag
long onCmdSelectTag(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:293
SUMO_TAG_STOP_CONTAINERSTOP
@ SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
Definition: SUMOXMLDefinitions.h:204
GNEDataInterval::getDataSetParent
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
Definition: GNEDataInterval.cpp:153
GNE_TAG_RIDE_BUSSTOP
@ GNE_TAG_RIDE_BUSSTOP
Definition: SUMOXMLDefinitions.h:415
GNEFrameModuls::PathCreator::Path::myConflictDisconnected
bool myConflictDisconnected
flag to mark this path as disconnected
Definition: GNEFrameModuls.h:589
GUIDesignLabelLeftThick
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left
Definition: GUIDesigns.h:199
GNEFrameModuls::HierarchicalElementTree::onCmdShowChildMenu
long onCmdShowChildMenu(FXObject *, FXSelector, void *data)
Definition: GNEFrameModuls.cpp:867
SUMO_TAG_CROSSING
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
Definition: SUMOXMLDefinitions.h:236
GNEDemandElement::getID
const std::string & getID() const
get ID
Definition: GNEDemandElement.cpp:88
GNEFrameModuls::PathCreator::myFinishCreationButton
FXButton * myFinishCreationButton
button for finish route creation
Definition: GNEFrameModuls.h:734
GNEHierarchicalElement::getParentDemandElements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
Definition: GNEHierarchicalElement.cpp:162
GNEDestProbReroute
Definition: GNEDestProbReroute.h:39
GNEContainer
Definition: GNEContainer.h:34
GNEVaporizer.h
GNEClosingReroute.h
GNEFrameModuls::DrawingShape::abortDrawing
void abortDrawing()
abort drawing
Definition: GNEFrameModuls.cpp:1802
GNEFrameModuls::PathCreator::Path::isConflictDisconnected
bool isConflictDisconnected() const
check if current path is conflict due is disconnected
Definition: GNEFrameModuls.cpp:2308
GUIIcon::LANE
@ LANE
GNEFrameModuls::PathLegend::PathLegend
PathLegend(GNEFrame *frameParent)
constructor
Definition: GNEFrameModuls.cpp:3001
GNEFrameModuls::PathCreator::onCmdCreatePath
long onCmdCreatePath(FXObject *, FXSelector, void *)
Definition: GNEFrameModuls.cpp:2849
GNEFrameModuls::OverlappedInspection::onCmdNextElement
long onCmdNextElement(FXObject *, FXSelector, void *)
Inspect next Element (from top to bot)
Definition: GNEFrameModuls.cpp:2142
SUMO_TAG_VAPORIZER
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
Definition: SUMOXMLDefinitions.h:131
GNEParkingArea.h
GNEFrameModuls::PathCreator::myVClass
SUMOVehicleClass myVClass
current vClass
Definition: GNEFrameModuls.h:713
GNEDestProbReroute.h
GNEFrameModuls::PathCreator::updateEdgeColors
void updateEdgeColors()
update edge colors
Definition: GNEFrameModuls.cpp:2667
GNEHierarchicalElement::getChildAdditionals
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
Definition: GNEHierarchicalElement.cpp:192
MID_GNE_OVERLAPPED_SHOWLIST
@ MID_GNE_OVERLAPPED_SHOWLIST
show list of overlapped elements
Definition: GUIAppEnum.h:857
GUIIcon::VTYPE
@ VTYPE
GNEFrameModuls::PathCreator::createPath
void createPath()
create path
Definition: GNEFrameModuls.cpp:2790
GNEFrameModuls::TagSelector::ACTemplate::myAC
GNEAttributeCarrier * myAC
editedAC
Definition: GNEFrameModuls.h:102
GNE_TAG_FLOW_WITHROUTE
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:404
GNEFrameModuls::PathLegend::~PathLegend
~PathLegend()
destructor
Definition: GNEFrameModuls.cpp:3024
GUIDesignComboBox
#define GUIDesignComboBox
Definition: GUIDesigns.h:258
GNEPathManager::getPathCalculator
PathCalculator * getPathCalculator()
obtain instance of PathCalculator
Definition: GNEPathManager.cpp:553
FXGroupBoxModule
FXGroupBoxModule (based on FXGroupBox)
Definition: FXGroupBoxModule.h:27
GNETAZSourceSink.h
GNEFrameModuls::TagSelector::ACTemplate
FOX need this.
Definition: GNEFrameModuls.h:88
GNEFrameModuls::PathCreator::clearPath
void clearPath()
clear edges (and restore colors)
Definition: GNEFrameModuls.cpp:2920
GNEFrameModuls::PathCreator::setSpecialCandidates
void setSpecialCandidates(GNEEdge *originEdge)
set special candidates (This function will be called recursively)
Definition: GNEFrameModuls.cpp:2968
GNEDetectorEntryExit
Definition: GNEDetectorEntryExit.h:36
GNERerouter.h
GNEBusStop.h
SUMO_TAG_CONNECTION
@ SUMO_TAG_CONNECTION
connectio between two lanes
Definition: SUMOXMLDefinitions.h:212
GNECalibrator.h
GNEFrameModuls::OverlappedInspection::hideOverlappedInspection
void hideOverlappedInspection()
hide template editor
Definition: GNEFrameModuls.cpp:2054
GNEFrameModuls::HierarchicalElementTree::createPopUpMenu
void createPopUpMenu(int X, int Y, GNEAttributeCarrier *clickedAC)
Definition: GNEFrameModuls.cpp:1021
GNEFrameModuls::OverlappedInspection::checkSavedPosition
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
Definition: GNEFrameModuls.cpp:2074
GNEFrameModuls::TagSelector::setCurrentTag
void setCurrentTag(SumoXMLTag newTag, const bool notifyFrameParent=true)
set current type manually
Definition: GNEFrameModuls.cpp:265
GNEFrameModuls::PathCreator::drawCandidateEdgesWithSpecialColor
bool drawCandidateEdgesWithSpecialColor() const
draw candidate edges with special color (Only for candidates, special and conflicted)
Definition: GNEFrameModuls.cpp:2661
GNEVaporizer
Representation of a vaporizer in netedit.
Definition: GNEVaporizer.h:33
GNEVehicle
Definition: GNEVehicle.h:33
GNEFrameModuls::PathCreator::onCmdAbortPathCreation
long onCmdAbortPathCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Abort route creation".
Definition: GNEFrameModuls.cpp:2857
GNEFrameModuls
Definition: GNEFrameModuls.h:41
GNEFrameModuls::PathCreator::drawTemporalRoute
void drawTemporalRoute(const GUIVisualizationSettings &s) const
draw temporal route
Definition: GNEFrameModuls.cpp:2717
GNE_TAG_TRANSPORT_EDGE
@ GNE_TAG_TRANSPORT_EDGE
Definition: SUMOXMLDefinitions.h:420
SUMO_TAG_ROUTEPROBE
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
Definition: SUMOXMLDefinitions.h:129
GNE_TAG_WALK_BUSSTOP
@ GNE_TAG_WALK_BUSSTOP
Definition: SUMOXMLDefinitions.h:410
GNEHierarchicalElement::getChildTAZElements
const std::vector< GNETAZElement * > & getChildTAZElements() const
get child TAZElements
Definition: GNEHierarchicalElement.cpp:204
MID_GNE_OVERLAPPED_ITEMSELECTED
@ MID_GNE_OVERLAPPED_ITEMSELECTED
list item selected in overlapped modul
Definition: GUIAppEnum.h:859
GNEConnection
Definition: GNEConnection.h:36
GLHelper::popMatrix
static void popMatrix()
pop matrix
Definition: GLHelper.cpp:123
GNEAttributeCarrier::getNet
GNENet * getNet() const
get pointer to net
Definition: GNEAttributeCarrier.cpp:60
FXGroupBoxModule::getCollapsableFrame
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toogled)
Definition: FXGroupBoxModule.cpp:73
SUMO_TAG_ROUTE
@ SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:153
GNEFrameModuls::PathCreator::Path::getToBusStop
GNEAdditional * getToBusStop() const
to additional
Definition: GNEFrameModuls.cpp:2296
GNEFrameModuls::DrawingShape::isDrawing
bool isDrawing() const
return true if currently a shape is drawed
Definition: GNEFrameModuls.cpp:1837
GNE_TAG_TRANSHIP_EDGE
@ GNE_TAG_TRANSHIP_EDGE
Definition: SUMOXMLDefinitions.h:423
GNEHierarchicalElement
Definition: GNEHierarchicalElement.h:37
GNETagProperties::isNetworkElement
bool isNetworkElement() const
return true if tag correspond to a network element
Definition: GNETagProperties.cpp:270
MID_GNE_OVERLAPPED_NEXT
@ MID_GNE_OVERLAPPED_NEXT
inspect next element in overlapped modul
Definition: GUIAppEnum.h:853
SUMO_TAG_E3DETECTOR
@ SUMO_TAG_E3DETECTOR
an e3 detector
Definition: SUMOXMLDefinitions.h:89
SUMO_TAG_PARKING_AREA_REROUTE
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
Definition: SUMOXMLDefinitions.h:123
config.h
SUMO_TAG_CONTAINERFLOW
@ SUMO_TAG_CONTAINERFLOW
Definition: SUMOXMLDefinitions.h:336
GUISUMOAbstractView::getVisualisationSettings
GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings
Definition: GUISUMOAbstractView.cpp:1424
SUMO_TAG_PERSONFLOW
@ SUMO_TAG_PERSONFLOW
Definition: SUMOXMLDefinitions.h:322
SUMO_TAG_CLOSING_LANE_REROUTE
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
Definition: SUMOXMLDefinitions.h:119
GNEFrameModuls::DemandElementSelector::hideDemandElementSelector
void hideDemandElementSelector()
hide demand element selector
Definition: GNEFrameModuls.cpp:584
GNEVehicle.h
GNEFrameModuls::DrawingShape::onCmdStopDrawing
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
Definition: GNEFrameModuls.cpp:1862
MID_GNE_SET_TYPE
@ MID_GNE_SET_TYPE
used to select a type of element in a combo box
Definition: GUIAppEnum.h:803
GNE_TAG_TRANSHIP_CONTAINERSTOP
@ GNE_TAG_TRANSHIP_CONTAINERSTOP
Definition: SUMOXMLDefinitions.h:424
GUIVisualizationCandidateColorSettings::conflict
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
Definition: GUIVisualizationSettings.h:277
GNEViewNetHelper::ObjectsUnderCursor::getClickedAttributeCarriers
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
Definition: GNEViewNetHelper.cpp:520
GNEFrameModuls::DemandElementSelector::DemandElementSelector
DemandElementSelector(GNEFrame *frameParent, SumoXMLTag demandElementTag)
FOX-declaration.
Definition: GNEFrameModuls.cpp:499
GNEVehicleType.h
GUIVisualizationCandidateColorSettings::special
static const RGBColor special
color for selected special candidate element (Usually selected using shift+click)
Definition: GUIVisualizationSettings.h:274
GNEFrameModuls::PathCreator::addRoute
bool addRoute(GNEDemandElement *route, const bool shiftKeyPressed, const bool controlKeyPressed)
add route
Definition: GNEFrameModuls.cpp:2618
GNEStop.h
SUMO_TAG_STOP_BUSSTOP
@ SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
Definition: SUMOXMLDefinitions.h:202
GNEFrameModuls::SelectorParent::~SelectorParent
~SelectorParent()
destructor
Definition: GNEFrameModuls.cpp:1890
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:2098
MID_GNE_OVERLAPPED_PREVIOUS
@ MID_GNE_OVERLAPPED_PREVIOUS
inspect previous element in overlapped modul
Definition: GUIAppEnum.h:855
GNEContainerStop
A lane area vehicles can halt at (netedit-version)
Definition: GNEContainerStop.h:33
SUMO_TAG_INTERVAL
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
Definition: SUMOXMLDefinitions.h:113
GNEInspectorFrame.h
GNEPOI.h
MFXUtils::getFXColor
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:112
GNEFrameModuls::HierarchicalElementTree::onCmdCenterItem
long onCmdCenterItem(FXObject *, FXSelector, void *)
called when user click over option "center" of child Menu
Definition: GNEFrameModuls.cpp:881
GNEDetectorE1Instant
Definition: GNEDetectorE1Instant.h:32
GNEFrameModuls::PathCreator::myRoute
GNEDemandElement * myRoute
route (usually a busStop)
Definition: GNEFrameModuls.h:725
GNEFrameModuls::TagSelector::showTagSelector
void showTagSelector()
show item selector
Definition: GNEFrameModuls.cpp:166
GNEFrameModuls.h
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:565
SUMO_TAG_ACCESS
@ SUMO_TAG_ACCESS
An access point for a train stop.
Definition: SUMOXMLDefinitions.h:69
GNEFrameModuls::SelectorParent::myParentsList
FXList * myParentsList
List of parents.
Definition: GNEFrameModuls.h:441
SUMO_TAG_DATAINTERVAL
@ SUMO_TAG_DATAINTERVAL
Definition: SUMOXMLDefinitions.h:328
GNEFrameModuls::PathCreator::onCmdRemoveLastElement
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted edge".
Definition: GNEFrameModuls.cpp:2865
GNEFrameModuls::SelectorParent::myParentsLabel
FXLabel * myParentsLabel
Label with parent name.
Definition: GNEFrameModuls.h:438
GNEJunction
Definition: GNEJunction.h:46
GNEFrameModuls::HierarchicalElementTree::removeCurrentEditedAttributeCarrier
void removeCurrentEditedAttributeCarrier(const GNEAttributeCarrier *HE)
if given AttributeCarrier is the same of myHE, set it as nullptr
Definition: GNEFrameModuls.cpp:858
GNENet::getPathManager
GNEPathManager * getPathManager()
get path manager
Definition: GNENet.cpp:131
GNECandidateElement::isPossibleCandidate
bool isPossibleCandidate() const
check if this element is a possible candidate
Definition: GNECandidateElement.cpp:56
GNENetHelper::AttributeCarriers::retrieveLane
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
Definition: GNENetHelper.cpp:758
SUMO_TAG_CALIBRATOR
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
Definition: SUMOXMLDefinitions.h:105
SUMO_TAG_EDGEREL
@ SUMO_TAG_EDGEREL
a relation between two edges
Definition: SUMOXMLDefinitions.h:177
GNENetHelper::AttributeCarriers::retrieveDataSet
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
Definition: GNENetHelper.cpp:1766
GNERouteProbReroute.h
DEFAULT_BIKETYPE_ID
const std::string DEFAULT_BIKETYPE_ID
GNE_TAG_WALK_ROUTE
@ GNE_TAG_WALK_ROUTE
Definition: SUMOXMLDefinitions.h:412
GNE_TAG_PERSONTRIP_BUSSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP
Definition: SUMOXMLDefinitions.h:407
GNEFrameModuls::PathCreator::Path::mySubPath
std::vector< GNEEdge * > mySubPath
sub path
Definition: GNEFrameModuls.h:577
SUMO_TAG_E1DETECTOR
@ SUMO_TAG_E1DETECTOR
an e1 detector
Definition: SUMOXMLDefinitions.h:79
GNE_TAG_TRANSPORT_CONTAINERSTOP
@ GNE_TAG_TRANSPORT_CONTAINERSTOP
Definition: SUMOXMLDefinitions.h:421
GNEFrameModuls::DemandElementSelector::myDemandElementTags
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
Definition: GNEFrameModuls.h:192
GNEFrameModuls::PathCreator::Path::isConflictVClass
bool isConflictVClass() const
check if current path is conflict due vClass
Definition: GNEFrameModuls.cpp:2302
GNETranship.h
GNEChargingStation.h
SUMO_TAG_E2DETECTOR
@ SUMO_TAG_E2DETECTOR
an e2 detector
Definition: SUMOXMLDefinitions.h:83
GNEDataInterval.h
GUIDesigns::buildFXMenuCommand
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
Definition: GUIDesigns.cpp:42
GNEParkingAreaReroute
Definition: GNEParkingAreaReroute.h:40
SUMO_TAG_DET_EXIT
@ SUMO_TAG_DET_EXIT
an e3 exit point
Definition: SUMOXMLDefinitions.h:99
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
MID_GNE_CENTER
@ MID_GNE_CENTER
center element
Definition: GUIAppEnum.h:797
GNEFrameModuls::HierarchicalElementTree::onCmdInspectItem
long onCmdInspectItem(FXObject *, FXSelector, void *)
called when user click over option "inspect" of child menu
Definition: GNEFrameModuls.cpp:911
GNELane2laneConnection::exist
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
Definition: GNELane2laneConnection.cpp:74
GNEEdge::getToJunction
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
Definition: GNEEdge.h:82
MFXIconComboBox
ComboBox with icon.
Definition: MFXIconComboBox.h:53
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:290
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:48
MFXMenuHeader
Definition: MFXMenuHeader.h:26
GNEFrameModuls::SelectorParent::refreshSelectorParentModul
void refreshSelectorParentModul()
Refresh list of Additional Parents Modul.
Definition: GNEFrameModuls.cpp:1946
MID_GNE_EDGEPATH_FINISH
@ MID_GNE_EDGEPATH_FINISH
finish edge path creation
Definition: GUIAppEnum.h:827
GNENet.h
GNEFrameModuls::SelectorParent::hideSelectorParentModul
void hideSelectorParentModul()
hide SelectorParent Modul
Definition: GNEFrameModuls.cpp:1939
GNEFrameModuls::TagSelector::setCurrentTagType
void setCurrentTagType(GNETagProperties::TagType tagType, const bool onlyDrawables, const bool notifyFrameParent=true)
set current type manually
Definition: GNEFrameModuls.cpp:184
SUMO_TAG_TRIP
@ SUMO_TAG_TRIP
a single trip definition (used by router)
Definition: SUMOXMLDefinitions.h:145
GNEChange_Children.h
GNEFrameModuls::DrawingShape::getTemporalShape
const PositionVector & getTemporalShape() const
get Temporal shape
Definition: GNEFrameModuls.cpp:1831
SUMO_TAG_INSTANT_INDUCTION_LOOP
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
Definition: SUMOXMLDefinitions.h:103
GNEFrameModuls::OverlappedInspection::~OverlappedInspection
~OverlappedInspection()
destructor
Definition: GNEFrameModuls.cpp:1998
SUMO_TAG_JUNCTION
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
Definition: SUMOXMLDefinitions.h:57
RGBColor::WHITE
static const RGBColor WHITE
Definition: RGBColor.h:189
GNEUndoList.h
GNEFrameModuls::buildRainbow
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
Definition: GNEFrameModuls.cpp:3042
GNEFrameModuls::DrawingShape::myAbortDrawingButton
FXButton * myAbortDrawingButton
button for abort drawing
Definition: GNEFrameModuls.h:397
GUIDesignDialogBox
#define GUIDesignDialogBox
Definition: GUIDesigns.h:518
GNETagProperties
Definition: GNETagProperties.h:38
GNETAZSourceSink
Definition: GNETAZSourceSink.h:32
GNEFrameModuls::PathLegend::hidePathLegendModul
void hidePathLegendModul()
hide Legend modul
Definition: GNEFrameModuls.cpp:3033
GNE_TAG_WALK_EDGE
@ GNE_TAG_WALK_EDGE
Definition: SUMOXMLDefinitions.h:409
GNEPersonTrip
Definition: GNEPersonTrip.h:36
GNEConnection.h
GNEFrameModuls::PathCreator::myControlLabel
FXLabel * myControlLabel
label for control information
Definition: GNEFrameModuls.h:749
GNEFrameModuls::OverlappedInspection::onCmdShowList
long onCmdShowList(FXObject *, FXSelector, void *)
show list of overlapped elements
Definition: GNEFrameModuls.cpp:2164