79 mySelectorFrameParent(selectorFrameParent) {
93 const auto ACs = mySelectorFrameParent->getViewNet()->getNet()->getAttributeCarriers();
95 if (mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeNetwork()) {
96 updateInformationLabel(
"Junctions", ACs->getNumberOfSelectedJunctions());
97 updateInformationLabel(
"Edges", ACs->getNumberOfSelectedEdges());
98 updateInformationLabel(
"Lanes", ACs->getNumberOfSelectedLanes());
99 updateInformationLabel(
"Connections", ACs->getNumberOfSelectedConnections());
100 updateInformationLabel(
"Crossings", ACs->getNumberOfSelectedCrossings());
101 updateInformationLabel(
"WalkingAreas", ACs->getNumberOfSelectedWalkingAreas());
102 updateInformationLabel(
"Additionals", ACs->getNumberOfSelectedPureAdditionals());
103 updateInformationLabel(
"Wires", ACs->getNumberOfSelectedWires());
104 updateInformationLabel(
"TAZs", ACs->getNumberOfSelectedTAZs());
105 updateInformationLabel(
"TAZSources", ACs->getNumberOfSelectedTAZSources());
106 updateInformationLabel(
"TAZSinks", ACs->getNumberOfSelectedTAZSinks());
107 updateInformationLabel(
"Polygon", ACs->getNumberOfSelectedPolygons());
108 updateInformationLabel(
"POIs", ACs->getNumberOfSelectedPOIs());
109 }
else if (mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
110 updateInformationLabel(
"Routes", ACs->getNumberOfSelectedRoutes());
111 updateInformationLabel(
"Vehicles", ACs->getNumberOfSelectedVehicles());
112 updateInformationLabel(
"Persons", ACs->getNumberOfSelectedPersons());
113 updateInformationLabel(
"Person trips", ACs->getNumberOfSelectedPersonTrips());
114 updateInformationLabel(
"Walks", ACs->getNumberOfSelectedWalks());
115 updateInformationLabel(
"Rides", ACs->getNumberOfSelectedRides());
116 updateInformationLabel(
"Containers", ACs->getNumberOfSelectedContainers());
117 updateInformationLabel(
"Transport", ACs->getNumberOfSelectedTransport());
118 updateInformationLabel(
"Tranships", ACs->getNumberOfSelectedTranships());
119 updateInformationLabel(
"Stops", ACs->getNumberOfSelectedStops());
120 }
else if (mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData()) {
121 updateInformationLabel(
"EdgeDatas", ACs->getNumberOfSelectedEdgeDatas());
122 updateInformationLabel(
"EdgeRelDatas", ACs->getNumberOfSelectedEdgeRelDatas());
123 updateInformationLabel(
"EdgeTAZRel", ACs->getNumberOfSelectedEdgeTAZRel());
127 if (numberLines == 0) {
129 }
else if (numberLines > 1) {
170 return myModificationModeType;
176 if (obj == myAddRadioButton) {
177 myModificationModeType = Operation::ADD;
178 myAddRadioButton->setCheck(
true);
179 myRemoveRadioButton->setCheck(
false);
180 myKeepRadioButton->setCheck(
false);
181 myReplaceRadioButton->setCheck(
false);
183 }
else if (obj == myRemoveRadioButton) {
184 myModificationModeType = Operation::SUB;
185 myAddRadioButton->setCheck(
false);
186 myRemoveRadioButton->setCheck(
true);
187 myKeepRadioButton->setCheck(
false);
188 myReplaceRadioButton->setCheck(
false);
190 }
else if (obj == myKeepRadioButton) {
191 myModificationModeType = Operation::RESTRICT;
192 myAddRadioButton->setCheck(
false);
193 myRemoveRadioButton->setCheck(
false);
194 myKeepRadioButton->setCheck(
true);
195 myReplaceRadioButton->setCheck(
false);
197 }
else if (obj == myReplaceRadioButton) {
198 myModificationModeType = Operation::REPLACE;
199 myAddRadioButton->setCheck(
false);
200 myRemoveRadioButton->setCheck(
false);
201 myKeepRadioButton->setCheck(
false);
202 myReplaceRadioButton->setCheck(
true);
215 mySelectorFrameParent(selectorFrameParent) {
233 mySelectorFrameParent->myViewNet->setSelectorFrameScale(mySelectionScaling->getValue());
234 mySelectorFrameParent->myViewNet->updateViewNet();
244 mySelectorFrameParent(selectorFrameParent) {
248 FXVerticalFrame* col1 =
new FXVerticalFrame(selectionButtons, LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
249 FXVerticalFrame* col2 =
new FXVerticalFrame(selectionButtons, LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
256 new FXButton(col1, (
TL(
"Save") + std::string(
"\t\t") +
TL(
"Save ids of currently selected objects to a file.")).c_str(),
nullptr,
this,
MID_CHOOSEN_SAVE,
GUIDesignButton);
258 new FXButton(col2, (
TL(
"Load") + std::string(
"\t\t") +
TL(
"Load ids from a file according to the current modification mode.")).c_str(),
nullptr,
this,
MID_CHOOSEN_LOAD,
GUIDesignButton);
271 std::vector<GNEAttributeCarrier*> loadedACs;
272 std::ifstream strm(file.c_str());
278 std::map<const std::string, GNEAttributeCarrier*> GLFUllNameAC;
280 for (
const auto& GLObject : GLObjects) {
289 while (strm.good()) {
293 if (line.length() != 0) {
305 loadedACs.push_back(AC);
311 if (loadedACs.size() > 0) {
312 mySelectorFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::MODESELECT,
"load selection");
313 mySelectorFrameParent->handleIDs(loadedACs);
314 mySelectorFrameParent->myViewNet->getUndoList()->end();
316 mySelectorFrameParent->myViewNet->updateViewNet();
324 FXFileDialog opendialog(getCollapsableFrame(),
TL(
"Open List of Selected Items"));
326 opendialog.setSelectMode(SELECTFILE_EXISTING);
327 opendialog.setPatternList(
"Selection files (*.txt)\nAll files (*)");
331 if (opendialog.execute()) {
333 loadFromFile(opendialog.getFilename().text());
342 TL(
"Save List of selected Items"),
".txt",
350 const auto selectedACs = mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getSelectedAttributeCarriers(
false);
351 for (
const auto& selectedAC : selectedACs) {
360 WRITE_DEBUG(
"Opening FXMessageBox 'error storing selection'");
362 FXMessageBox::error(getCollapsableFrame(), MBOX_OK,
"Storing Selection failed",
"%s", e.what());
364 WRITE_DEBUG(
"Closed FXMessageBox 'error storing selection' with 'OK'");
372 bool ignoreLocking =
false;
374 if ((mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork() && processNetworkElementSelection(
true,
false, ignoreLocking)) ||
375 (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand() && processDemandElementSelection(
true,
false, ignoreLocking)) ||
376 (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData() && processDataElementSelection(
true,
false, ignoreLocking))) {
378 mySelectorFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::MODESELECT,
"invert selection");
380 if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) {
381 processNetworkElementSelection(
false,
true, ignoreLocking);
382 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand()) {
383 processDemandElementSelection(
false,
true, ignoreLocking);
384 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData()) {
385 processDataElementSelection(
false,
true, ignoreLocking);
388 mySelectorFrameParent->myViewNet->getUndoList()->end();
396 mySelectorFrameParent->getViewNet()->hotkeyDel();
403 bool ignoreLocking =
false;
405 if ((mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork() && processNetworkElementSelection(
true,
false, ignoreLocking)) ||
406 (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand() && processDemandElementSelection(
true,
false, ignoreLocking)) ||
407 (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData() && processDataElementSelection(
true,
false, ignoreLocking))) {
409 mySelectorFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::MODESELECT,
"invert selection");
411 if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) {
413 processNetworkElementSelection(
false,
false, ignoreLocking);
414 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand()) {
416 processDemandElementSelection(
false,
false, ignoreLocking);
417 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData()) {
419 processDataElementSelection(
false,
false, ignoreLocking);
422 mySelectorFrameParent->myViewNet->getUndoList()->end();
433 onCmdInvert(0, 0, 0);
434 onCmdDelete(0, 0, 0);
436 mySelectorFrameParent->getViewNet()->getUndoList()->end();
444 const auto& locks = mySelectorFrameParent->getViewNet()->getLockManager();
446 const auto& ACs = mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers();
448 GNEUndoList* undoList = mySelectorFrameParent->myViewNet->getUndoList();
450 for (
const auto& junction : ACs->getJunctions()) {
452 if (ignoreLocking || !locks.isObjectLocked(
GLO_JUNCTION,
false)) {
455 }
else if (onlyUnselect || junction.second->isAttributeCarrierSelected()) {
460 }
else if (onlyCount) {
461 ignoreLocking = askContinueIfLock();
465 for (
const auto& incomingEdge : junction.second->getGNEIncomingEdges()) {
469 if (ignoreLocking || !locks.isObjectLocked(
GLO_EDGE,
false)) {
475 }
else if (onlyCount) {
476 ignoreLocking = askContinueIfLock();
480 if (ignoreLocking || !locks.isObjectLocked(
GLO_LANE,
false)) {
481 for (
const auto& lane : incomingEdge->getLanes()) {
488 }
else if (onlyCount) {
489 ignoreLocking = askContinueIfLock();
492 }
else if (mySelectorFrameParent->myViewNet->getNetworkViewOptions().selectEdges()) {
494 if (ignoreLocking || !locks.isObjectLocked(
GLO_EDGE,
false)) {
497 }
else if (onlyUnselect || incomingEdge->isAttributeCarrierSelected()) {
502 }
else if (onlyCount) {
503 ignoreLocking = askContinueIfLock();
508 if (ignoreLocking || !locks.isObjectLocked(
GLO_LANE,
false)) {
509 for (
const auto& lane : incomingEdge->getLanes()) {
512 }
else if (onlyUnselect || lane->isAttributeCarrierSelected()) {
518 }
else if (onlyCount) {
519 ignoreLocking = askContinueIfLock();
524 if (ignoreLocking || !locks.isObjectLocked(
GLO_CONNECTION,
false)) {
525 for (
const auto& connection : incomingEdge->getGNEConnections()) {
528 }
else if (onlyUnselect || connection->isAttributeCarrierSelected()) {
534 }
else if (onlyCount) {
535 ignoreLocking = askContinueIfLock();
540 if (ignoreLocking || !locks.isObjectLocked(
GLO_CROSSING,
false)) {
541 for (
const auto& crossing : junction.second->getGNECrossings()) {
544 }
else if (onlyUnselect || crossing->isAttributeCarrierSelected()) {
550 }
else if (onlyCount) {
551 ignoreLocking = askContinueIfLock();
556 for (
const auto& walkingArea : junction.second->getGNEWalkingAreas()) {
559 }
else if (onlyUnselect || walkingArea->isAttributeCarrierSelected()) {
565 }
else if (onlyCount) {
566 ignoreLocking = askContinueIfLock();
572 for (
const auto& additionalTag : ACs->getAdditionals()) {
575 for (
const auto& additional : additionalTag.second) {
578 }
else if (onlyUnselect || additional->isAttributeCarrierSelected()) {
586 }
else if (onlyCount) {
587 ignoreLocking = askContinueIfLock();
591 if (ignoreLocking || !locks.isObjectLocked(
GLO_WIRE,
false)) {
592 for (
const auto& wireTag : ACs->getAdditionals()) {
595 for (
const auto& wire : wireTag.second) {
598 }
else if (onlyUnselect || wire->isAttributeCarrierSelected()) {
606 }
else if (onlyCount) {
607 ignoreLocking = askContinueIfLock();
611 if (ignoreLocking || !locks.isObjectLocked(
GLO_POLYGON,
false)) {
612 for (
const auto& polygon : ACs->getAdditionals().at(
SUMO_TAG_POLY)) {
615 }
else if (onlyUnselect || polygon->isAttributeCarrierSelected()) {
621 }
else if (onlyCount) {
622 ignoreLocking = askContinueIfLock();
626 if (ignoreLocking || !locks.isObjectLocked(
GLO_TAZ,
false)) {
630 }
else if (onlyUnselect ||
TAZ->isAttributeCarrierSelected()) {
639 }
else if (onlyUnselect || TAZSource->isAttributeCarrierSelected()) {
648 }
else if (onlyUnselect || TAZSink->isAttributeCarrierSelected()) {
654 }
else if (onlyCount) {
655 ignoreLocking = askContinueIfLock();
659 if (ignoreLocking || !locks.isObjectLocked(
GLO_POI,
false)) {
663 }
else if (onlyUnselect ||
POI->isAttributeCarrierSelected()) {
669 for (
const auto& POILane : ACs->getAdditionals().at(
GNE_TAG_POILANE)) {
672 }
else if (onlyUnselect || POILane->isAttributeCarrierSelected()) {
678 for (
const auto& POIGeo : ACs->getAdditionals().at(
GNE_TAG_POIGEO)) {
681 }
else if (onlyUnselect || POIGeo->isAttributeCarrierSelected()) {
687 }
else if (onlyCount) {
688 ignoreLocking = askContinueIfLock();
698 const auto& locks = mySelectorFrameParent->getViewNet()->getLockManager();
700 GNEUndoList* undoList = mySelectorFrameParent->myViewNet->getUndoList();
702 const auto& demandElements = mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements();
704 if (ignoreLocking || !locks.isObjectLocked(
GLO_ROUTE,
false)) {
708 }
else if (onlyUnselect || route->isAttributeCarrierSelected()) {
718 }
else if (onlyUnselect || vehicle->getChildDemandElements().front()->isAttributeCarrierSelected()) {
719 vehicle->getChildDemandElements().front()->setAttribute(
GNE_ATTR_SELECTED,
"false", undoList);
721 vehicle->getChildDemandElements().front()->setAttribute(
GNE_ATTR_SELECTED,
"true", undoList);
727 }
else if (onlyUnselect || routeFlow->getChildDemandElements().front()->isAttributeCarrierSelected()) {
728 routeFlow->getChildDemandElements().front()->setAttribute(
GNE_ATTR_SELECTED,
"false", undoList);
730 routeFlow->getChildDemandElements().front()->setAttribute(
GNE_ATTR_SELECTED,
"true", undoList);
733 }
else if (onlyCount) {
734 ignoreLocking = askContinueIfLock();
738 if (ignoreLocking || !locks.isObjectLocked(
GLO_VEHICLE,
false)) {
742 }
else if (onlyUnselect || vehicle->isAttributeCarrierSelected()) {
751 }
else if (onlyUnselect || vehicle->isAttributeCarrierSelected()) {
760 }
else if (onlyUnselect || trip->isAttributeCarrierSelected()) {
769 }
else if (onlyUnselect || flow->isAttributeCarrierSelected()) {
778 }
else if (onlyUnselect || routeFlow->isAttributeCarrierSelected()) {
787 }
else if (onlyUnselect || routeFlow->isAttributeCarrierSelected()) {
796 }
else if (onlyUnselect || tripJunction->isAttributeCarrierSelected()) {
805 }
else if (onlyUnselect || tripTAZ->isAttributeCarrierSelected()) {
814 }
else if (onlyUnselect || flowjunction->isAttributeCarrierSelected()) {
823 }
else if (onlyUnselect || flowTAZ->isAttributeCarrierSelected()) {
829 }
else if (onlyCount) {
830 ignoreLocking = askContinueIfLock();
834 if (ignoreLocking || !locks.isObjectLocked(
GLO_PERSON,
false)) {
838 }
else if (onlyUnselect || person->isAttributeCarrierSelected()) {
847 }
else if (onlyUnselect || personFlow->isAttributeCarrierSelected()) {
853 }
else if (onlyCount) {
854 ignoreLocking = askContinueIfLock();
858 if (ignoreLocking || !locks.isObjectLocked(
GLO_PERSONTRIP,
false)) {
860 for (
const auto& personPlan : person->getChildDemandElements()) {
863 }
else if (personPlan->getTagProperty().isPersonTrip()) {
864 if (onlyUnselect || personPlan->isAttributeCarrierSelected()) {
873 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
876 }
else if (personPlan->getTagProperty().isPersonTrip()) {
877 if (onlyUnselect || personPlan->isAttributeCarrierSelected()) {
885 }
else if (onlyCount) {
886 ignoreLocking = askContinueIfLock();
890 if (ignoreLocking || !locks.isObjectLocked(
GLO_PERSONTRIP,
false)) {
892 for (
const auto& personPlan : person->getChildDemandElements()) {
893 if (personPlan->getTagProperty().isRide()) {
896 }
else if (onlyUnselect || personPlan->isAttributeCarrierSelected()) {
905 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
906 if (personPlan->getTagProperty().isRide()) {
909 }
else if (onlyUnselect || personPlan->isAttributeCarrierSelected()) {
917 }
else if (onlyCount) {
918 ignoreLocking = askContinueIfLock();
922 if (ignoreLocking || !locks.isObjectLocked(
GLO_PERSONTRIP,
false)) {
924 for (
const auto& personPlan : person->getChildDemandElements()) {
925 if (personPlan->getTagProperty().isWalk()) {
928 }
else if (onlyUnselect || personPlan->isAttributeCarrierSelected()) {
937 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
938 if (personPlan->getTagProperty().isWalk()) {
941 }
else if (onlyUnselect || personPlan->isAttributeCarrierSelected()) {
949 }
else if (onlyCount) {
950 ignoreLocking = askContinueIfLock();
954 if (ignoreLocking || !locks.isObjectLocked(
GLO_CONTAINER,
false)) {
958 }
else if (onlyUnselect || container->isAttributeCarrierSelected()) {
967 }
else if (onlyUnselect || containerFlow->isAttributeCarrierSelected()) {
973 }
else if (onlyCount) {
974 ignoreLocking = askContinueIfLock();
978 if (ignoreLocking || !locks.isObjectLocked(
GLO_TRANSPORT,
false)) {
980 for (
const auto& containerPlan : container->getChildDemandElements()) {
981 if (containerPlan->getTagProperty().isTransportPlan()) {
984 }
else if (onlyUnselect || containerPlan->isAttributeCarrierSelected()) {
993 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
994 if (containerPlan->getTagProperty().isTransportPlan()) {
997 }
else if (onlyUnselect || containerPlan->isAttributeCarrierSelected()) {
1005 }
else if (onlyCount) {
1006 ignoreLocking = askContinueIfLock();
1010 if (ignoreLocking || !locks.isObjectLocked(
GLO_TRANSHIP,
false)) {
1012 for (
const auto& containerPlan : container->getChildDemandElements()) {
1013 if (containerPlan->getTagProperty().isTranshipPlan()) {
1016 }
else if (onlyUnselect || containerPlan->isAttributeCarrierSelected()) {
1025 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1026 if (containerPlan->getTagProperty().isTranshipPlan()) {
1029 }
else if (onlyUnselect || containerPlan->isAttributeCarrierSelected()) {
1037 }
else if (onlyCount) {
1038 ignoreLocking = askContinueIfLock();
1042 if (ignoreLocking || !locks.isObjectLocked(
GLO_STOP,
false)) {
1043 for (
const auto& demandElementTag : demandElements) {
1044 for (
const auto& demandElement : demandElementTag.second) {
1046 if (!demandElement->getTagProperty().isType()) {
1048 for (
const auto& stop : demandElement->getChildDemandElements()) {
1049 if (stop->getTagProperty().isStop() || stop->getTagProperty().isStopPerson() || stop->getTagProperty().isStopContainer()) {
1052 }
else if (onlyUnselect || stop->isAttributeCarrierSelected()) {
1059 for (
const auto& stopEmbeddedRoute : stop->getChildDemandElements()) {
1060 if (stopEmbeddedRoute->getTagProperty().isStop() ||
1061 stopEmbeddedRoute->getTagProperty().isStopPerson() ||
1062 stopEmbeddedRoute->getTagProperty().isStopContainer()) {
1065 }
else if (onlyUnselect || stopEmbeddedRoute->isAttributeCarrierSelected()) {
1077 }
else if (onlyCount) {
1078 ignoreLocking = askContinueIfLock();
1088 const auto& locks = mySelectorFrameParent->getViewNet()->getLockManager();
1090 const auto undoList = mySelectorFrameParent->myViewNet->getUndoList();
1092 const auto& ACs = mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers();
1094 for (
const auto& genericDataTag : ACs->getGenericDatas()) {
1095 for (
const auto& genericData : genericDataTag.second) {
1096 if (onlyCount && locks.isObjectLocked(genericData->getType(),
false)) {
1097 ignoreLocking = askContinueIfLock();
1099 }
else if ((ignoreLocking || (!locks.isObjectLocked(
GLO_EDGEDATA,
false) && genericData->getType() ==
GLO_EDGEDATA)) ||
1104 }
else if (onlyUnselect || genericData->isAttributeCarrierSelected()) {
1118 WRITE_DEBUG(
"Opening FXMessageBox 'confirm selection operation'");
1120 const FXuint answer = FXMessageBox::question(mySelectorFrameParent->getViewNet()->getApp(),
1121 MBOX_YES_NO,
"Confirm selection operation",
"There are locked elements in currentselection.\nApply operation to locked elements?");
1125 WRITE_DEBUG(
"Closed FXMessageBox 'confirm selection operation' with 'No'");
1126 }
else if (answer == 4) {
1127 WRITE_DEBUG(
"Closed FXMessageBox 'confirm selection operation' with 'ESC'");
1132 WRITE_DEBUG(
"Closed FXMessageBox 'confirm selection operation' with 'Yes'");
1143 mySelectorFrameParent(selectorFrameParent),
1167 for (
const auto& item :
myItems) {
1181 if (obj == myParentsComboBox) {
1182 for (
const auto& item : myItems) {
1183 if (item.second == myParentsComboBox->getText().text()) {
1185 mySelectParentsButton->enable();
1186 myUnselectParentsButton->enable();
1188 myParentsComboBox->setTextColor(FXRGB(0, 0, 0));
1190 myCurrentSelectedParent = item.first;
1195 myCurrentSelectedParent = Selection::NOTHING;
1197 mySelectParentsButton->disable();
1198 myUnselectParentsButton->disable();
1199 myParentsComboBox->setTextColor(FXRGB(255, 0, 0));
1201 }
else if (obj == myChildrenComboBox) {
1202 for (
const auto& item : myItems) {
1203 if (item.second == myChildrenComboBox->getText().text()) {
1205 mySelectChildrenButton->enable();
1206 myUnselectChildrenButton->enable();
1208 myChildrenComboBox->setTextColor(FXRGB(0, 0, 0));
1210 myCurrentSelectedChild = item.first;
1215 myCurrentSelectedChild = Selection::NOTHING;
1217 mySelectChildrenButton->disable();
1218 myUnselectChildrenButton->disable();
1219 myChildrenComboBox->setTextColor(FXRGB(255, 0, 0));
1229 const auto selectedACs = mySelectorFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getSelectedAttributeCarriers(
true);
1231 if ((selectedACs.size() > 0) && (myCurrentSelectedParent != Selection::NOTHING)) {
1233 std::vector<GNEHierarchicalElement*> HEToSelect;
1234 for (
const auto& selectedAC : selectedACs) {
1236 const auto HE = selectedAC->getHierarchicalElement();
1238 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::JUNCTION)) {
1239 HEToSelect.insert(HEToSelect.end(), HE->getParentJunctions().begin(), HE->getParentJunctions().end());
1242 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::EDGE)) {
1243 if (selectedAC->getTagProperty().getTag() ==
SUMO_TAG_LANE) {
1247 HEToSelect.insert(HEToSelect.end(), HE->getParentEdges().begin(), HE->getParentEdges().end());
1251 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::LANE)) {
1252 HEToSelect.insert(HEToSelect.end(), HE->getParentLanes().begin(), HE->getParentLanes().end());
1255 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::ADDITIONAL)) {
1256 HEToSelect.insert(HEToSelect.end(), HE->getParentAdditionals().begin(), HE->getParentAdditionals().end());
1259 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::WIRE)) {
1260 HEToSelect.insert(HEToSelect.end(), HE->getParentAdditionals().begin(), HE->getParentAdditionals().end());
1263 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::DEMAND)) {
1264 HEToSelect.insert(HEToSelect.end(), HE->getParentDemandElements().begin(), HE->getParentDemandElements().end());
1267 if ((myCurrentSelectedParent == Selection::ALL) || (myCurrentSelectedParent == Selection::DATA)) {
1268 HEToSelect.insert(HEToSelect.end(), HE->getParentGenericDatas().begin(), HE->getParentGenericDatas().end());
1272 if (HEToSelect.size() > 0) {
1273 if (HEToSelect.size() > 1) {
1274 mySelectorFrameParent->getViewNet()->getUndoList()->begin(
GUIIcon::SELECT,
"select parents");
1276 for (
const auto& HE : HEToSelect) {
1277 if (obj == mySelectParentsButton) {
1278 HE->setAttribute(
GNE_ATTR_SELECTED,
"true", mySelectorFrameParent->getViewNet()->getUndoList());
1280 HE->setAttribute(
GNE_ATTR_SELECTED,
"false", mySelectorFrameParent->getViewNet()->getUndoList());
1283 if (HEToSelect.size() > 1) {
1284 mySelectorFrameParent->getViewNet()->getUndoList()->end();
1288 mySelectorFrameParent->mySelectionInformation->updateInformationLabel();
1290 mySelectorFrameParent->getViewNet()->update();
1299 const auto selectedACs = mySelectorFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getSelectedAttributeCarriers(
true);
1301 if ((selectedACs.size() > 0) && (myCurrentSelectedChild != Selection::NOTHING)) {
1303 std::vector<GNEHierarchicalElement*> HEToSelect;
1304 for (
const auto& selectedAC : selectedACs) {
1306 const auto HE = selectedAC->getHierarchicalElement();
1308 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::JUNCTION)) {
1311 const auto junction =
dynamic_cast<GNEJunction*
>(selectedAC);
1313 HEToSelect.insert(HEToSelect.end(), junction->getGNEIncomingEdges().begin(), junction->getGNEIncomingEdges().end());
1314 HEToSelect.insert(HEToSelect.end(), junction->getGNEOutgoingEdges().begin(), junction->getGNEOutgoingEdges().end());
1316 HEToSelect.insert(HEToSelect.end(), HE->getChildJunctions().begin(), HE->getChildJunctions().end());
1320 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::EDGE)) {
1321 if (selectedAC->getTagProperty().getTag() ==
SUMO_TAG_EDGE) {
1323 const auto edge =
dynamic_cast<GNEEdge*
>(selectedAC);
1325 HEToSelect.insert(HEToSelect.end(), edge->getLanes().begin(), edge->getLanes().end());
1327 HEToSelect.insert(HEToSelect.end(), HE->getChildEdges().begin(), HE->getChildEdges().end());
1331 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::CONNECTION)) {
1332 if (selectedAC->getTagProperty().getTag() ==
SUMO_TAG_EDGE) {
1334 const auto edge =
dynamic_cast<GNEEdge*
>(selectedAC);
1336 HEToSelect.insert(HEToSelect.end(), edge->getGNEConnections().begin(), edge->getGNEConnections().end());
1337 }
else if (selectedAC->getTagProperty().getTag() ==
SUMO_TAG_LANE) {
1339 const auto lane =
dynamic_cast<GNELane*
>(selectedAC);
1341 for (
const auto& connection : lane->getParentEdge()->getGNEConnections()) {
1343 HEToSelect.push_back(connection);
1348 const auto junction =
dynamic_cast<GNEJunction*
>(selectedAC);
1352 HEToSelect.insert(HEToSelect.end(), connections.begin(), connections.end());
1356 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::CROSSING)) {
1359 const auto junction =
dynamic_cast<GNEJunction*
>(selectedAC);
1361 HEToSelect.insert(HEToSelect.end(), junction->getGNECrossings().begin(), junction->getGNECrossings().end());
1365 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::LANE)) {
1366 HEToSelect.insert(HEToSelect.end(), HE->getChildLanes().begin(), HE->getChildLanes().end());
1369 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::ADDITIONAL)) {
1371 for (
const auto& additionalChild : HE->getChildAdditionals()) {
1372 if (!additionalChild->getTagProperty().isWireElement() && !additionalChild->getTagProperty().isSymbol()) {
1373 HEToSelect.push_back(additionalChild);
1378 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::WIRE)) {
1380 for (
const auto& wireChild : HE->getChildAdditionals()) {
1381 if (wireChild->getTagProperty().isWireElement() && !wireChild->getTagProperty().isSymbol()) {
1382 HEToSelect.push_back(wireChild);
1387 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::DEMAND)) {
1388 HEToSelect.insert(HEToSelect.end(), HE->getChildDemandElements().begin(), HE->getChildDemandElements().end());
1391 if ((myCurrentSelectedChild == Selection::ALL) || (myCurrentSelectedChild == Selection::DATA)) {
1392 HEToSelect.insert(HEToSelect.end(), HE->getChildGenericDatas().begin(), HE->getChildGenericDatas().end());
1396 if (HEToSelect.size() > 0) {
1397 if (HEToSelect.size() > 1) {
1398 mySelectorFrameParent->getViewNet()->getUndoList()->begin(
GUIIcon::SELECT,
"select children");
1400 for (
const auto& HE : HEToSelect) {
1401 if (obj == mySelectChildrenButton) {
1404 HE->setAttribute(
GNE_ATTR_SELECTED,
"false", mySelectorFrameParent->getViewNet()->getUndoList());
1407 if (HEToSelect.size() > 1) {
1408 mySelectorFrameParent->getViewNet()->getUndoList()->end();
1412 mySelectorFrameParent->mySelectionInformation->updateInformationLabel();
1414 mySelectorFrameParent->getViewNet()->update();
1437 GNEFrame(viewParent, viewNet,
"Selection") {
1511 if (AC ==
nullptr) {
1519 if ((AC->getTagProperty().isNetworkElement() || AC->getTagProperty().isAdditionalElement()) &&
1532 if (filteredGLObjects.size() > 1) {
1536 if (AC->isAttributeCarrierSelected()) {
1537 AC->unselectAttributeCarrier();
1539 AC->selectAttributeCarrier();
1553 std::set<std::pair<std::string, GNEAttributeCarrier*> > ACsToSelect, ACsToUnselect;
1559 for (
const auto& selectedAC : selectedACs) {
1560 ACsToUnselect.insert(std::make_pair(selectedAC->getID(), selectedAC));
1564 for (
const auto& AC : ACs) {
1566 switch (setOperation) {
1568 ACsToUnselect.insert(std::make_pair(AC->getID(), AC));
1571 if (ACsToUnselect.find(std::make_pair(AC->getID(), AC)) != ACsToUnselect.end()) {
1572 ACsToSelect.insert(std::make_pair(AC->getID(), AC));
1576 ACsToSelect.insert(std::make_pair(AC->getID(), AC));
1582 std::set<GNEEdge*> edgesToSelect;
1584 for (
const auto& AC : ACsToSelect) {
1585 if (AC.second->getTagProperty().getTag() ==
SUMO_TAG_EDGE) {
1590 for (
const auto& edgeToSelect : edgesToSelect) {
1592 ACsToSelect.insert(std::make_pair(edgeToSelect->getFromJunction()->getID(), edgeToSelect->getFromJunction()));
1593 for (
const auto& connectionToSelect : edgeToSelect->getFromJunction()->getGNEConnections()) {
1594 ACsToSelect.insert(std::make_pair(connectionToSelect->getID(), connectionToSelect));
1596 for (
const auto& fromCrossingToSelect : edgeToSelect->getFromJunction()->getGNECrossings()) {
1597 ACsToSelect.insert(std::make_pair(fromCrossingToSelect->getID(), fromCrossingToSelect));
1599 for (
const auto& fromWalkingAreaToSelect : edgeToSelect->getFromJunction()->getGNEWalkingAreas()) {
1600 ACsToSelect.insert(std::make_pair(fromWalkingAreaToSelect->getID(), fromWalkingAreaToSelect));
1603 ACsToSelect.insert(std::make_pair(edgeToSelect->getToJunction()->getID(), edgeToSelect->getToJunction()));
1604 for (
const auto& connectionToSelect : edgeToSelect->getToJunction()->getGNEConnections()) {
1605 ACsToSelect.insert(std::make_pair(connectionToSelect->getID(), connectionToSelect));
1607 for (
const auto& toCrossingToSelect : edgeToSelect->getToJunction()->getGNECrossings()) {
1608 ACsToSelect.insert(std::make_pair(toCrossingToSelect->getID(), toCrossingToSelect));
1610 for (
const auto& toWalkingAreaToSelect : edgeToSelect->getToJunction()->getGNEWalkingAreas()) {
1611 ACsToSelect.insert(std::make_pair(toWalkingAreaToSelect->getID(), toWalkingAreaToSelect));
1616 if ((ACsToSelect.size() + ACsToUnselect.size()) > 0) {
1619 for (
const auto& ACToUnselect : ACsToUnselect) {
1620 if (ACToUnselect.second->getTagProperty().isSelectable()) {
1624 for (
const auto& ACToSelect : ACsToSelect) {
1625 if (ACToSelect.second->getTagProperty().isSelectable()) {
1635std::vector<GNEAttributeCarrier*>
1637 std::vector<GNEAttributeCarrier*> result;
1643 for (
const auto& AC : allACbyTag) {
1644 if (expr ==
"" && compOp ==
'@') {
1645 result.push_back(AC);
1646 }
else if (tagValue.hasAttribute(ACAttr) && tagValue.getAttributeProperties(ACAttr).isNumerical()) {
1648 std::istringstream buf(AC->getAttribute(ACAttr));
1653 result.push_back(AC);
1658 result.push_back(AC);
1663 result.push_back(AC);
1669 std::string acVal = AC->getAttributeForSelection(ACAttr);
1672 if (acVal.find(expr) != std::string::npos) {
1673 result.push_back(AC);
1677 if (acVal.find(expr) == std::string::npos) {
1678 result.push_back(AC);
1682 if (acVal == expr) {
1683 result.push_back(AC);
1687 if (acVal != expr) {
1688 result.push_back(AC);
1698std::vector<GNEAttributeCarrier*>
1700 std::vector<GNEAttributeCarrier*> result;
1702 for (
const auto& genericData : genericDatas) {
1703 if (expr ==
"" && compOp ==
'@') {
1704 result.push_back(genericData);
1707 std::istringstream buf(genericData->getParameter(attr,
"0"));
1712 result.push_back(genericData);
1717 result.push_back(genericData);
1722 result.push_back(genericData);
1728 std::string acVal = genericData->getAttributeForSelection(
GNE_ATTR_PARENT);
1731 if (acVal.find(expr) != std::string::npos) {
1732 result.push_back(genericData);
1736 if (acVal.find(expr) == std::string::npos) {
1737 result.push_back(genericData);
1741 if (acVal == expr) {
1742 result.push_back(genericData);
1746 if (acVal != expr) {
1747 result.push_back(genericData);
FXDEFMAP(GNESelectorFrame::ModificationMode) ModificationModeMap[]
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
@ MID_GNE_SELECTORFRAME_SELECTSCALE
changes the visual scaling of selected items
@ MID_GNE_SELECTORFRAME_CHILDREN
select/unselect children
@ MID_CHOOSEN_SAVE
Save set.
@ MID_CHOOSEN_INVERT
Deselect selected items.
@ MID_CHOOSEN_DELETE
delete set
@ MID_CHOOSEN_OPERATION
set type of selection
@ MID_CHOOSEN_LOAD
Load set.
@ MID_CHOOSEN_REDUCE
simplify network reduction
@ MID_CHOOSEN_CLEAR
Clear set.
@ MID_GNE_SELECT
select element
@ MID_GNE_SELECTORFRAME_PARENTS
select/unselect parents
#define GUIDesignSpinDial
#define GUIDesignComboBox
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
#define GUIDesignRadioButton
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
@ GLO_EDGERELDATA
edge relation data
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_WALKINGAREA
a walkingArea
@ GLO_TRANSHIP
a container tranship
@ GLO_WIRE
reserved GLO type for packing all wire elements
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
@ GLO_CONTAINER
a container
@ GLO_CONNECTION
a connection
@ GLO_ADDITIONALELEMENT
reserved GLO type for packing all additionals elements
@ GLO_PERSONTRIP
a person trip
@ GLO_TRANSPORT
a container transport
FXString gCurrentFolder
The folder used as last.
#define WRITE_ERRORF(...)
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions
@ GNE_TAG_TRIP_TAZS
a single trip definition that uses TAZs
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route
@ GNE_TAG_FLOW_JUNCTIONS
a flow between junctions
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ GNE_TAG_FLOW_TAZS
a flow between TAZs
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route
@ GNE_TAG_POILANE
Point of interest over Lane.
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool isTemplate() const
check if this AC is template
virtual GUIGlObject * getGUIGlObject()=0
A road/street connecting two junctions (netedit-version)
void hideElementSet()
hide element set
void showElementSet()
show element set
GNEViewNet * myViewNet
FOX need this.
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
virtual void show()
show Frame
virtual void hide()
hide Frame
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
std::vector< GNEConnection * > getGNEConnections() const
Returns all GNEConnections vinculated with this junction.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEEdge * getParentEdge() const
get parent edge
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag tag=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
FXRadioButton * myReplaceRadioButton
replace radio button
Operation
FOX-declaration.
ModificationMode(GNESelectorFrame *selectorFrameParent)
constructor
long onCmdSelectModificationMode(FXObject *, FXSelector, void *)
FXRadioButton * myAddRadioButton
FOX need this.
~ModificationMode()
destructor
Operation getModificationMode() const
get current modification mode
FXRadioButton * myRemoveRadioButton
remove radio button
FXRadioButton * myKeepRadioButton
keep button
FXComboBox * myParentsComboBox
comboBox for parents
SelectionHierarchy(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
~SelectionHierarchy()
destructor
FXButton * myUnselectParentsButton
unselect parents button
FXButton * mySelectParentsButton
select parents button
FXButton * myUnselectChildrenButton
unselect parents button
long onCmdParents(FXObject *obj, FXSelector, void *)
called when user press select/unselect parents button
long onCmdChildren(FXObject *obj, FXSelector, void *)
called when user press select/unselect children button
long onCmdSelectItem(FXObject *obj, FXSelector, void *)
called when user select an item in comboBox
FXComboBox * myChildrenComboBox
comboBox for children
const std::vector< std::pair< Selection, std::string > > myItems
FXButton * mySelectChildrenButton
select children button
SelectionOperation(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
bool processDataElementSelection(const bool onlyCount, const bool onlyUnselect, bool &ignoreLocking)
process data element selection
bool askContinueIfLock() const
ask if continue due locking
long onCmdDelete(FXObject *, FXSelector, void *)
Called when the user presses the delete-button.
long onCmdReduce(FXObject *, FXSelector, void *)
Called when the user presses the Reduce-button.
~SelectionOperation()
destructor
long onCmdInvert(FXObject *, FXSelector, void *)
Called when the user presses the Invert-button.
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
void loadFromFile(const std::string &file) const
load from file
bool processDemandElementSelection(const bool onlyCount, const bool onlyUnselect, bool &ignoreLocking)
process demand element selection
bool processNetworkElementSelection(const bool onlyCount, const bool onlyUnselect, bool &ignoreLocking)
FOX need this.
~VisualScaling()
destructor
long onCmdScaleSelection(FXObject *, FXSelector, void *)
Called when the user changes visual scaling.
VisualScaling(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
FXRealSpinner * mySelectionScaling
Spinner for selection scaling.
FXVerticalFrame * getContentFrame() const
get vertical frame that holds all widgets of frame
std::vector< GNEAttributeCarrier * > getMatches(const SumoXMLTag ACTag, const SumoXMLAttr ACAttr, const char compOp, const double val, const std::string &expr)
return ACs of the given type with matching attrs
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame
ModificationMode * getModificationModeModul() const
get modification mode modul
std::vector< GNEAttributeCarrier * > getGenericMatches(const std::vector< GNEGenericData * > &genericDatas, const std::string &attr, const char compOp, const double val, const std::string &expr)
return GenericDatas of the given type with matching attrs
bool selectAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
select attribute carrier (element)
GNESelectorFrame::SelectionOperation * mySelectionOperation
modul for selection operations
~GNESelectorFrame()
Destructor.
GNESelectorFrame::SelectionInformation * mySelectionInformation
modul for selection information
GNESelectorFrame::VisualScaling * myVisualScaling
modul for visual scaling
GNEElementSet * myDemandElementSet
moduls for select demand element set
GNESelectorFrame::Information * myInformation
information modul
GNESelectorFrame::SelectionHierarchy * mySelectionHierarchy
modul for selection hierarchy
GNEElementSet * myNetworkElementSet
moduls for select network element set
GNEElementSet * myDataElementSet
moduls for select data element set
GNESelectorFrame::ModificationMode * myModificationMode
modul for change modification mode
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
GNESelectorFrame::SelectionOperation * getSelectionOperationModul() const
get selection operation modul
void handleIDs(const std::vector< GNEAttributeCarrier * > &ACs, const ModificationMode::Operation setop=ModificationMode::Operation::DEFAULT)
apply list of ids to the current selection according to Operation,
GNESelectorFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
SelectionInformation * getSelectionInformation() const
get modul for selection information
bool isDataElement() const
return true if tag correspond to a data element
bool isSelectable() const
return true if tag correspond to a selectable element
bool isAdditionalPureElement() const
return true if tag correspond to a pure additional element
bool isWireElement() const
return true if tag correspond to a Wire element
bool isDemandElement() const
return true if tag correspond to a demand element
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const
check if given GLObject is locked for inspect, select, delete and move
class used to group all variables related with objects under cursor after a click over view
const std::vector< GUIGlObject * > & getClickedGLObjects() const
get vector with clicked GL objects
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GNENet * getNet() const
get the net object
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void openSelectDialogAtCursor(const std::vector< GUIGlObject * > &GLObjects)
open select dialog at cursor
bool autoSelectNodes()
whether to autoselect nodes or to lanes
GNEUndoList * getUndoList() const
get the undoList object
GNEViewNetHelper::LockManager & getLockManager()
get lock manager
A single child window which contains a view of the simulation area.
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
const std::vector< GUIGlObject * > & getAllGLObjects() const
Returns the set of all known objects.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
A list item which allows for custom coloring.
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
void setText(const std::string &text)
set text
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
Static storage of an output device and its base (abstract) implementation.
void close()
Closes the device and removes it from the dictionary.
static OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.
C++ TraCI client API implementation.
const std::string & getString(const T key) const
static std::string replace(std::string str, const std::string &what, const std::string &by)
Replaces all occurrences of the second string by the third string within the first string.
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
bool isCurrentSupermodeData() const
@check if current supermode is Data
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
static std::vector< GUIGlObject * > filterElementsByLayer(const std::vector< GUIGlObject * > &GLObjects)
filter elements based on the layer