Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEViewNet.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
19// A view on the network being edited (adapted from GUIViewTraffic)
20/****************************************************************************/
21
22#include <netbuild/NBEdgeCont.h>
80
82#include "GNENet.h"
83#include "GNEInternalTest.h"
84#include "GNEUndoList.h"
85#include "GNEViewNet.h"
86#include "GNEViewParent.h"
87
88// ===========================================================================
89// FOX callback mapping
90// ===========================================================================
91
92FXDEFMAP(GNEViewNet) GNEViewNetMap[] = {
93 // Super Modes
97 // Modes
114 // Network view options
131 // Demand view options
143 // Data view options
152 // Select elements
153 FXMAPFUNC(SEL_COMMAND, MID_ADDSELECT, GNEViewNet::onCmdAddSelected),
154 FXMAPFUNC(SEL_COMMAND, MID_REMOVESELECT, GNEViewNet::onCmdRemoveSelected),
157 // Junctions
170 FXMAPFUNC(SEL_COMMAND, MID_GNE_JUNCTION_ADDTLS, GNEViewNet::onCmdAddTLS),
172 // Connections
175 // Crossings
177 // WalkingArea
179 // Edges
180 FXMAPFUNC(SEL_COMMAND, MID_GNE_EDGE_SPLIT, GNEViewNet::onCmdSplitEdge),
182 FXMAPFUNC(SEL_COMMAND, MID_GNE_EDGE_REVERSE, GNEViewNet::onCmdReverseEdge),
188 FXMAPFUNC(SEL_COMMAND, MID_GNE_EDGE_SMOOTH, GNEViewNet::onCmdSmoothEdges),
194 // Lanes
213 // Additionals
215 // Polygons
218 FXMAPFUNC(SEL_COMMAND, MID_GNE_POLYGON_OPEN, GNEViewNet::onCmdOpenPolygon),
223 // edit custom shapes
232 // POIs
234 // Demand elements
235 FXMAPFUNC(SEL_COMMAND, MID_GNE_REVERSE, GNEViewNet::onCmdReverse),
236 FXMAPFUNC(SEL_COMMAND, MID_GNE_ADDREVERSE, GNEViewNet::onCmdAddReverse),
237 // Geometry Points
240 // toolbar views
243 // IntervalBar
250};
251
252// Object implementation
253FXIMPLEMENT(GNEViewNet, GUISUMOAbstractView, GNEViewNetMap, ARRAYNUMBER(GNEViewNetMap))
254
255
256// ===========================================================================
257// member method definitions
258// ===========================================================================
259#ifdef _MSC_VER
260#pragma warning(push)
261#pragma warning(disable: 4355) // mask warning about "this" in initializers
262#endif
263GNEViewNet::GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMainWindow& app,
264 GNEViewParent* viewParent, GNENet* net, GNEUndoList* undoList,
265 FXGLVisual* glVis, FXGLCanvas* share) :
266 GUISUMOAbstractView(tmpParent, app, viewParent, net->getGrid(), glVis, share),
267 myViewObjectsSelector(this),
268 myEditModes(this),
269 myTestingMode(this),
270 myCommonCheckableButtons(this),
271 myNetworkCheckableButtons(this),
272 myDemandCheckableButtons(this),
273 myDataCheckableButtons(this),
274 myNetworkViewOptions(this),
275 myDemandViewOptions(this),
276 myDataViewOptions(this),
277 myIntervalBar(this),
278 myMoveSingleElement(this),
279 myMoveMultipleElements(this),
280 myVehicleOptions(this),
281 myVehicleTypeOptions(this),
282 mySaveElements(this),
283 myTimeFormat(this),
284 mySelectingArea(this),
285 myEditNetworkElementShapes(this),
286 myLockManager(this),
287 myViewParent(viewParent),
288 myNet(net),
289 myUndoList(undoList) {
290 // view must be the final member of actualParent
291 reparent(actualParent);
292 // Build edit modes
294 // set this net in Net
295 myNet->setViewNet(this);
296 // create allow VClasses dialog
298 // set drag delay
299 ((GUIDanielPerspectiveChanger*)myChanger)->setDragDelay(100000000); // 100 milliseconds
300 // Reset textures
302 // init testing mode
304 // update grid flags
307 // update junction shape flags
308 const bool hide = !myVisualizationSettings->drawJunctionShape;
312}
313#ifdef _MSC_VER
314#pragma warning(pop)
315#endif
316
317
321
322
323void
325 if (myNet && makeCurrent()) {
326 // declare boundary
327 const Boundary maxBoundary(1000000000.0, 1000000000.0, -1000000000.0, -1000000000.0);
328 // get all objects in boundary
329 const std::vector<GUIGlID> GLIDs = getObjectsInBoundary(maxBoundary);
330 // finish make OpenGL context current
331 makeNonCurrent();
332 // declare set
333 std::set<GNEAttributeCarrier*> ACs;
334 // iterate over GUIGlIDs
335 for (const auto& GLId : GLIDs) {
337 // Make sure that object exists
338 if (AC && AC->getTagProperty()->isPlacedInRTree()) {
339 ACs.insert(AC);
340 }
341 }
342 // interate over ACs
343 for (const auto& AC : ACs) {
344 // remove object and insert again with exaggeration
345 myNet->getGrid().removeAdditionalGLObject(AC->getGUIGlObject());
346 myNet->getGrid().addAdditionalGLObject(AC->getGUIGlObject(), AC->getGUIGlObject()->getExaggeration(*myVisualizationSettings));
347 }
348 }
349}
350
351
352void
354
355
360 } else {
361 return 0;
362 }
363}
364
365
366void
368 // build coloring tools
369 {
370 for (auto it_names : gSchemeStorage.getNames()) {
371 v->getColoringSchemesCombo()->appendIconItem(it_names.c_str());
372 if (it_names == myVisualizationSettings->name) {
374 }
375 }
376 }
377 // for junctions
379 std::string("\t") + TL("Locate Junctions") + std::string("\t") + TL("Locate a junction within the network. (Shift+J)"),
381 // for edges
383 std::string("\t") + TL("Locate Edges") + std::string("\t") + TL("Locate an edge within the network. (Shift+E)"),
385 // for walkingAreas
387 std::string("\t") + TL("Locate WalkingAreas") + std::string("\t") + TL("Locate a walkingArea within the network. (Shift+W)"),
389 // for vehicles
391 std::string("\t") + TL("Locate Vehicles") + std::string("\t") + TL("Locate a vehicle within the network. (Shift+V)"),
393 // for person
395 std::string("\t") + TL("Locate Persons") + std::string("\t") + TL("Locate a person within the network. (Shift+P)"),
397 // for container
399 std::string("\t") + TL("Locate Containers") + std::string("\t") + TL("Locate a container within the network. (Shift+C)"),
401 // for routes
403 std::string("\t") + TL("Locate Route") + std::string("\t") + TL("Locate a route within the network. (Shift+R)"),
405 // for routes
407 std::string("\t") + TL("Locate Stops") + std::string("\t") + TL("Locate a stop within the network. (Shift+S)"),
409 // for persons (currently unused)
410 /*
411 new MFXButtonTooltip(v->getLocatorPopup(),
412 std::string("\t") + TL("Locate Vehicle\tLocate a person within the network.",
413 GUIIconSubSys::getIcon(GUIIcon::LOCATEPERSON), &v, MID_LOCATEPERSON,
414 GUIDesignButtonPopup);
415 */
416 // for tls
418 std::string("\t") + TL("Locate TLS") + std::string("\t") + TL("Locate a tls within the network. (Shift+T)"),
420 // for additional stuff
422 std::string("\t") + TL("Locate Additional") + std::string("\t") + TL("Locate an additional structure within the network. (Shift+A)"),
424 // for pois
426 std::string("\t") + TL("Locate PoI") + std::string("\t") + TL("Locate a PoI within the network. (Shift+O)"),
428 // for polygons
430 std::string("\t") + TL("Locate Polygon") + std::string("\t") + TL("Locate a Polygon within the network. (Shift+L)"),
432}
433
434
435void
436GNEViewNet::updateViewNet(const bool ignoreViewUpdater) const {
437 // this call is only used for breakpoints (to check when view is updated)
438 if (ignoreViewUpdater || gViewUpdater.allowUpdate()) {
439 GUISUMOAbstractView::update();
440 }
441}
442
443
444void
448
449
450void
453 // hide data button (and adjust width)
454 myEditModes.dataButton->hide();
455 // check network modes
463 break;
464 default:
465 break;
466 }
467 // check demand modes
468 switch (myEditModes.demandEditMode) {
475 break;
476 default:
477 break;
478 }
479 // go to network mode if we're in data mode
482 } else {
483 // refresh current supermode
485 }
486 } else {
487 // show data button
488 myEditModes.dataButton->show();
489 // refresh current supermode
491 }
492}
493
494
499
500
501void
503 // clear post drawing elements
505 // set selection position in gObjectsInPosition
507 // create an small boundary
508 Boundary positionBoundary;
509 positionBoundary.add(pos);
510 positionBoundary.grow(POSITION_EPS);
511 // push matrix
513 // enable draw for view objects handler (this calculate the contours)
515 // draw all GL elements within the small boundary
516 drawGLElements(positionBoundary);
517 // swap selected objects (needed after selecting)
519 // check if filter edges that have the mouse over their geometry points
522 }
523 // restore draw for view objects handler (this calculate the contours)
525 // pop matrix
527 // check if update front elements
528 for (const auto& AC : myMarkFrontElements.getACs()) {
529 gViewObjectsHandler.updateFrontObject(AC->getGUIGlObject());
530 }
531 // after draw elements, update objects under cursor
533}
534
535
536void
538 if (shape.size() == 1) {
539 // if our shape has only one ponit, use updateObjectsInPosition
540 updateObjectsInPosition(shape.front());
541 } else if (shape.size() > 1) {
542 // triangulate shape
543 const auto triangles = Triangle::triangulate(shape);
544 // clear post drawing elements
546 // push matrix
548 // enable draw for object under cursor and rectangle selection
551 // draw all GL elements within the boundares formed by triangles
552 for (const auto& triangle : triangles) {
554 drawGLElements(triangle.getBoundary());
555 }
556 // restore draw for object under cursor
559 // pop matrix
561 // check if update front elements
562 for (const auto& AC : myMarkFrontElements.getACs()) {
563 gViewObjectsHandler.updateFrontObject(AC->getGUIGlObject());
564 }
565 // after draw elements, update objects under cursor
567 }
568}
569
570
571void
573 // if we're inspecting an element, add it to redraw path elements
574 for (const auto& AC : myInspectedElements.getACs()) {
575 const auto pathElement = dynamic_cast<const GNEPathElement*>(AC);
576 if (pathElement) {
578 }
579 }
580 // enable draw for view objects handler (this calculate the contours)
582 // push matrix
584 // redraw elements in buffer
588 // pop matrix
590 // disable drawForViewObjectsHandler
592}
593
594
599
600
605
606
607bool
608GNEViewNet::setColorScheme(const std::string& name) {
609 if (!gSchemeStorage.contains(name)) {
610 return false;
611 }
612 if (myGUIDialogViewSettings != nullptr) {
615 }
616 }
619 return true;
620}
621
622
623void
625 // reimplemented from GUISUMOAbstractView due GNEOverlappedInspection
626 ungrab();
627 // make network current
628 if (isEnabled() && myAmInitialised) {
629 // check if we're cliking while alt button is pressed
631 // set clicked popup position
633 // create cursor popup dialog for mark front element
635 // open popup dialog
637 } else if (myViewObjectsSelector.getGLObjects().empty()) {
639 } else {
640 // declare filtered objects
641 std::vector<GUIGlObject*> filteredGLObjects;
642 // get GUIGLObject front
643 GUIGlObject* overlappedElement = nullptr;
644 // we need to check if we're inspecting a overlapping element
647 overlappedElement = myInspectedElements.getFirstAC()->getGUIGlObject();
648 filteredGLObjects.push_back(overlappedElement);
649 }
650 bool connections = false;
651 bool TLS = false;
652 // fill filtered objects
653 if ((myViewObjectsSelector.getGLObjects().size() == 1) && (myViewObjectsSelector.getGLObjects().back()->getType() == GLO_EDGE)) {
654 // special case for edge geometry points (because edges uses the lane pop ups)
655 filteredGLObjects.push_back(myViewObjectsSelector.getGLObjects().back());
656 } else {
657 for (const auto& glObject : myViewObjectsSelector.getGLObjects()) {
658 // always avoid edges
659 if (glObject->getType() == GLO_EDGE) {
660 continue;
661 }
662 if (glObject->getType() == GLO_CONNECTION) {
663 connections = true;
664 }
665 if (glObject->getType() == GLO_TLLOGIC) {
666 TLS = true;
667 }
668 filteredGLObjects.push_back(glObject);
669 }
670 auto it = filteredGLObjects.begin();
671 if (connections) {
672 // filter junctions if there are connections
673 while (it != filteredGLObjects.end()) {
674 if ((*it)->getType() == GLO_JUNCTION) {
675 it = filteredGLObjects.erase(it);
676 } else {
677 it++;
678 }
679 }
680 } else if (TLS) {
681 // filter all elements except TLLogic
682 while (it != filteredGLObjects.end()) {
683 if ((*it)->getType() != GLO_TLLOGIC) {
684 it = filteredGLObjects.erase(it);
685 } else {
686 it++;
687 }
688 }
689 }
690 }
691 // remove duplicated elements using an unordered set
692 auto itDuplicated = filteredGLObjects.begin();
693 std::unordered_set<GUIGlObject*> unorderedSet;
694 for (auto itElement = filteredGLObjects.begin(); itElement != filteredGLObjects.end(); itElement++) {
695 if (unorderedSet.insert(*itElement).second) {
696 *itDuplicated++ = *itElement;
697 }
698 }
699 filteredGLObjects.erase(itDuplicated, filteredGLObjects.end());
700 // open object dialog
701 openObjectDialog(filteredGLObjects);
702 }
703 }
704}
705
706
707void
708GNEViewNet::openDeleteDialogAtCursor(const std::vector<GUIGlObject*>& GLObjects) {
709 if (myPopup) {
710 destroyPopup();
711 }
712 // set clicked popup position
714 // create cursor popup dialog for delete element
716 myCreatedPopup = true;
717 // open popup dialog
719}
720
721
722void
723GNEViewNet::openSelectDialogAtCursor(const std::vector<GUIGlObject*>& GLObjects) {
724 if (myPopup) {
725 destroyPopup();
726 }
727 // set clicked popup position
729 // create cursor popup dialog for select element
731 myCreatedPopup = true;
732 // open popup dialog
734}
735
736
737void
739 // first check if we have to save gui settings in a file (only used for testing purposes)
740 const auto& neteditOptions = OptionsCont::getOptions();
741 if (neteditOptions.getString("gui-testing.setting-output").size() > 0) {
742 try {
743 // open output device
744 OutputDevice& output = OutputDevice::getDevice(neteditOptions.getString("gui-testing.setting-output"));
745 // save view settings
748 // save viewport (zoom, X, Y and Z)
754 output.closeTag();
755 output.closeTag();
756 // close output device
757 output.close();
758 } catch (...) {
759 WRITE_ERROR(TL("GUI-Settings cannot be saved in ") + neteditOptions.getString("gui-testing.setting-output"));
760 }
761 }
762}
763
764
767 return myEditModes;
768}
769
770
773 return myTestingMode;
774}
775
776
781
782
787
788
793
794
799
800
805
806
811
812
813void
816 assert(!scheme.isFixed());
817 double minValue = std::numeric_limits<double>::infinity();
818 double maxValue = -std::numeric_limits<double>::infinity();
819 // retrieve range
820 bool hasMissingData = false;
821 if (objectType == GLO_LANE) {
822 // XXX (see #3409) multi-colors are not currently handled. this is a quick hack
823 if (active == 9) {
824 active = 8; // segment height, fall back to start height
825 } else if (active == 11) {
826 active = 10; // segment incline, fall back to total incline
827 }
828 for (const auto& lane : myNet->getAttributeCarriers()->getLanes()) {
829 const double val = lane.second->getColorValue(s, active);
830 if (val == s.MISSING_DATA) {
831 hasMissingData = true;
832 continue;
833 }
834 minValue = MIN2(minValue, val);
835 maxValue = MAX2(maxValue, val);
836 }
837 } else if (objectType == GLO_VEHICLE) {
838 for (const auto& tagMap : myNet->getAttributeCarriers()->getDemandElements()) {
839 for (const auto& objItem : tagMap.second) {
840 const double val = objItem.first->getColorValue(s, active);
841 if (val == s.MISSING_DATA) {
842 hasMissingData = true;
843 continue;
844 }
845 minValue = MIN2(minValue, val);
846 maxValue = MAX2(maxValue, val);
847 }
848 }
849 } else if (objectType == GLO_JUNCTION) {
850 if (active == 3) {
851 for (const auto& junction : myNet->getAttributeCarriers()->getJunctions()) {
852 minValue = MIN2(minValue, junction.second->getPositionInView().z());
853 maxValue = MAX2(maxValue, junction.second->getPositionInView().z());
854 }
855 }
856 } else if (objectType == GLO_TAZRELDATA) {
857 if (active == 4) {
858 for (const auto& genericData : myNet->getAttributeCarriers()->getGenericDatas().at(SUMO_TAG_TAZREL)) {
859 const double value = genericData.second->getColorValue(s, active);
860 if (value == s.MISSING_DATA) {
861 continue;
862 }
863 minValue = MIN2(minValue, value);
864 maxValue = MAX2(maxValue, value);
865 }
866 }
867 }
869 scheme.clear();
870 // add threshold for every distinct value
871 std::set<SVCPermissions> codes;
872 for (const auto& lane : myNet->getAttributeCarriers()->getLanes()) {
873 codes.insert(lane.second->getParentEdge()->getNBEdge()->getPermissions(lane.second->getIndex()));
874 }
875 int step = MAX2(1, 360 / (int)codes.size());
876 int hue = 0;
877 for (SVCPermissions p : codes) {
878 scheme.addColor(RGBColor::fromHSV(hue, 1, 1), (double)p);
879 hue = (hue + step) % 360;
880 }
881 return;
882 }
883 buildMinMaxRainbow(s, scheme, rs, minValue, maxValue, hasMissingData);
884}
885
886
887void
888GNEViewNet::setStatusBarText(const std::string& text) {
889 myApp->setStatusBarText(text);
890}
891
892
893bool
896 return false;
897 } else {
899 }
900}
901
902
903void
904GNEViewNet::setSelectorFrameScale(double selectionScale) {
906}
907
908
909bool
913
914
915bool
920
921
922bool
923GNEViewNet::askMergeJunctions(const GNEJunction* movedJunction, const GNEJunction* targetJunction, bool& alreadyAsked) {
924 if (alreadyAsked) {
925 return false;
927 return true;
928 } else {
929 // open question box
930 const std::string header = TL("Confirm Junction Merger");
931 const std::string body = (TLF("Do you wish to merge junctions '%' and '%'?\n('%' will be eliminated and its roads added to '%')", movedJunction->getMicrosimID(), targetJunction->getMicrosimID(), movedJunction->getMicrosimID(), targetJunction->getMicrosimID()));
932 const FXuint answer = FXMessageBox::question(this, MBOX_YES_NO, header.c_str(), "%s", body.c_str());
933 alreadyAsked = true;
934 if (answer != 1) { //1:yes, 2:no, 4:esc
935 return false;
936 } else {
937 return true;
938 }
939 }
940}
941
942
943bool
944GNEViewNet::aksChangeSupermode(const std::string& operation, Supermode expectedSupermode) {
945 // first check if ignore option is enabled
946 if (OptionsCont::getOptions().getBool("ignore-supermode-question")) {
947 return true;
948 }
949 std::string body;
950 if (expectedSupermode == Supermode::NETWORK) {
951 body = (operation + TL(" requires switch to network mode. Continue?"));
952 } else if (expectedSupermode == Supermode::DEMAND) {
953 body = (operation + TL(" requires switch to demand mode. Continue?"));
954 } else if (expectedSupermode == Supermode::DATA) {
955 body = (operation + TL(" requires switch to data mode. Continue?"));
956 } else {
957 throw ProcessError("invalid expected supermode");
958 }
959 // open question box
960 const auto answer = FXMessageBox::question(myApp, MBOX_YES_NO, TL("Confirm switch mode"), "%s", body.c_str());
961 // restore focus to view net
962 setFocus();
963 // return answer
964 if (answer == MBOX_CLICKED_YES) {
965 myEditModes.setSupermode(expectedSupermode, true);
966 return true;
967 } else {
968 return false;
969 }
970}
971
972
973bool
975 // separate conditions for code legibly
978 return (TLSMode && selectingDetectors);
979}
980
981
982bool
984 // separate conditions for code legibly
986 const bool selectingJunctions = myViewParent->getTLSEditorFrame()->getTLSJunction()->isJoiningJunctions();
987 return (TLSMode && selectingJunctions);
988}
989
990
995
996
1001
1002
1003bool
1005 // Get selected lanes
1006 const auto selectedLanes = myNet->getAttributeCarriers()->getSelectedLanes();
1007 // Declare map of edges and lanes
1008 std::map<GNEEdge*, GNELane*> mapOfEdgesAndLanes;
1009 // Iterate over selected lanes
1010 for (const auto& selectedLane : selectedLanes) {
1011 mapOfEdgesAndLanes[myNet->getAttributeCarriers()->retrieveEdge(selectedLane->getParentEdge()->getID())] = selectedLane;
1012 }
1013 // Throw warning dialog if there hare multiple lanes selected in the same edge
1014 if (mapOfEdgesAndLanes.size() != selectedLanes.size()) {
1015 const std::string header = TL("Multiple lane in the same edge selected");
1016 const std::string bodyA = TL("There are selected lanes that belong to the same edge.");
1017 const std::string bodyB = TLF("Only one lane per edge will be restricted to %.", toString(vclass));
1018 FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", (bodyA + std::string("\n") + bodyB).c_str());
1019 }
1020 // If we handeln a set of lanes
1021 if (mapOfEdgesAndLanes.size() > 0) {
1022 // declare counter for number of Sidewalks
1023 int counter = 0;
1024 // iterate over selected lanes
1025 for (const auto& edgeLane : mapOfEdgesAndLanes) {
1026 if (edgeLane.first->hasRestrictedLane(vclass)) {
1027 counter++;
1028 }
1029 }
1030 // if all edges parent own a Sidewalk, stop function
1031 if (counter == (int)mapOfEdgesAndLanes.size()) {
1032 const std::string header = TLF("Set vclass to % for selected lanes", toString(vclass));
1033 const std::string body = TL("All lanes own already another lane in the same edge with a restriction for ");
1034 FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", (body + toString(vclass) + ".").c_str());
1035 return 0;
1036 } else {
1037 // Ask confirmation to user
1038 const std::string header = TLF("Set vclass to % for selected lanes", toString(vclass));
1039 const std::string body = TLF("% lanes will be restricted to %. Continue?", toString(mapOfEdgesAndLanes.size() - counter), toString(vclass));
1040 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str());
1041 if (answer != 1) { //1:yes, 2:no, 4:esc
1042 return 0;
1043 }
1044 }
1045 // begin undo operation
1046 myUndoList->begin(lane, "restrict lanes to " + toString(vclass));
1047 // iterate over selected lanes
1048 for (const auto& edgeLane : mapOfEdgesAndLanes) {
1049 // Transform lane to Sidewalk
1050 myNet->restrictLane(vclass, edgeLane.second, myUndoList);
1051 }
1052 // end undo operation
1053 myUndoList->end();
1054 } else {
1055 // If only have a single lane, start undo/redo operation
1056 myUndoList->begin(lane, TL("restrict lane to ") + toString(vclass));
1057 // Transform lane to Sidewalk
1058 myNet->restrictLane(vclass, lane, myUndoList);
1059 // end undo operation
1060 myUndoList->end();
1061 }
1062 return 1;
1063}
1064
1065
1066bool
1067GNEViewNet::addRestrictedLane(GNELane* lane, SUMOVehicleClass vclass, const bool insertAtFront) {
1068 // Get selected edges
1069 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
1070 // get selected lanes
1071 const auto selectedLanes = myNet->getAttributeCarriers()->getSelectedLanes();
1072 // Declare set of edges
1073 std::set<GNEEdge*> setOfEdges;
1074 // Fill set of edges with vector of edges
1075 for (const auto& edge : selectedEdges) {
1076 setOfEdges.insert(edge);
1077 }
1078 // iterate over selected lanes
1079 for (const auto& selectedLane : selectedLanes) {
1080 // Insert pointer to edge into set of edges (To avoid duplicates)
1081 setOfEdges.insert(myNet->getAttributeCarriers()->retrieveEdge(selectedLane->getParentEdge()->getID()));
1082 }
1083 // If we handeln a set of edges
1085 // declare counter for number of restrictions
1086 int counter = 0;
1087 // iterate over set of edges
1088 for (const auto& edge : setOfEdges) {
1089 // update counter if edge has already a restricted lane of type "vclass"
1090 if (edge->hasRestrictedLane(vclass)) {
1091 counter++;
1092 }
1093 }
1094 // if all lanes own a Sidewalk, stop function
1095 if (counter == (int)setOfEdges.size()) {
1096 const std::string header = TLF("Add vclass % to selected lanes", toString(vclass));
1097 const std::string body = TLF("All lanes own already another lane in the same edge with a restriction to %.", toString(vclass));
1098 FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", body.c_str());
1099 return 0;
1100 } else {
1101 // Ask confirmation to user
1102 const std::string header = TLF("Add vclass % to selected lanes", toString(vclass));
1103 const std::string body = TLF("% restrictions to % will be added. Continue?", toString(setOfEdges.size() - counter), toString(vclass));
1104 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str());
1105 if (answer != 1) { //1:yes, 2:no, 4:esc
1106 return 0;
1107 }
1108 }
1109 // begin undo operation
1110 myUndoList->begin(lane, TL("add restrictions for ") + toString(vclass));
1111 // iterate over set of edges
1112 for (const auto& edge : setOfEdges) {
1113 // add restricted lane (guess target)
1114 myNet->addRestrictedLane(vclass, edge, -1, myUndoList);
1115 }
1116 // end undo operation
1117 myUndoList->end();
1118 } else {
1119 // If only have a single lane, start undo/redo operation
1120 myUndoList->begin(lane, TL("add vclass for ") + toString(vclass));
1121 // Add restricted lane
1122 if (vclass == SVC_PEDESTRIAN) {
1123 // always add pedestrian lanes on the right
1124 myNet->addRestrictedLane(vclass, lane->getParentEdge(), 0, myUndoList);
1125 } else if (vclass == SVC_IGNORING) {
1126 if (insertAtFront) {
1128 } else {
1130 }
1131 } else if (lane->getParentEdge()->getChildLanes().size() == 1) {
1132 // guess insertion position if there is only 1 lane
1133 myNet->addRestrictedLane(vclass, lane->getParentEdge(), -1, myUndoList);
1134 } else {
1135 myNet->addRestrictedLane(vclass, lane->getParentEdge(), lane->getIndex(), myUndoList);
1136 }
1137 // end undo/redo operation
1138 myUndoList->end();
1139 }
1140 return 1;
1141}
1142
1143
1144bool
1146 // Get selected edges
1147 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
1148 // get selected lanes
1149 const auto selectedLanes = myNet->getAttributeCarriers()->getSelectedLanes();
1150 // Declare set of edges
1151 std::set<GNEEdge*> setOfEdges;
1152 // Fill set of edges with vector of edges
1153 for (const auto& edge : selectedEdges) {
1154 setOfEdges.insert(edge);
1155 }
1156 // iterate over selected lanes
1157 for (const auto& selectedLane : selectedLanes) {
1158 // Insert pointer to edge into set of edges (To avoid duplicates)
1159 setOfEdges.insert(myNet->getAttributeCarriers()->retrieveEdge(selectedLane->getParentEdge()->getID()));
1160 }
1161 // If we handeln a set of edges
1162 if (setOfEdges.size() > 0) {
1163 // declare counter for number of restrictions
1164 int counter = 0;
1165 // iterate over set of edges
1166 for (const auto& edge : setOfEdges) {
1167 // update counter if edge has already a restricted lane of type "vclass"
1168 if (edge->hasRestrictedLane(vclass)) {
1169 counter++;
1170 }
1171 }
1172 // if all lanes don't own a Sidewalk, stop function
1173 if (counter == 0) {
1174 const std::string header = TLF("Remove vclass % from selected lanes", toString(vclass));
1175 const std::string body = TLF("The selected lanes and edges don't have a restriction to %.", toString(vclass));
1176 FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", body.c_str());
1177 return 0;
1178 } else {
1179 // Ask confirmation to user
1180 const std::string header = TLF("Remove vclass % from selected lanes", toString(vclass));
1181 const std::string body = TLF("% restrictions to % will be removed. Continue?", toString(setOfEdges.size() - counter), toString(vclass));
1182 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str());
1183 if (answer != 1) { //1:yes, 2:no, 4:esc
1184 return 0;
1185 }
1186 }
1187 // begin undo operation
1188 myUndoList->begin(lane, "Remove restrictions for " + toString(vclass));
1189 // iterate over set of edges
1190 for (const auto& edge : setOfEdges) {
1191 // add Sidewalk
1192 myNet->removeRestrictedLane(vclass, edge, myUndoList);
1193 }
1194 // end undo operation
1195 myUndoList->end();
1196 } else {
1197 // If only have a single lane, start undo/redo operation
1198 myUndoList->begin(lane, TL("Remove vclass for ") + toString(vclass));
1199 // Remove Sidewalk
1201 // end undo/redo operation
1202 myUndoList->end();
1203 }
1204 return 1;
1205}
1206
1207
1208#ifdef _MSC_VER
1209#pragma warning(push)
1210#pragma warning(disable: 4355) // mask warning about "this" in initializers
1211#endif
1213 myViewObjectsSelector(this),
1214 myEditModes(this),
1215 myTestingMode(this),
1216 myCommonCheckableButtons(this),
1217 myNetworkCheckableButtons(this),
1218 myDemandCheckableButtons(this),
1219 myDataCheckableButtons(this),
1220 myNetworkViewOptions(this),
1221 myDemandViewOptions(this),
1222 myDataViewOptions(this),
1223 myIntervalBar(this),
1224 myMoveSingleElement(this),
1225 myMoveMultipleElements(this),
1226 myVehicleOptions(this),
1227 myVehicleTypeOptions(this),
1228 mySaveElements(this),
1229 myTimeFormat(this),
1230 mySelectingArea(this),
1231 myEditNetworkElementShapes(this),
1232 myLockManager(this) {
1233}
1234#ifdef _MSC_VER
1235#pragma warning(pop)
1236#endif
1237
1238
1239std::vector<std::string>
1241 std::set<std::string> keys;
1242 for (const NBEdge* e : myNet->getEdgeCont().getAllEdges()) {
1243 if (edgeKeys) {
1244 for (const auto& item : e->getParametersMap()) {
1245 keys.insert(item.first);
1246 }
1247 for (const auto& con : e->getConnections()) {
1248 for (const auto& item : con.getParametersMap()) {
1249 keys.insert(item.first);
1250 }
1251 }
1252 } else {
1253 for (const auto& lane : e->getLanes()) {
1254 int i = 0;
1255 for (const auto& item : lane.getParametersMap()) {
1256 keys.insert(item.first);
1257 }
1258 for (const auto& con : e->getConnectionsFromLane(i)) {
1259 for (const auto& item : con.getParametersMap()) {
1260 keys.insert(item.first);
1261 }
1262 }
1263 i++;
1264 }
1265 }
1266 }
1267 return std::vector<std::string>(keys.begin(), keys.end());
1268}
1269
1270
1271std::vector<std::string>
1273 std::set<std::string> keys;
1274 for (const auto& genericData : myNet->getAttributeCarriers()->getGenericDatas().at(GNE_TAG_EDGEREL_SINGLE)) {
1275 for (const auto& parameter : genericData.second->getACParametersMap()) {
1276 keys.insert(parameter.first);
1277 }
1278 }
1279 return std::vector<std::string>(keys.begin(), keys.end());
1280}
1281
1282
1283std::vector<std::string>
1285 std::set<std::string> keys;
1286 for (const auto& genericData : myNet->getAttributeCarriers()->getGenericDatas().at(SUMO_TAG_TAZREL)) {
1287 for (const auto& parameter : genericData.second->getACParametersMap()) {
1288 keys.insert(parameter.first);
1289 }
1290 }
1291 for (const auto& genericData : myNet->getAttributeCarriers()->getGenericDatas().at(SUMO_TAG_EDGEREL)) {
1292 for (const auto& parameter : genericData.second->getACParametersMap()) {
1293 keys.insert(parameter.first);
1294 }
1295 }
1296 return std::vector<std::string>(keys.begin(), keys.end());
1297}
1298
1299
1300bool
1304 return true;
1305 } else {
1306 return false;
1307 }
1308}
1309
1310
1311int
1315
1316
1317int
1318GNEViewNet::doPaintGL(int mode, const Boundary& drawingBoundary) {
1319 // set lefthand and laneIcons
1322 // first step: update objects under cursor
1324 // second step: redraw contour of path elements (needed if we're inspecting a path element like a route or trip)
1326 // set render modes
1327 glRenderMode(mode);
1328 glMatrixMode(GL_MODELVIEW);
1330 glDisable(GL_TEXTURE_2D);
1331 glDisable(GL_ALPHA_TEST);
1332 glEnable(GL_BLEND);
1333 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1334 glEnable(GL_DEPTH_TEST);
1335 // visualize rectangular selection
1337 // draw decals
1338 drawDecals();
1339 // draw grid (and update grid button)
1340 drawGrid();
1341 // update show connections
1343 // draw temporal junction
1345 // draw temporal drawing shape
1347 // draw testing elements
1349 // draw temporal E2 multilane detectors
1351 // draw temporal overhead wires
1353 // draw temporal trip/flow route
1355 // draw temporal person plan route
1358 // draw temporal container plan route
1361 // draw temporal route
1363 // draw temporal edgeRelPath
1365 // check menu checks of supermode demand
1367 // enable or disable menuCheckShowAllPersonPlans depending of there is a locked person
1370 } else {
1372 }
1373 }
1374 // clear pathDraw
1378 // update ignore hide by zoom
1380 // draw network (boundary
1382 // draw all GL elements
1383 int hits = drawGLElements(drawingBoundary);
1384 // after drawing all elements, update list of merged junctions
1386 // draw temporal split junction
1388 // draw temporal roundabout
1390 // draw temporal lines between E1 detectors and junctions in TLS Mode
1392 // draw temporal lines between junctions in TLS Mode
1394 // draw netedit attributes references
1396 // draw test circle
1398 // pop draw matrix
1400 // update interval bar
1402 // check if recopute boundaries (Deactivated, continue after 1.14 release)
1403 /*
1404 if (gObjectsInPosition.recomputeBoundaries != GLO_NETWORK) {
1405 myNet->getGrid().updateBoundaries(gObjectsInPosition.recomputeBoundaries);
1406 }
1407 */
1408 return hits;
1409}
1410
1411
1412long
1413GNEViewNet::onLeftBtnPress(FXObject* obj, FXSelector, void* eventData) {
1414 // check if we're in test mode
1416 // set focus in view net
1417 setFocus();
1418 // update MouseButtonKeyPressed
1420 // process left button press function depending of supermode
1425 } else if (myEditModes.isCurrentSupermodeData()) {
1426 processLeftButtonPressData(eventData);
1427 }
1428 // update cursor
1429 updateCursor();
1430 // update view
1431 updateViewNet();
1432 return 1;
1433 } else {
1434 return 0;
1435 }
1436}
1437
1438
1439long
1440GNEViewNet::onLeftBtnRelease(FXObject* obj, FXSelector sel, void* eventData) {
1441 // check if we're in test mode
1443 // avoid closing Popup dialog in Linux
1444 if (myCreatedPopup) {
1445 myCreatedPopup = false;
1446 return 1;
1447 }
1448 // process parent function
1449 GUISUMOAbstractView::onLeftBtnRelease(obj, sel, eventData);
1450 // update MouseButtonKeyPressed
1452 // process left button release function depending of supermode
1457 } else if (myEditModes.isCurrentSupermodeData()) {
1459 }
1460 // update cursor
1461 updateCursor();
1462 // update view
1463 updateViewNet();
1464 return 1;
1465 } else {
1466 return 0;
1467 }
1468}
1469
1470
1471long
1472GNEViewNet::onMiddleBtnPress(FXObject* obj, FXSelector sel, void* eventData) {
1473 // check if we're in test mode
1475 // process parent function
1476 GUISUMOAbstractView::onMiddleBtnPress(obj, sel, eventData);
1477 // update cursor
1478 updateCursor();
1479 // update view
1480 updateViewNet();
1481 return 1;
1482 } else {
1483 return 0;
1484 }
1485}
1486
1487
1488long
1489GNEViewNet::onMiddleBtnRelease(FXObject* obj, FXSelector sel, void* eventData) {
1490 // check if we're in test mode
1492 // process parent function
1493 GUISUMOAbstractView::onMiddleBtnRelease(obj, sel, eventData);
1494 // update cursor
1495 updateCursor();
1496 // update view
1497 updateViewNet();
1498 return 1;
1499 } else {
1500 return 0;
1501 }
1502}
1503
1504
1505long
1506GNEViewNet::onRightBtnPress(FXObject* obj, FXSelector sel, void* eventData) {
1507 // check if we're in test mode
1509 // update MouseButtonKeyPressed
1511 // update cursor
1512 updateCursor();
1514 // disable right button press during drawing polygon
1515 return 1;
1516 } else {
1517 return GUISUMOAbstractView::onRightBtnPress(obj, sel, eventData);
1518 }
1519 } else {
1520 return 0;
1521 }
1522}
1523
1524
1525long
1526GNEViewNet::onRightBtnRelease(FXObject* obj, FXSelector sel, void* eventData) {
1527 // check if we're in test mode
1529 // update MouseButtonKeyPressed
1531 // update cursor
1532 updateCursor();
1533 // disable right button release during drawing polygon
1535 return 1;
1536 } else {
1537 return GUISUMOAbstractView::onRightBtnRelease(obj, sel, eventData);
1538 }
1539 } else {
1540 return 0;
1541 }
1542}
1543
1544
1545long
1546GNEViewNet::onMouseMove(FXObject* obj, FXSelector sel, void* eventData) {
1547 // check if we're in test mode
1549 // process mouse move in GUISUMOAbstractView
1550 GUISUMOAbstractView::onMouseMove(obj, sel, eventData);
1551 // update MouseButtonKeyPressed
1553 // update cursor
1554 updateCursor();
1555 // process mouse move function depending of supermode
1560 } else if (myEditModes.isCurrentSupermodeData()) {
1562 }
1563 // update view
1564 updateViewNet();
1565 return 1;
1566 } else {
1567 return 0;
1568 }
1569}
1570
1571
1572long
1573GNEViewNet::onKeyPress(FXObject* obj, FXSelector sel, void* eventData) {
1574 // check if we're in test mode
1576 // update MouseButtonKeyPressed
1578 // update cursor
1579 updateCursor();
1580 // continue depending of current edit mode
1582 // update viewNet (for temporal junction)
1583 updateViewNet();
1585 // change "delete last created point" depending of shift key
1588 // change "delete last created point" depending of shift key
1591 updateViewNet();
1592 }
1593 return GUISUMOAbstractView::onKeyPress(obj, sel, eventData);
1594 } else {
1595 return 0;
1596 }
1597}
1598
1599
1600long
1601GNEViewNet::onKeyRelease(FXObject* obj, FXSelector sel, void* eventData) {
1602 // check if we're in test mode
1604 // update MouseButtonKeyPressed
1606 // update cursor
1607 updateCursor();
1608 // continue depending of current edit mode
1610 // update viewNet (for temporal junction)
1611 updateViewNet();
1613 // change "delete last created point" depending of shift key
1616 // change "delete last created point" depending of shift key
1619 updateViewNet();
1620 }
1621 // check if selecting using rectangle has to be disabled
1624 updateViewNet();
1625 }
1626 return GUISUMOAbstractView::onKeyRelease(obj, sel, eventData);
1627 } else {
1628 return 0;
1629 }
1630}
1631
1632
1633void
1634GNEViewNet::abortOperation(bool clearSelection) {
1635 // steal focus from any text fields and place it over view net
1636 setFocus();
1637 // check what supermode is enabled
1639 // abort operation depending of current mode
1641 // abort edge creation in create edge frame
1645 // check if current selection has to be cleaned
1646 if (clearSelection) {
1648 }
1650 // abort changes in Connector Frame
1653 // continue depending of current TLS frame state
1658 } else {
1660 }
1666 // abort current drawing
1670 // abort current drawing
1672 } else if (myViewParent->getTAZFrame()->getCurrentTAZModule()->getTAZ() != nullptr) {
1673 // finish current editing TAZ
1675 }
1679 // clear view selection
1681 // abort path
1684 // abort path
1686 }
1688 // abort operation depending of current mode
1691 // check if current selection has to be cleaned
1692 if (clearSelection) {
1694 }
1707 }
1708 } else if (myEditModes.isCurrentSupermodeData()) {
1709 // abort operation depending of current mode
1712 // check if current selection has to be cleaned
1713 if (clearSelection) {
1715 }
1720 }
1721 }
1722 // abort undo list
1724 // update view
1725 updateViewNet();
1726}
1727
1728
1729void
1731 // delete elements depending of current supermode
1734 setStatusBarText(TL("Cannot delete in this mode"));
1736 // delete inspected elements
1737 myUndoList->begin(GUIIcon::MODEDELETE, TL("delete network inspected elements"));
1740 }
1741 myUndoList->end();
1742 } else {
1743 // get selected ACs
1744 const auto selectedNetworkACs = myNet->getAttributeCarriers()->getSelectedAttributeCarriers(false);
1745 // delete selected elements
1746 if (selectedNetworkACs.size() > 0) {
1747 myUndoList->begin(GUIIcon::MODEDELETE, TL("delete network selection"));
1748 for (const auto selectedAC : selectedNetworkACs) {
1750 }
1751 myUndoList->end();
1752 }
1753 }
1756 // delete inspected elements
1757 myUndoList->begin(GUIIcon::MODEDELETE, TL("delete demand inspected elements"));
1760 }
1761 myUndoList->end();
1762 } else {
1763 // get selected ACs
1764 const auto selectedDemandACs = myNet->getAttributeCarriers()->getSelectedAttributeCarriers(false);
1765 // delete selected elements
1766 if (selectedDemandACs.size() > 0) {
1767 myUndoList->begin(GUIIcon::MODEDELETE, TL("delete demand selection"));
1768 for (const auto selectedAC : selectedDemandACs) {
1769 deleteDemandAttributeCarrier(selectedAC);
1770 }
1771 myUndoList->end();
1772 }
1773 }
1774 } else if (myEditModes.isCurrentSupermodeData()) {
1776 // delete inspected elements
1777 myUndoList->begin(GUIIcon::MODEDELETE, TL("delete data inspected elements"));
1780 }
1781 myUndoList->end();
1782 } else {
1783 // get selected ACs
1784 const auto selectedDataACs = myNet->getAttributeCarriers()->getSelectedAttributeCarriers(false);
1785 // delete selected elements
1786 if (selectedDataACs.size() > 0) {
1787 myUndoList->begin(GUIIcon::MODEDELETE, TL("delete data selection"));
1788 for (const auto selectedAC : selectedDataACs) {
1789 deleteDataAttributeCarrier(selectedAC);
1790 }
1791 myUndoList->end();
1792 }
1793 }
1794 }
1795}
1796
1797
1798void
1800 // check what supermode is enabled
1802 // abort operation depending of current mode
1804 // Accept changes in Connector Frame
1807 // continue depending of current TLS frame state
1814 }
1819 // stop current drawing
1821 } else {
1822 // start drawing
1824 }
1829 // stop current drawing
1831 } else if (myViewParent->getTAZFrame()->getCurrentTAZModule()->getTAZ() == nullptr) {
1832 // start drawing
1835 // save pending changes
1837 }
1839 // create path element
1842 // create path element
1844 }
1849 myViewParent->getVehicleFrame()->getPathCreator()->onCmdCreatePath(nullptr, 0, nullptr);
1851 myViewParent->getPersonFrame()->getPlanCreator()->onCmdCreatePath(nullptr, 0, nullptr);
1858 }
1859 } else if (myEditModes.isCurrentSupermodeData()) {
1864 }
1865 }
1866}
1867
1868
1869void
1871 // check what supermode is enabled
1875 }
1889 }
1890 } else if (myEditModes.isCurrentSupermodeData()) {
1893 }
1894 }
1895}
1896
1897void
1899 // if there is a visible frame, set focus over it. In other case, set focus over ViewNet
1900 if (myCurrentFrame != nullptr) {
1902 } else {
1903 setFocus();
1904 }
1905}
1906
1907
1910 return myViewParent;
1911}
1912
1913
1914GNENet*
1916 return myNet;
1917}
1918
1919
1922 return myUndoList;
1923}
1924
1925
1930
1931
1936
1937
1942
1943
1948
1949
1950bool
1954
1955
1956bool
1957GNEViewNet::checkOverLockedElement(const GUIGlObject* GLObject, const bool isSelected) const {
1958 // check if elemet is blocked
1959 if (myLockManager.isObjectLocked(GLObject->getType(), isSelected)) {
1960 return false;
1961 }
1962 // get front GLObject
1963 const auto glObjectFront = myViewObjectsSelector.getGUIGlObjectFront();
1964 // check if element is under cursor
1965 if (glObjectFront) {
1966 if (glObjectFront == GLObject) {
1967 return true;
1968 } else if (glObjectFront->getType() == GLObject->getType()) {
1969 for (const auto& glObjectUnderCursor : myViewObjectsSelector.getGLObjects()) {
1970 if (glObjectUnderCursor == GLObject) {
1971 return true;
1972 }
1973 }
1974 }
1975 }
1976 return false;
1977}
1978
1979
1984
1985
1986void
1988 myLastCreatedRoute = lastCreatedRoute;
1989}
1990
1991
1994 // get first object that can be found in their container
1995 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
1996 for (const auto& glObject : glObjectLayer.second) {
1997 auto junction = myNet->getAttributeCarriers()->retrieveJunction(glObject.object->getMicrosimID(), false);
1998 if (junction) {
1999 return junction;
2000 }
2001 }
2002 }
2003 return nullptr;
2004}
2005
2006
2009 // get first object that can be found in their container
2010 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2011 for (const auto& glObject : glObjectLayer.second) {
2012 auto connection = myNet->getAttributeCarriers()->retrieveConnection(glObject.object, false);
2013 if (connection) {
2014 return connection;
2015 }
2016 }
2017 }
2018 return nullptr;
2019}
2020
2021
2024 // get first object that can be found in their container
2025 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2026 for (const auto& glObject : glObjectLayer.second) {
2027 auto crossing = myNet->getAttributeCarriers()->retrieveCrossing(glObject.object, false);
2028 if (crossing) {
2029 return crossing;
2030 }
2031 }
2032 }
2033 return nullptr;
2034}
2035
2036
2039 // get first object that can be found in their container
2040 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2041 for (const auto& glObject : glObjectLayer.second) {
2042 auto walkingArea = myNet->getAttributeCarriers()->retrieveWalkingArea(glObject.object, false);
2043 if (walkingArea) {
2044 return walkingArea;
2045 }
2046 }
2047 }
2048 return nullptr;
2049}
2050
2051
2052GNEEdge*
2054 // get first object that can be found in their container
2055 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2056 for (const auto& glObject : glObjectLayer.second) {
2057 auto edge = myNet->getAttributeCarriers()->retrieveEdge(glObject.object->getMicrosimID(), false);
2058 if (edge) {
2059 return edge;
2060 }
2061 }
2062 }
2063 return nullptr;
2064}
2065
2066
2067GNELane*
2069 // get first object that can be found in their container
2070 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2071 for (const auto& glObject : glObjectLayer.second) {
2072 auto lane = myNet->getAttributeCarriers()->retrieveLane(glObject.object, false);
2073 if (lane) {
2074 return lane;
2075 }
2076 }
2077 }
2078 return nullptr;
2079}
2080
2081
2084 // get first object that can be found in their container
2085 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2086 for (const auto& glObject : glObjectLayer.second) {
2087 auto additionalElement = myNet->getAttributeCarriers()->retrieveAdditional(glObject.object, false);
2088 if (additionalElement) {
2089 return additionalElement;
2090 }
2091 }
2092 }
2093 return nullptr;
2094}
2095
2096
2099 // get first object that can be found in their container
2100 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2101 for (const auto& glObject : glObjectLayer.second) {
2102 auto demandElement = myNet->getAttributeCarriers()->retrieveDemandElement(glObject.object, false);
2103 if (demandElement) {
2104 return demandElement;
2105 }
2106 }
2107 }
2108 return nullptr;
2109}
2110
2111
2112GNEPoly*
2114 // get first object that can be parsed to poly element
2115 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2116 for (const auto& glObject : glObjectLayer.second) {
2117 auto polygon = dynamic_cast<GNEPoly*>(myNet->getAttributeCarriers()->retrieveAdditional(glObject.object, false));
2118 if (polygon) {
2119 return polygon;
2120 }
2121 }
2122 }
2123 return nullptr;
2124}
2125
2126
2127GNEPOI*
2129 // get first object that can be parsed to POI element
2130 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2131 for (const auto& glObject : glObjectLayer.second) {
2132 auto POI = dynamic_cast<GNEPOI*>(myNet->getAttributeCarriers()->retrieveAdditional(glObject.object, false));
2133 if (POI) {
2134 return POI;
2135 }
2136 }
2137 }
2138 return nullptr;
2139}
2140
2141
2142GNETAZ*
2144 // get first object that can be parsed to TAZ element
2145 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2146 for (const auto& glObject : glObjectLayer.second) {
2147 auto TAZ = dynamic_cast<GNETAZ*>(myNet->getAttributeCarriers()->retrieveAdditional(glObject.object, false));
2148 if (TAZ) {
2149 return TAZ;
2150 }
2151 }
2152 }
2153 return nullptr;
2154}
2155
2156
2159 // get first object that can be parsed to TAZ element
2160 for (const auto& glObjectLayer : gViewObjectsHandler.getSelectedObjects()) {
2161 for (const auto& glObject : glObjectLayer.second) {
2162 if (glObject.object->getType() == GLO_JUNCTION) {
2163 auto junction = myNet->getAttributeCarriers()->retrieveJunction(glObject.object->getMicrosimID());
2164 if (junction->isShapeEdited()) {
2165 return junction;
2166 }
2167 } else if (glObject.object->getType() == GLO_CROSSING) {
2168 auto crossing = myNet->getAttributeCarriers()->retrieveCrossing(glObject.object);
2169 if (crossing->isShapeEdited()) {
2170 return crossing;
2171 }
2172 } else if (glObject.object->getType() == GLO_CONNECTION) {
2173 auto connection = myNet->getAttributeCarriers()->retrieveConnection(glObject.object);
2174 if (connection->isShapeEdited()) {
2175 return connection;
2176 }
2177 }
2178 }
2179 }
2180 return nullptr;
2181}
2182
2183
2184long
2185GNEViewNet::onCmdSetSupermode(FXObject*, FXSelector sel, void*) {
2186 // check what network mode will be set
2187 switch (FXSELID(sel)) {
2189 if (myEditModes.networkButton->shown()) {
2191 }
2192 break;
2194 if (myEditModes.demandButton->shown()) {
2196 }
2197 break;
2199 if (myEditModes.dataButton->shown()) {
2201 }
2202 break;
2203 default:
2204 break;
2205 }
2206 return 1;
2207}
2208
2209
2210long
2211GNEViewNet::onCmdSetMode(FXObject*, FXSelector sel, void*) {
2212 // first filter modes depending of view
2214 // network
2216 switch (FXSELID(sel)) {
2217 // common
2221 // infrastructure
2226 // shapes
2229 break;
2230 default:
2231 return 0;
2232 }
2233 }
2234 // demand
2236 switch (FXSELID(sel)) {
2237 // common
2241 // persons
2244 // routes
2247 // types
2250 break;
2251 default:
2252 return 0;
2253 }
2254 }
2255 // data
2257 // all modes disabled
2258 return 0;
2259 }
2260 }
2261 // continue depending of supermode
2263 // check what network mode will be set
2264 switch (FXSELID(sel)) {
2267 break;
2270 break;
2273 break;
2276 break;
2279 break;
2282 break;
2285 break;
2288 break;
2291 break;
2294 break;
2297 break;
2300 break;
2303 break;
2306 break;
2307 default:
2308 break;
2309 }
2311 // check what demand mode will be set
2312 switch (FXSELID(sel)) {
2315 break;
2318 break;
2321 break;
2324 break;
2327 break;
2330 break;
2333 break;
2336 break;
2339 break;
2342 break;
2345 break;
2348 break;
2351 break;
2354 break;
2355 default:
2356 break;
2357 }
2358 } else if (myEditModes.isCurrentSupermodeData()) {
2359 // check what demand mode will be set
2360 switch (FXSELID(sel)) {
2363 break;
2366 break;
2369 break;
2372 break;
2375 break;
2378 break;
2381 break;
2382 default:
2383 break;
2384 }
2385 }
2386 return 1;
2387}
2388
2389
2390long
2391GNEViewNet::onCmdSplitEdge(FXObject*, FXSelector, void*) {
2393 if (edge != nullptr) {
2395 }
2396 return 1;
2397}
2398
2399
2400long
2401GNEViewNet::onCmdSplitEdgeBidi(FXObject*, FXSelector, void*) {
2403 if (edge != nullptr) {
2404 // obtain reverse edge
2405 const auto oppositeEdges = edge->getOppositeEdges();
2406 // check that reverse edge works
2407 if (oppositeEdges.size() > 0) {
2408 for (const auto& oppositeEdge : oppositeEdges) {
2409 // get reverse inner geometry
2410 const auto reverseGeometry = oppositeEdge->getNBEdge()->getInnerGeometry().reverse();
2411 if (reverseGeometry == edge->getNBEdge()->getInnerGeometry()) {
2412 myNet->splitEdgesBidi(edge, oppositeEdge, edge->getSplitPos(getPopupPosition()), myUndoList);
2413 return 1;
2414 }
2415 }
2416 }
2417 }
2418 return 1;
2419}
2420
2421
2422long
2423GNEViewNet::onCmdReverseEdge(FXObject*, FXSelector, void*) {
2425 if (edge != nullptr) {
2426 if (edge->isAttributeCarrierSelected()) {
2427 myUndoList->begin(edge, TL("Reverse selected edges"));
2428 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2429 for (const auto& selectedEdge : selectedEdges) {
2430 myNet->reverseEdge(selectedEdge, myUndoList);
2431 }
2432 myUndoList->end();
2433 } else {
2434 myUndoList->begin(edge, TL("Reverse edge"));
2436 myUndoList->end();
2437 }
2438 }
2439 return 1;
2440}
2441
2442
2443long
2444GNEViewNet::onCmdAddReversedEdge(FXObject*, FXSelector, void*) {
2446 if (edge != nullptr) {
2447 if (edge->isAttributeCarrierSelected()) {
2448 myUndoList->begin(edge, TL("Add Reverse edge for selected edges"));
2449 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2450 for (const auto& selectedEdge : selectedEdges) {
2451 myNet->addReversedEdge(selectedEdge, false, myUndoList);
2452 }
2453 myUndoList->end();
2454 } else {
2455 myUndoList->begin(edge, TL("Add reverse edge"));
2456 myNet->addReversedEdge(edge, false, myUndoList);
2457 myUndoList->end();
2458 }
2459 }
2460 return 1;
2461}
2462
2463
2464long
2467 if (edge != nullptr) {
2468 if (edge->isAttributeCarrierSelected()) {
2469 myUndoList->begin(edge, TL("Add Reverse disconnected edge for selected edges"));
2470 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2471 for (const auto& selectedEdge : selectedEdges) {
2472 myNet->addReversedEdge(selectedEdge, true, myUndoList);
2473 }
2474 myUndoList->end();
2475 } else {
2476 myUndoList->begin(edge, TL("Add reverse disconnected edge"));
2477 myNet->addReversedEdge(edge, true, myUndoList);
2478 myUndoList->end();
2479 }
2480 }
2481 return 1;
2482}
2483
2484
2485long
2486GNEViewNet::onCmdEditEdgeEndpoint(FXObject*, FXSelector, void*) {
2488 if (edge != nullptr) {
2489 // snap to active grid the Popup position
2491 }
2492 return 1;
2493}
2494
2495
2496long
2497GNEViewNet::onCmdResetEdgeEndpoint(FXObject*, FXSelector, void*) {
2499 if (edge != nullptr) {
2500 // check if edge is selected
2501 if (edge->isAttributeCarrierSelected()) {
2502 // get all selected edges
2503 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2504 // begin operation
2505 myUndoList->begin(edge, TL("reset geometry points"));
2506 // iterate over selected edges
2507 for (const auto& selectedEdge : selectedEdges) {
2508 // reset both end points
2509 selectedEdge->resetBothEndpoint(myUndoList);
2510 }
2511 // end operation
2512 myUndoList->end();
2513 } else {
2515 }
2516 }
2517 return 1;
2518}
2519
2520
2521long
2522GNEViewNet::onCmdStraightenEdges(FXObject*, FXSelector, void*) {
2524 if (edge != nullptr) {
2525 if (edge->isAttributeCarrierSelected()) {
2526 myUndoList->begin(edge, TL("straighten selected edges"));
2527 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2528 for (const auto& selectedEdge : selectedEdges) {
2529 selectedEdge->setAttribute(SUMO_ATTR_SHAPE, "", myUndoList);
2530 }
2531 myUndoList->end();
2532 } else {
2533
2534 myUndoList->begin(edge, TL("straighten edge"));
2536 myUndoList->end();
2537 }
2538 }
2539 return 1;
2540}
2541
2542
2543long
2544GNEViewNet::onCmdSmoothEdges(FXObject*, FXSelector, void*) {
2546 if (edge != nullptr) {
2547 if (edge->isAttributeCarrierSelected()) {
2548 myUndoList->begin(edge, TL("smooth selected edges"));
2549 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2550 for (const auto& selectedEdge : selectedEdges) {
2551 selectedEdge->smooth(myUndoList);
2552 }
2553 myUndoList->end();
2554 } else {
2555 myUndoList->begin(edge, TL("smooth edge"));
2556 edge->smooth(myUndoList);
2557 myUndoList->end();
2558 }
2559 }
2560 return 1;
2561}
2562
2563
2564long
2565GNEViewNet::onCmdStraightenEdgesElevation(FXObject*, FXSelector, void*) {
2567 if (edge != nullptr) {
2568 if (edge->isAttributeCarrierSelected()) {
2569 myUndoList->begin(edge, TL("straighten elevation of selected edges"));
2570 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2571 for (const auto& selectedEdge : selectedEdges) {
2572 selectedEdge->straightenElevation(myUndoList);
2573 }
2574 myUndoList->end();
2575 } else {
2576 myUndoList->begin(edge, TL("straighten edge elevation"));
2578 myUndoList->end();
2579 }
2580 }
2581 return 1;
2582}
2583
2584
2585long
2586GNEViewNet::onCmdSmoothEdgesElevation(FXObject*, FXSelector, void*) {
2588 if (edge != nullptr) {
2589 if (edge->isAttributeCarrierSelected()) {
2590 myUndoList->begin(edge, TL("smooth elevation of selected edges"));
2591 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2592 for (const auto& selectedEdge : selectedEdges) {
2593 selectedEdge->smoothElevation(myUndoList);
2594 }
2595 myUndoList->end();
2596 } else {
2597 myUndoList->begin(edge, TL("smooth edge elevation"));
2599 myUndoList->end();
2600 }
2601 }
2602 return 1;
2603}
2604
2605
2606long
2607GNEViewNet::onCmdResetLength(FXObject*, FXSelector, void*) {
2609 if (edge != nullptr) {
2610 if (edge->isAttributeCarrierSelected()) {
2611 myUndoList->begin(edge, TL("reset edge lengths"));
2612 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
2613 for (const auto& selectedEdge : selectedEdges) {
2614 selectedEdge->setAttribute(SUMO_ATTR_LENGTH, "-1", myUndoList);
2615 }
2616 myUndoList->end();
2617 } else {
2619 }
2620 }
2621 return 1;
2622}
2623
2624
2625long
2626GNEViewNet::onCmdEdgeUseAsTemplate(FXObject*, FXSelector, void*) {
2628 if (edge != nullptr) {
2630 }
2631 return 1;
2632}
2633
2634
2635long
2636GNEViewNet::onCmdEgeApplyTemplate(FXObject*, FXSelector, void*) {
2637 GNEEdge* edgeAtPosition = getEdgeAtPopupPosition();
2638 if ((edgeAtPosition != nullptr) && myViewParent->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate()) {
2639 // begin copy template
2640 myUndoList->begin(edgeAtPosition, TL("copy edge template"));
2641 if (edgeAtPosition->isAttributeCarrierSelected()) {
2642 // copy template in all selected edges
2643 for (const auto& edge : myNet->getAttributeCarriers()->getEdges()) {
2644 if (edge.second->isAttributeCarrierSelected()) {
2645 edge.second->copyTemplate(myViewParent->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate(), myUndoList);
2646 }
2647 }
2648 } else {
2649 // copy template
2651 }
2652 // end copy template
2653 myUndoList->end();
2654 }
2655 return 1;
2656}
2657
2658
2659long
2660GNEViewNet::onCmdSimplifyShape(FXObject*, FXSelector, void*) {
2661 // get polygon under mouse
2662 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2663 // check polygon
2664 if (polygonUnderMouse) {
2665 // check if shape is selected
2666 if (polygonUnderMouse->isAttributeCarrierSelected()) {
2667 // begin undo-list
2668 myNet->getViewNet()->getUndoList()->begin(polygonUnderMouse, TL("simplify shapes"));
2669 // get shapes
2670 const auto selectedShapes = myNet->getAttributeCarriers()->getSelectedShapes();
2671 // iterate over shapes
2672 for (const auto& selectedShape : selectedShapes) {
2673 // check if shape is a poly
2674 if ((selectedShape->getTagProperty()->getTag() == SUMO_TAG_POLY) ||
2675 (selectedShape->getTagProperty()->getTag() == GNE_TAG_JPS_WALKABLEAREA) ||
2676 (selectedShape->getTagProperty()->getTag() == GNE_TAG_JPS_OBSTACLE)) {
2677 // simplify shape
2678 dynamic_cast<GNEPoly*>(selectedShape)->simplifyShape();
2679 }
2680 }
2681 // end undo-list
2683 } else {
2684 polygonUnderMouse->simplifyShape();
2685 }
2686 }
2687 return 1;
2688}
2689
2690
2691long
2692GNEViewNet::onCmdDeleteGeometryPoint(FXObject*, FXSelector, void*) {
2693 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2694 if (polygonUnderMouse) {
2695 polygonUnderMouse->deleteGeometryPoint(getPopupPosition());
2696 }
2697 return 1;
2698}
2699
2700
2701long
2702GNEViewNet::onCmdClosePolygon(FXObject*, FXSelector, void*) {
2703 // get polygon under mouse
2704 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2705 // check polygon
2706 if (polygonUnderMouse) {
2707 // check if shape is selected
2708 if (polygonUnderMouse->isAttributeCarrierSelected()) {
2709 // begin undo-list
2710 myNet->getViewNet()->getUndoList()->begin(polygonUnderMouse, TL("close polygon shapes"));
2711 // get selectedshapes
2712 const auto selectedShapes = myNet->getAttributeCarriers()->getSelectedShapes();
2713 // iterate over shapes
2714 for (const auto& selectedShape : selectedShapes) {
2715 // check if shape is a poly
2716 if ((selectedShape->getTagProperty()->getTag() == SUMO_TAG_POLY) ||
2717 (selectedShape->getTagProperty()->getTag() == GNE_TAG_JPS_WALKABLEAREA) ||
2718 (selectedShape->getTagProperty()->getTag() == GNE_TAG_JPS_OBSTACLE)) {
2719 // close polygon
2720 dynamic_cast<GNEPoly*>(selectedShape)->closePolygon();
2721 }
2722 }
2723 // end undo-list
2725 } else {
2726 polygonUnderMouse->closePolygon();
2727 }
2728 }
2729 return 1;
2730}
2731
2732
2733long
2734GNEViewNet::onCmdOpenPolygon(FXObject*, FXSelector, void*) {
2735 // get polygon under mouse
2736 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2737 // check polygon
2738 if (polygonUnderMouse) {
2739 // check if shape is selected
2740 if (polygonUnderMouse->isAttributeCarrierSelected()) {
2741 // begin undo-list
2742 myNet->getViewNet()->getUndoList()->begin(polygonUnderMouse, TL("open polygon shapes"));
2743 // get shapes
2744 const auto selectedShapes = myNet->getAttributeCarriers()->getSelectedShapes();
2745 // iterate over shapes
2746 for (const auto& selectedShape : selectedShapes) {
2747 // check if shape is a poly
2748 if ((selectedShape->getTagProperty()->getTag() == SUMO_TAG_POLY) ||
2749 (selectedShape->getTagProperty()->getTag() == GNE_TAG_JPS_WALKABLEAREA) ||
2750 (selectedShape->getTagProperty()->getTag() == GNE_TAG_JPS_OBSTACLE)) {
2751 // open polygon
2752 dynamic_cast<GNEPoly*>(selectedShape)->openPolygon();
2753 }
2754 }
2755 // end undo-list
2757 } else {
2758 polygonUnderMouse->openPolygon();
2759 }
2760 }
2761 return 1;
2762}
2763
2764
2765long
2766GNEViewNet::onCmdSelectPolygonElements(FXObject*, FXSelector, void*) {
2767 // get polygon under mouse
2768 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2769 // check polygon
2770 if (polygonUnderMouse) {
2771 // get all elements under polygon shape
2772 updateObjectsInShape(polygonUnderMouse->getShape());
2773 // declare filtered ACs
2774 std::vector<GNEAttributeCarrier*> ACsUnderPolygon;
2775 ACsUnderPolygon.reserve(myViewObjectsSelector.getAttributeCarriers().size());
2776 // iterate over obtained GUIGlIDs
2777 for (const auto& AC : myViewObjectsSelector.getAttributeCarriers()) {
2778 if ((AC->getTagProperty()->getTag() == SUMO_TAG_EDGE) && checkSelectEdges()) {
2779 ACsUnderPolygon.push_back(AC);
2780 } else if ((AC->getTagProperty()->getTag() == SUMO_TAG_LANE) && !checkSelectEdges()) {
2781 ACsUnderPolygon.push_back(AC);
2782 } else if (!AC->getTagProperty()->isSymbol() && (AC != polygonUnderMouse)) {
2783 ACsUnderPolygon.push_back(AC);
2784 }
2785 }
2786 // continue if there are ACs
2787 if (ACsUnderPolygon.size() > 0) {
2788 // begin undo-list
2789 myNet->getViewNet()->getUndoList()->begin(GUIIcon::MODESELECT, TL("select within polygon boundary"));
2790 // iterate over shapes
2791 for (const auto& AC : ACsUnderPolygon) {
2792 AC->setAttribute(GNE_ATTR_SELECTED, "true", myUndoList);
2793 }
2794 // end undo-list
2796 }
2797 }
2798 return 1;
2799}
2800
2801
2802long
2803GNEViewNet::onCmdTriangulatePolygon(FXObject*, FXSelector, void*) {
2804// get polygon under mouse
2805 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2806 // check polygon
2807 if (polygonUnderMouse) {
2808 // declare additional handler
2809 GNEAdditionalHandler additionalHandler(myNet, polygonUnderMouse->getFilename(), myViewParent->getGNEAppWindows()->isUndoRedoAllowed(), false);
2810 // triangulate shape
2811 const auto triangulation = Triangle::triangulate(polygonUnderMouse->getShape());
2812 // begin undo-list
2813 myNet->getViewNet()->getUndoList()->begin(GUIIcon::POLY, TL("triangulate polygon"));
2814 // create every individual triangle
2815 for (const auto& triangle : triangulation) {
2816 auto basePolygon = polygonUnderMouse->getSumoBaseObject();
2818 basePolygon->addPositionVectorAttribute(SUMO_ATTR_SHAPE, triangle.getShape());
2819 // build shape
2820 additionalHandler.parseSumoBaseObject(basePolygon);
2821 }
2822 // delete original polygon
2823 myNet->deleteAdditional(polygonUnderMouse, myNet->getViewNet()->getUndoList());
2824 // end undo-list
2826 }
2827 return 1;
2828}
2829
2830
2831long
2832GNEViewNet::onCmdSetFirstGeometryPoint(FXObject*, FXSelector, void*) {
2833 GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
2834 if (polygonUnderMouse) {
2835 polygonUnderMouse->changeFirstGeometryPoint(polygonUnderMouse->getVertexIndex(getPopupPosition(), false));
2836 }
2837
2838 return 1;
2839}
2840
2841
2842long
2843GNEViewNet::onCmdSimplifyShapeEdited(FXObject*, FXSelector, void*) {
2844 auto undoList = myNet->getViewNet()->getUndoList();
2845 // get shape edited under mouse
2847 if (shapeEdited) {
2848 // simplify edited shape using undo-redo
2849 undoList->begin(shapeEdited, TL("simplify edited shape"));
2850 shapeEdited->simplifyShapeEdited(undoList);
2851 undoList->end();
2852 }
2853 return 1;
2854}
2855
2856
2857long
2858GNEViewNet::onCmdStraightenShapeEdited(FXObject*, FXSelector, void*) {
2859 auto undoList = myNet->getViewNet()->getUndoList();
2860 // get shape edited under mouse
2862 if (shapeEdited) {
2863 // simplify edited shape using undo-redo
2864 undoList->begin(shapeEdited, TL("straigthen edited shape"));
2865 shapeEdited->straigthenShapeEdited(undoList);
2866 undoList->end();
2867 }
2868 return 1;
2869}
2870
2871
2872long
2873GNEViewNet::onCmdCloseShapeEdited(FXObject*, FXSelector, void*) {
2874 auto undoList = myNet->getViewNet()->getUndoList();
2875 // get shape edited under mouse
2877 if (shapeEdited) {
2878 // close edited shape using undo-redo
2879 undoList->begin(shapeEdited, TL("simplify edited shape"));
2880 shapeEdited->closeShapeEdited(undoList);
2881 undoList->end();
2882 }
2883 return 1;
2884}
2885
2886
2887long
2888GNEViewNet::onCmdOpenShapeEdited(FXObject*, FXSelector, void*) {
2889 auto undoList = myNet->getViewNet()->getUndoList();
2890 // get shape edited under mouse
2892 if (shapeEdited) {
2893 // open edited shape using undo-redo
2894 undoList->begin(shapeEdited, TL("simplify edited shape"));
2895 shapeEdited->openShapeEdited(undoList);
2896 undoList->end();
2897 }
2898 return 1;
2899}
2900
2901
2902long
2904 auto undoList = myNet->getViewNet()->getUndoList();
2905 // get shape edited under mouse
2907 if (shapeEdited) {
2908 // get geometry point index under cursor
2909 const auto geometryPointIndex = shapeEdited->getGeometryPointUnderCursorShapeEdited();
2910 // set first geometry point in edited shape using undo-redo
2911 undoList->begin(shapeEdited, TL("simplify edited shape"));
2912 shapeEdited->setFirstGeometryPointShapeEdited(geometryPointIndex, undoList);
2913 undoList->end();
2914 }
2915 return 1;
2916}
2917
2918
2919long
2921 auto undoList = myNet->getViewNet()->getUndoList();
2922 // get shape edited under mouse
2924 if (shapeEdited) {
2925 // get geometry point index under cursor
2926 const auto geometryPointIndex = shapeEdited->getGeometryPointUnderCursorShapeEdited();
2927 // delete geometry point edited shape using undo-redo
2928 undoList->begin(shapeEdited, TL("simplify edited shape"));
2929 shapeEdited->deleteGeometryPointShapeEdited(geometryPointIndex, undoList);
2930 undoList->end();
2931 }
2932 return 1;
2933}
2934
2935
2936long
2937GNEViewNet::onCmdResetShapeEdited(FXObject*, FXSelector, void*) {
2938 auto undoList = myNet->getViewNet()->getUndoList();
2939 // get shape edited under mouse
2941 if (shapeEdited) {
2942 // simplify edited shape using undo-redo
2943 undoList->begin(shapeEdited, TL("simplify edited shape"));
2944 shapeEdited->resetShapeEdited(undoList);
2945 undoList->end();
2946 }
2947 return 1;
2948}
2949
2950
2951long
2952GNEViewNet::onCmdFinishShapeEdited(FXObject*, FXSelector, void*) {
2953 // the same behavior as when we press enter
2954 hotkeyEnter();
2955 return 1;
2956}
2957
2958
2959long
2960GNEViewNet::onCmdTransformPOI(FXObject*, FXSelector, void*) {
2961 // obtain POI at popup position
2963 if (POI) {
2964 // declare additional handler
2965 GNEAdditionalHandler additionalHandler(myNet, POI->getFilename(), myViewParent->getGNEAppWindows()->isUndoRedoAllowed(), false);
2966 // check what type of POI will be transformed
2967 if (POI->getTagProperty()->getTag() == SUMO_TAG_POI) {
2968 // obtain lanes around POI boundary
2969 std::vector<GUIGlID> GLIDs = getObjectsInBoundary(POI->getCenteringBoundary());
2970 std::vector<GNELane*> lanes;
2971 for (const auto& GLID : GLIDs) {
2973 if (lane) {
2974 lanes.push_back(lane);
2975 }
2976 }
2977 if (lanes.empty()) {
2978 WRITE_WARNINGF(TL("No lanes around % to attach it"), toString(SUMO_TAG_POI));
2979 } else {
2980 // obtain nearest lane to POI
2981 GNELane* nearestLane = lanes.front();
2982 double minorPosOverLane = nearestLane->getLaneShape().nearest_offset_to_point2D(POI->getPositionInView());
2983 double minorLateralOffset = nearestLane->getLaneShape().positionAtOffset(minorPosOverLane).distanceTo(POI->getPositionInView());
2984 for (const auto& lane : lanes) {
2985 double posOverLane = lane->getLaneShape().nearest_offset_to_point2D(POI->getPositionInView());
2986 double lateralOffset = lane->getLaneShape().positionAtOffset(posOverLane).distanceTo(POI->getPositionInView());
2987 if (lateralOffset < minorLateralOffset) {
2988 minorPosOverLane = posOverLane;
2989 minorLateralOffset = lateralOffset;
2990 nearestLane = lane;
2991 }
2992 }
2993 // get sumo base object of POI (And all common attributes)
2994 CommonXMLStructure::SumoBaseObject* POIBaseObject = POI->getSumoBaseObject();
2995 // add specific attributes
2996 POIBaseObject->addStringAttribute(SUMO_ATTR_LANE, nearestLane->getID());
2997 POIBaseObject->addDoubleAttribute(SUMO_ATTR_POSITION, minorPosOverLane);
2998 POIBaseObject->addBoolAttribute(SUMO_ATTR_FRIENDLY_POS, POI->getFriendlyPos());
2999 POIBaseObject->addDoubleAttribute(SUMO_ATTR_POSITION_LAT, 0);
3000 // remove POI
3001 myUndoList->begin(POI, TL("attach POI into lane"));
3003 // add new POI use route handler
3004 additionalHandler.parseSumoBaseObject(POIBaseObject);
3005 myUndoList->end();
3006 }
3007 } else {
3008 // get sumo base object of POI (And all common attributes)
3009 CommonXMLStructure::SumoBaseObject* POIBaseObject = POI->getSumoBaseObject();
3010 // add specific attributes
3011 POIBaseObject->addDoubleAttribute(SUMO_ATTR_X, POI->x());
3012 POIBaseObject->addDoubleAttribute(SUMO_ATTR_Y, POI->y());
3013 // remove POI
3014 myUndoList->begin(POI, TL("release POI from lane"));
3016 // add new POI use route handler
3017 additionalHandler.parseSumoBaseObject(POIBaseObject);
3018 myUndoList->end();
3019 }
3020 }
3021 return 1;
3022}
3023
3024
3025long
3026GNEViewNet::onCmdReverse(FXObject*, FXSelector, void*) {
3027 // obtain demand element at popup position
3029 if (demandElement) {
3030 // begin undo list
3031 myUndoList->begin(demandElement, TLF("reverse % '%'", demandElement->getTagStr(), demandElement->getID()));
3032 GNERouteHandler::reverse(demandElement);
3033 myUndoList->end();
3034 }
3035 return 1;
3036}
3037
3038
3039long
3040GNEViewNet::onCmdAddReverse(FXObject*, FXSelector, void*) {
3041 // obtain demand element at popup position
3043 if (demandElement) {
3044 // begin undo list
3045 myUndoList->begin(demandElement, TLF("add reverse '%'", demandElement->getTagStr()));
3046 GNERouteHandler::addReverse(demandElement);
3047 myUndoList->end();
3048 }
3049 return 1;
3050}
3051
3052
3053long
3054GNEViewNet::onCmdSetCustomGeometryPoint(FXObject*, FXSelector, void*) {
3055 // get element at popup position
3059 // check element
3060 if (edge != nullptr) {
3061 // make a copy of edge geometry
3062 auto edgeGeometry = edge->getNBEdge()->getGeometry();
3063 // get index position
3064 const int index = edgeGeometry.indexOfClosest(getPositionInformation(), true);
3065 // get new position
3066 Position newPosition = edgeGeometry[index];
3067 // edit using modal GNEGeometryPointDialog
3068 GNEGeometryPointDialog(this, &newPosition); // NOSONAR, constructor returns after dialog has been closed
3069 // now check position
3070 if (newPosition != edgeGeometry[index]) {
3071 // update new position
3072 edgeGeometry[index] = newPosition;
3073 // begin undo list
3074 myUndoList->begin(edge, TL("change edge Geometry Point position"));
3075 // continue depending of index
3076 if (index == 0) {
3077 // change shape start
3079 } else if (index == ((int)edgeGeometry.size() - 1)) {
3080 // change shape end
3082 } else {
3083 // remove front and back geometry points
3084 edgeGeometry.pop_front();
3085 edgeGeometry.pop_back();
3086 // change shape
3088 }
3089 // end undo list
3090 myUndoList->end();
3091 }
3092 } else if (poly != nullptr) {
3093 // make a copy of polygon geometry
3094 PositionVector polygonGeometry = poly->getShape();
3095 // get index position
3096 const int index = polygonGeometry.indexOfClosest(getPositionInformation(), true);
3097 // get new position
3098 Position newPosition = polygonGeometry[index];
3099 // edit using modal GNEGeometryPointDialog
3100 GNEGeometryPointDialog(this, &newPosition); // NOSONAR, constructor returns after dialog has been closed
3101 // now check position
3102 if (newPosition != polygonGeometry[index]) {
3103 // update new position
3104 polygonGeometry[index] = newPosition;
3105 // begin undo list
3106 myUndoList->begin(poly, TL("change polygon Geometry Point position"));
3107 // change shape
3109 // end undo list
3110 myUndoList->end();
3111 }
3112 } else if (TAZ != nullptr) {
3113 // make a copy of TAZ geometry
3114 PositionVector TAZGeometry = TAZ->getAdditionalGeometry().getShape();
3115 // get index position
3116 const int index = TAZGeometry.indexOfClosest(getPositionInformation(), true);
3117 // get new position
3118 Position newPosition = TAZGeometry[index];
3119 // edit using modal GNEGeometryPointDialog
3120 GNEGeometryPointDialog(this, &newPosition); // NOSONAR, constructor returns after dialog has been closed
3121 // now check position
3122 if (newPosition != TAZGeometry[index]) {
3123 // update new position
3124 TAZGeometry[index] = newPosition;
3125 // begin undo list
3126 myUndoList->begin(TAZ, TL("change TAZ Geometry Point position"));
3127 // change shape
3129 // end undo list
3130 myUndoList->end();
3131 }
3132 }
3133 return 1;
3134}
3135
3136
3137long
3138GNEViewNet::onCmdResetEndPoints(FXObject*, FXSelector, void*) {
3139 // get lane at popup position
3140 GNELane* laneAtPopupPosition = getLaneAtPopupPosition();
3141 // check element
3142 if (laneAtPopupPosition != nullptr) {
3143 // get parent edge
3144 GNEEdge* edge = laneAtPopupPosition->getParentEdge();
3145 // check if edge is selected
3146 if (edge->isAttributeCarrierSelected()) {
3147 // get selected edges
3148 const auto selectedEdges = myNet->getAttributeCarriers()->getSelectedEdges();
3149 // begin undo list
3150 myUndoList->begin(edge, TL("reset end points of selected edges"));
3151 // iterate over edges
3152 for (const auto& selectedEdge : selectedEdges) {
3153 // reset both end points
3154 selectedEdge->setAttribute(GNE_ATTR_SHAPE_START, "", myUndoList);
3155 selectedEdge->setAttribute(GNE_ATTR_SHAPE_END, "", myUndoList);
3156 }
3157 // end undo list
3158 myUndoList->end();
3159 } else {
3160 // begin undo list
3161 myUndoList->begin(edge, TL("reset end points of edge '") + edge->getID());
3162 // reset both end points
3165 // end undo list
3166 myUndoList->end();
3167 }
3168 }
3169 return 1;
3170}
3171
3172
3173long
3174GNEViewNet::onCmdDuplicateLane(FXObject*, FXSelector, void*) {
3175 GNELane* laneAtPopupPosition = getLaneAtPopupPosition();
3176 if (laneAtPopupPosition != nullptr) {
3177 // when duplicating an unselected lane, keep all connections as they
3178 // are, otherwise recompute them
3179 if (laneAtPopupPosition->isAttributeCarrierSelected()) {
3180 myUndoList->begin(laneAtPopupPosition, TL("duplicate selected lanes"));
3181 const auto selectedLanes = myNet->getAttributeCarriers()->getSelectedLanes();
3182 for (const auto& lane : selectedLanes) {
3183 myNet->duplicateLane(lane, myUndoList, true);
3184 }
3185 myUndoList->end();
3186 } else {
3187 myUndoList->begin(laneAtPopupPosition, TL("duplicate lane"));
3188 myNet->duplicateLane(laneAtPopupPosition, myUndoList, false);
3189 myUndoList->end();
3190 }
3191 }
3192 return 1;
3193}
3194
3195
3196long
3197GNEViewNet::onCmdEditLaneShape(FXObject*, FXSelector, void*) {
3198 // Obtain lane under mouse
3200 if (lane) {
3202 }
3203 // destroy pop-up and update view Net
3204 destroyPopup();
3205 setFocus();
3206 return 1;
3207}
3208
3209
3210long
3211GNEViewNet::onCmdResetLaneCustomShape(FXObject*, FXSelector, void*) {
3212 GNELane* laneAtPopupPosition = getLaneAtPopupPosition();
3213 if (laneAtPopupPosition != nullptr) {
3214 // when duplicating an unselected lane, keep all connections as they
3215 // are, otherwise recompute them
3216 if (laneAtPopupPosition->isAttributeCarrierSelected()) {
3217 myUndoList->begin(laneAtPopupPosition, TL("reset custom lane shapes"));
3218 const auto selectedLanes = myNet->getAttributeCarriers()->getSelectedLanes();
3219 for (const auto& lane : selectedLanes) {
3220 lane->setAttribute(SUMO_ATTR_CUSTOMSHAPE, "", myUndoList);
3221 }
3222 myUndoList->end();
3223 } else {
3224 myUndoList->begin(laneAtPopupPosition, TL("reset custom lane shape"));
3225 laneAtPopupPosition->setAttribute(SUMO_ATTR_CUSTOMSHAPE, "", myUndoList);
3226 myUndoList->end();
3227 }
3228 }
3229 return 1;
3230}
3231
3232
3233long
3234GNEViewNet::onCmdResetOppositeLane(FXObject*, FXSelector, void*) {
3235 GNELane* laneAtPopupPosition = getLaneAtPopupPosition();
3236 if (laneAtPopupPosition != nullptr) {
3237 // when duplicating an unselected lane, keep all connections as they
3238 // are, otherwise recompute them
3239 if (laneAtPopupPosition->isAttributeCarrierSelected()) {
3240 myUndoList->begin(laneAtPopupPosition, TL("reset opposite lanes"));
3241 const auto selectedLanes = myNet->getAttributeCarriers()->getSelectedLanes();
3242 for (const auto& lane : selectedLanes) {
3243 lane->setAttribute(GNE_ATTR_OPPOSITE, "", myUndoList);
3244 }
3245 myUndoList->end();
3246 } else {
3247 myUndoList->begin(laneAtPopupPosition, TL("reset opposite lane"));
3248 laneAtPopupPosition->setAttribute(GNE_ATTR_OPPOSITE, "", myUndoList);
3249 myUndoList->end();
3250 }
3251 }
3252 return 1;
3253}
3254
3255
3256long
3257GNEViewNet::onCmdLaneOperation(FXObject*, FXSelector sel, void*) {
3258 GNELane* laneAtPopupPosition = getLaneAtPopupPosition();
3259 if (laneAtPopupPosition) {
3260 // check lane operation
3261 switch (FXSELID(sel)) {
3263 return restrictLane(laneAtPopupPosition, SVC_PEDESTRIAN);
3265 return restrictLane(laneAtPopupPosition, SVC_BICYCLE);
3267 return restrictLane(laneAtPopupPosition, SVC_BUS);
3269 return restrictLane(laneAtPopupPosition, SVC_IGNORING);
3271 return addRestrictedLane(laneAtPopupPosition, SVC_PEDESTRIAN, false);
3273 return addRestrictedLane(laneAtPopupPosition, SVC_BICYCLE, false);
3275 return addRestrictedLane(laneAtPopupPosition, SVC_BUS, false);
3277 return addRestrictedLane(laneAtPopupPosition, SVC_IGNORING, true);
3279 return addRestrictedLane(laneAtPopupPosition, SVC_IGNORING, false);
3281 return removeRestrictedLane(laneAtPopupPosition, SVC_PEDESTRIAN);
3283 return removeRestrictedLane(laneAtPopupPosition, SVC_BICYCLE);
3285 return removeRestrictedLane(laneAtPopupPosition, SVC_BUS);
3287 return removeRestrictedLane(laneAtPopupPosition, SVC_IGNORING);
3288 default:
3289 return 0;
3290 }
3291 } else {
3292 return 0;
3293 }
3294}
3295
3296
3297long
3298GNEViewNet::onCmdLaneReachability(FXObject* menu, FXSelector, void*) {
3299 GNELane* laneAtPopupPosition = getLaneAtPopupPosition();
3300 if (laneAtPopupPosition != nullptr) {
3301 // obtain vClass
3302 const SUMOVehicleClass vClass = SumoVehicleClassStrings.get(dynamic_cast<FXMenuCommand*>(menu)->getText().text());
3303 // calculate reachability
3305 // select all lanes with reachability greater than 0
3306 myUndoList->begin(laneAtPopupPosition, TL("select lane reachability"));
3307 for (const auto& edge : myNet->getAttributeCarriers()->getEdges()) {
3308 for (const auto& lane : edge.second->getChildLanes()) {
3309 if (lane->getReachability() >= 0) {
3310 lane->setAttribute(GNE_ATTR_SELECTED, "true", myUndoList);
3311 }
3312 }
3313 }
3314 myUndoList->end();
3315 }
3316 return 1;
3317}
3318
3319
3320long
3321GNEViewNet::onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*) {
3322 // retrieve additional under cursor
3324 // check if additional can open dialog
3325 if (addtional && addtional->getTagProperty()->hasDialog()) {
3326 addtional->openAdditionalDialog();
3327 }
3328 return 1;
3329}
3330
3331
3332void
3334 FXEvent* evt = (FXEvent*)eventData;
3335 // process click
3336 destroyPopup();
3337 setFocus();
3338 myChanger->onLeftBtnPress(eventData);
3339 grab();
3340 // Check there are double click
3341 if (evt->click_count == 2) {
3342 handle(this, FXSEL(SEL_DOUBLECLICKED, 0), eventData);
3343 }
3344}
3345
3346
3347void
3349 // first check if we're panning
3350 if (myPanning) {
3351 // move view
3354 } else {
3355 // declare flags
3356 bool cursorMoveView = false;
3357 bool cursorInspect = false;
3358 bool cursorSelect = false;
3359 bool cursorMoveElement = false;
3360 bool cursorDelete = false;
3361 // continue depending of supermode
3363 // move view
3369 cursorMoveView = true;
3370 }
3371 // specific mode
3373 cursorInspect = true;
3375 cursorSelect = true;
3377 cursorMoveElement = true;
3379 cursorDelete = true;
3380 }
3382 // move view
3386 cursorMoveView = true;
3387 }
3388 // specific mode
3390 cursorInspect = true;
3392 cursorSelect = true;
3394 cursorMoveElement = true;
3396 cursorDelete = true;
3397 }
3398 } else if (myEditModes.isCurrentSupermodeData()) {
3399 // move view
3401 cursorMoveView = true;
3402 }
3403 // specific mode
3405 cursorInspect = true;
3407 cursorSelect = true;
3409 cursorDelete = true;
3410 }
3411 }
3412 // set cursor
3413 if (myMouseButtonKeyPressed.controlKeyPressed() && cursorMoveView) {
3414 // move view cursor if control key is pressed
3417 } else if (cursorInspect) {
3418 // special case for inspect lanes
3420 // inspect lane cursor
3423 } else {
3424 // inspect cursor
3427 }
3428 } else if (cursorSelect) {
3429 // special case for select lanes
3431 // select lane cursor
3434 } else {
3435 // select cursor
3438 }
3439 } else if (cursorMoveElement) {
3440 // move cursor
3443 } else if (cursorDelete) {
3444 // delete cursor
3447 } else {
3448 // default cursor
3451 }
3452 }
3453}
3454
3455
3456int
3458 // udpdate drawing toggle
3459 if (myDrawingToggle > 10000) {
3460 myDrawingToggle = 0;
3461 } else {
3463 }
3464 // set default scale
3466 // calculate boundary extremes
3467 const float minB[2] = { (float)bound.xmin(), (float)bound.ymin() };
3468 const float maxB[2] = { (float)bound.xmax(), (float)bound.ymax() };
3469 // reset gl line to 1
3470 glLineWidth(1);
3471 // set drawing modes
3472 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
3473 glEnable(GL_POLYGON_OFFSET_FILL);
3474 glEnable(GL_POLYGON_OFFSET_LINE);
3475 // draw all elements between minB and maxB, obtain objects included in minB and maxB
3476 return myGrid->Search(minB, maxB, *myVisualizationSettings);
3477}
3478
3479
3480void
3482 // depending of the visualizationSettings, enable or disable check box show grid
3484 // change show grid
3487 // change to true
3490 // update show grid buttons
3493 }
3494 // draw grid only in network and demand mode
3496 paintGLGrid();
3497 }
3498 } else {
3499 // change show grid
3502 // change to false
3505 // update show grid buttons
3508 }
3509 }
3510}
3511
3512
3513long
3514GNEViewNet::onCmdResetEdgeEndPoints(FXObject*, FXSelector, void*) {
3515 // Obtain junction under mouse
3517 if (junction) {
3518 myUndoList->begin(GUIIcon::EDGE, TL("reset edge endpoints"));
3519 // are, otherwise recompute them
3520 if (junction->isAttributeCarrierSelected()) {
3521 const auto selectedJunctions = myNet->getAttributeCarriers()->getSelectedJunctions();
3522 for (const auto& selectedJunction : selectedJunctions) {
3523 // reset shape end from incoming edges
3524 for (const auto& incomingEdge : selectedJunction->getGNEIncomingEdges()) {
3525 incomingEdge->setAttribute(GNE_ATTR_SHAPE_END, "", myUndoList);
3526 }
3527 // reset shape start from outgoing edges
3528 for (const auto& outgoingEdge : selectedJunction->getGNEOutgoingEdges()) {
3529 outgoingEdge->setAttribute(GNE_ATTR_SHAPE_START, "", myUndoList);
3530 }
3531 }
3532 } else {
3533 // reset shape end from incoming edges
3534 for (const auto& incomingEdge : junction->getGNEIncomingEdges()) {
3535 incomingEdge->setAttribute(GNE_ATTR_SHAPE_END, "", myUndoList);
3536 }
3537 // reset shape start from outgoing edges
3538 for (const auto& outgoingEdge : junction->getGNEOutgoingEdges()) {
3539 outgoingEdge->setAttribute(GNE_ATTR_SHAPE_START, "", myUndoList);
3540 }
3541 }
3542 myUndoList->end();
3543 }
3544 // destroy pop-up and set focus in view net
3545 destroyPopup();
3546 setFocus();
3547 return 1;
3548}
3549
3550
3551long
3552GNEViewNet::onCmdEditJunctionShape(FXObject*, FXSelector, void*) {
3553 // Obtain junction under mouse
3555 if (junction) {
3556 // check if network has to be updated
3557 if (junction->getNBNode()->getShape().size() == 0) {
3558 // recompute the whole network
3560 }
3561 // if grid is enabled, show warning
3563 WRITE_WARNING(TL("Grid is still active, press ctrl+g to deactivate"));
3564 }
3565 // start edit custom shape
3567 }
3568 // destroy pop-up and set focus in view net
3569 destroyPopup();
3570 setFocus();
3571 return 1;
3572}
3573
3574
3575long
3576GNEViewNet::onCmdResetJunctionShape(FXObject*, FXSelector, void*) {
3577 // Obtain junction under mouse
3579 if (junction) {
3580 // are, otherwise recompute them
3581 if (junction->isAttributeCarrierSelected()) {
3582 myUndoList->begin(junction, TL("reset custom junction shapes"));
3583 const auto selectedJunctions = myNet->getAttributeCarriers()->getSelectedJunctions();
3584 for (const auto& selectedJunction : selectedJunctions) {
3585 selectedJunction->setAttribute(SUMO_ATTR_SHAPE, "", myUndoList);
3586 }
3587 myUndoList->end();
3588 } else {
3589 myUndoList->begin(junction, TL("reset custom junction shape"));
3590 junction->setAttribute(SUMO_ATTR_SHAPE, "", myUndoList);
3591 myUndoList->end();
3592 }
3593 }
3594 // destroy pop-up and set focus in view net
3595 destroyPopup();
3596 setFocus();
3597 return 1;
3598}
3599
3600
3601long
3602GNEViewNet::onCmdReplaceJunction(FXObject*, FXSelector, void*) {
3604 if (junction != nullptr) {
3606 }
3607 // destroy pop-up and set focus in view net
3608 destroyPopup();
3609 setFocus();
3610 return 1;
3611}
3612
3613
3614long
3615GNEViewNet::onCmdSplitJunction(FXObject*, FXSelector, void*) {
3617 if (junction != nullptr) {
3618 myNet->splitJunction(junction, false, myUndoList);
3619 }
3620 // destroy pop-up and set focus in view net
3621 destroyPopup();
3622 setFocus();
3623 return 1;
3624}
3625
3626
3627long
3628GNEViewNet::onCmdSplitJunctionReconnect(FXObject*, FXSelector, void*) {
3630 if (junction != nullptr) {
3631 myNet->splitJunction(junction, true, myUndoList);
3632 }
3633 // destroy pop-up and set focus in view net
3634 destroyPopup();
3635 setFocus();
3636 return 1;
3637}
3638
3639long
3640GNEViewNet::onCmdSelectRoundabout(FXObject*, FXSelector, void*) {
3642 if (junction != nullptr) {
3643 myNet->selectRoundabout(junction, myUndoList);
3644 }
3645 // destroy pop-up and set focus in view net
3646 destroyPopup();
3647 setFocus();
3648 return 1;
3649}
3650
3651long
3652GNEViewNet::onCmdConvertRoundabout(FXObject*, FXSelector, void*) {
3654 if (junction != nullptr) {
3655 myNet->createRoundabout(junction, myUndoList);
3656 }
3657 // destroy pop-up and set focus in view net
3658 destroyPopup();
3659 setFocus();
3660 return 1;
3661}
3662
3663
3664long
3665GNEViewNet::onEnterConvertRoundabout(FXObject*, FXSelector, void*) {
3667 update();
3668 return 1;
3669}
3670
3671
3672long
3673GNEViewNet::onLeaveConvertRoundabout(FXObject*, FXSelector, void*) {
3675 update();
3676 return 1;
3677}
3678
3679
3680long
3681GNEViewNet::onCmdClearConnections(FXObject*, FXSelector, void*) {
3683 if (junction != nullptr) {
3684 // make sure we do not inspect the connection will it is being deleted
3687 }
3688 // make sure that connections isn't the front attribute
3689 const auto frontElements = myMarkFrontElements.getACs();
3690 for (const auto& AC : frontElements) {
3691 if (AC->getTagProperty()->getTag() == SUMO_TAG_CONNECTION) {
3693 }
3694 }
3695 // check if we're handling a selection
3696 if (junction->isAttributeCarrierSelected()) {
3697 const auto selectedJunctions = myNet->getAttributeCarriers()->getSelectedJunctions();
3698 myUndoList->begin(GUIIcon::CONNECTION, TL("clear connections of selected junctions"));
3699 for (const auto& selectedJunction : selectedJunctions) {
3700 myNet->clearJunctionConnections(selectedJunction, myUndoList);
3701 }
3702 myUndoList->end();
3703 } else {
3705 }
3706 }
3707 // destroy pop-up and set focus in view net
3708 destroyPopup();
3709 setFocus();
3710 return 1;
3711}
3712
3713
3714long
3715GNEViewNet::onCmdResetConnections(FXObject*, FXSelector, void*) {
3717 if (junction != nullptr) {
3718 // make sure we do not inspect the connection will it is being deleted
3721 }
3722 // make sure that connections isn't the front attribute
3723 const auto frontElements = myMarkFrontElements.getACs();
3724 for (const auto& AC : frontElements) {
3725 if (AC->getTagProperty()->getTag() == SUMO_TAG_CONNECTION) {
3727 }
3728 }
3729 // check if we're handling a selection
3730 if (junction->isAttributeCarrierSelected()) {
3731 const auto selectedJunctions = myNet->getAttributeCarriers()->getSelectedJunctions();
3732 myUndoList->begin(GUIIcon::CONNECTION, TL("reset connections of selected junctions"));
3733 for (const auto& selectedJunction : selectedJunctions) {
3734 myNet->resetJunctionConnections(selectedJunction, myUndoList);
3735 }
3736 myUndoList->end();
3737 } else {
3739 }
3740 }
3741 // destroy pop-up and set focus in view net
3742 destroyPopup();
3743 setFocus();
3744 return 1;
3745}
3746
3747
3748long
3749GNEViewNet::onCmdAddTLS(FXObject*, FXSelector, void*) {
3751 if (junction != nullptr) {
3752 // check if we're adding TLS in multiple junctions
3753 if (junction->isAttributeCarrierSelected()) {
3754 const auto selectedJunctions = myNet->getAttributeCarriers()->getSelectedJunctions();
3755 myNet->getViewNet()->getUndoList()->begin(GUIIcon::MODETLS, TL("add TLS in multiple junctions"));
3756 for (const auto& selectedJunction : selectedJunctions) {
3757 selectedJunction->setAttribute(SUMO_ATTR_TYPE, "traffic_light", myUndoList);
3758 }
3760 } else {
3761 // change junction type
3762 junction->setAttribute(SUMO_ATTR_TYPE, "traffic_light", myUndoList);
3763 // change to TLS Mode
3765 // set junction in TLS mode
3767 }
3768 }
3769 // destroy pop-up and set focus in view net
3770 destroyPopup();
3771 setFocus();
3772 return 1;
3773}
3774
3775
3776long
3777GNEViewNet::onCmdAddJoinTLS(FXObject*, FXSelector, void*) {
3779 if (junction != nullptr) {
3780 // check if we're adding TLS in multiple junctions
3781 if (junction->isAttributeCarrierSelected()) {
3782 myNet->getViewNet()->getUndoList()->begin(GUIIcon::MODETLS, TL("add TLS in multiple junctions"));
3783 }
3784 // change junction type
3785 junction->setAttribute(SUMO_ATTR_TYPE, "traffic_light", myUndoList);
3786 // if TLS was sucesfully created, apply the same TLID to other selected junctions
3787 if (junction->getAttribute(SUMO_ATTR_TLID).size() > 0) {
3788 const auto selectedJunctions = myNet->getAttributeCarriers()->getSelectedJunctions();
3789 // iterate over all selected junctions
3790 for (const auto& selectedJunction : selectedJunctions) {
3791 // check that doesn't have a TL
3792 if (selectedJunction->getNBNode()->getControllingTLS().empty()) {
3793 selectedJunction->setAttribute(SUMO_ATTR_TYPE, "traffic_light", myUndoList);
3794 selectedJunction->setAttribute(SUMO_ATTR_TLID, junction->getAttribute(SUMO_ATTR_TLID), myUndoList);
3795 }
3796 }
3797 }
3798 // rename traffic light
3799 if (junction->getNBNode()->getControllingTLS().size() > 0) {
3800 const auto TLSDef = (*junction->getNBNode()->getControllingTLS().begin());
3801 if (!myNet->getTLLogicCont().exist(TLSDef->getID() + "_joined")) {
3802 myUndoList->add(new GNEChange_TLS(junction, TLSDef, TLSDef->getID() + "_joined"), true);
3803 }
3804 }
3805 // end undoList
3806 if (junction->isAttributeCarrierSelected()) {
3808 }
3809 // change to TLS Mode
3811 // set junction in TLS mode
3813 }
3814 // destroy pop-up and set focus in view net
3815 destroyPopup();
3816 setFocus();
3817 return 1;
3818}
3819
3820long
3821GNEViewNet::onCmdEditConnectionShape(FXObject*, FXSelector, void*) {
3822 // Obtain connection under mouse
3824 if (connection) {
3826 }
3827 // if grid is enabled, show warning
3829 WRITE_WARNING(TL("Grid is still active, press ctrl+g to deactivate"));
3830 }
3831 // destroy pop-up and update view Net
3832 destroyPopup();
3833 setFocus();
3834 return 1;
3835}
3836
3837
3838long
3839GNEViewNet::onCmdSmoothConnectionShape(FXObject*, FXSelector, void*) {
3840 // Obtain connection under mouse
3842 if (connection) {
3843 connection->smootShape();
3844 }
3845 // destroy pop-up and update view Net
3846 destroyPopup();
3847 setFocus();
3848 return 1;
3849}
3850
3851
3852long
3853GNEViewNet::onCmdEditCrossingShape(FXObject*, FXSelector, void*) {
3854 // Obtain crossing under mouse
3856 if (crossing) {
3857 // check if network has to be updated
3858 if (crossing->getParentJunctions().front()->getNBNode()->getShape().size() == 0) {
3859 // recompute the whole network
3861 }
3862 // if grid is enabled, show warning
3864 WRITE_WARNING(TL("Grid is still active, press ctrl+g to deactivate"));
3865 }
3866 // start edit custom shape
3868 }
3869 // destroy pop-up and update view Net
3870 destroyPopup();
3871 setFocus();
3872 return 1;
3873}
3874
3875
3876long
3877GNEViewNet::onCmdEditWalkingAreaShape(FXObject*, FXSelector, void*) {
3878 // Obtain walkingArea under mouse
3880 if (walkingArea) {
3881 // check if network has to be updated
3882 if (walkingArea->getParentJunctions().front()->getNBNode()->getShape().size() == 0) {
3883 // recompute the whole network
3885 // if grid is enabled, show warning
3887 WRITE_WARNING(TL("Grid is still active, press ctrl+g to deactivate"));
3888 }
3889 }
3890 // start edit custom shape
3892 }
3893 // destroy pop-up and update view Net
3894 destroyPopup();
3895 setFocus();
3896 return 1;
3897}
3898
3899
3900long
3901GNEViewNet::onCmdToggleSelectEdges(FXObject*, FXSelector sel, void*) {
3902 // Toggle menuCheckSelectEdges
3905 } else {
3907 }
3909 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
3910 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES)) {
3912 }
3913 return 1;
3914}
3915
3916
3917long
3918GNEViewNet::onCmdToggleShowConnections(FXObject*, FXSelector sel, void*) {
3919 // Toggle menuCheckShowConnections
3922 } else {
3924 }
3926 // if show was enabled, init GNEConnections
3929 }
3930 // change flag "showLane2Lane" in myVisualizationSettings
3932 // Hide/show connections require recompute
3934 // Update viewNet to show/hide connections
3935 updateViewNet();
3936 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
3937 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS)) {
3939 }
3940 return 1;
3941}
3942
3943
3944long
3945GNEViewNet::onCmdToggleHideConnections(FXObject*, FXSelector sel, void*) {
3946 // Toggle menuCheckHideConnections
3949 } else {
3951 }
3953 // Update viewNet to show/hide connections
3954 updateViewNet();
3955 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
3956 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS)) {
3958 }
3959 return 1;
3960}
3961
3962
3963long
3964GNEViewNet::onCmdToggleShowAdditionalSubElements(FXObject*, FXSelector sel, void*) {
3965 // Toggle menuCheckShowAdditionalSubElements
3968 } else {
3970 }
3972 // Update viewNet to show/hide sub elements
3973 updateViewNet();
3974 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
3975 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWSUBADDITIONALS)) {
3977 }
3978 return 1;
3979}
3980
3981
3982long
3983GNEViewNet::onCmdToggleShowTAZElements(FXObject*, FXSelector sel, void*) {
3984 // Toggle menuCheckShowAdditionalSubElements
3987 } else {
3989 }
3991 // Update viewNet to show/hide TAZ elements
3992 updateViewNet();
3993 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
3994 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWTAZELEMENTS)) {
3996 }
3997 return 1;
3998}
3999
4000
4001long
4002GNEViewNet::onCmdToggleExtendSelection(FXObject*, FXSelector sel, void*) {
4003 // Toggle menuCheckExtendSelection
4006 } else {
4008 }
4010 // Only update view
4011 updateViewNet();
4012 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4013 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION)) {
4015 }
4016 return 1;
4017}
4018
4019
4020long
4021GNEViewNet::onCmdToggleChangeAllPhases(FXObject*, FXSelector sel, void*) {
4022 // Toggle menuCheckChangeAllPhases
4025 } else {
4027 }
4029 // Only update view
4030 updateViewNet();
4031 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4032 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES)) {
4034 }
4035 return 1;
4036}
4037
4038
4039long
4040GNEViewNet::onCmdToggleShowGrid(FXObject*, FXSelector sel, void*) {
4041 // show or hide grid depending of myNetworkViewOptions.menuCheckToggleGrid
4046 } else {
4050 }
4053 // update view to show grid
4054 updateViewNet();
4055 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4056 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_TOGGLEGRID)) {
4058 } else if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_SHOWGRID)) {
4060 }
4061 return 1;
4062}
4063
4064
4065long
4066GNEViewNet::onCmdToggleDrawJunctionShape(FXObject*, FXSelector sel, void*) {
4067 // toggle state
4069 // gui button has 'hide' semantics
4070 const bool hide = !myVisualizationSettings->drawJunctionShape;
4074
4078 // update view to show DrawJunctionShape
4079 updateViewNet();
4080 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4081 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE)) {
4083 } else if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE)) {
4085 } else if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE)) {
4087 }
4088 return 1;
4089}
4090
4091long
4092GNEViewNet::onCmdToggleDrawSpreadVehicles(FXObject*, FXSelector sel, void*) {
4093 // Toggle menuCheckShowDemandElements
4098 } else {
4101 }
4104 // declare edge set
4105 std::set<GNEEdge*> edgesToUpdate;
4106 // compute vehicle geometry
4107 for (const auto& vehicle : myNet->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VEHICLE)) {
4108 if (vehicle.second->getParentEdges().size() > 0) {
4109 edgesToUpdate.insert(vehicle.second->getParentEdges().front());
4110 } else if (vehicle.second->getChildDemandElements().size() > 0 && (vehicle.second->getChildDemandElements().front()->getTagProperty()->getTag() == GNE_TAG_ROUTE_EMBEDDED)) {
4111 edgesToUpdate.insert(vehicle.second->getChildDemandElements().front()->getParentEdges().front());
4112 }
4113 }
4114 for (const auto& routeFlow : myNet->getAttributeCarriers()->getDemandElements().at(GNE_TAG_FLOW_ROUTE)) {
4115 if (routeFlow.second->getParentEdges().size() > 0) {
4116 edgesToUpdate.insert(routeFlow.second->getParentEdges().front());
4117 } else if (routeFlow.second->getChildDemandElements().size() > 0 && (routeFlow.second->getChildDemandElements().front()->getTagProperty()->getTag() == GNE_TAG_ROUTE_EMBEDDED)) {
4118 edgesToUpdate.insert(routeFlow.second->getChildDemandElements().front()->getParentEdges().front());
4119 }
4120 }
4121 for (const auto& trip : myNet->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_TRIP)) {
4122 if (trip.second->getParentEdges().size() > 0) {
4123 edgesToUpdate.insert(trip.second->getParentEdges().front());
4124 }
4125 }
4126 for (const auto& flow : myNet->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_FLOW)) {
4127 if (flow.second->getParentEdges().size() > 0) {
4128 edgesToUpdate.insert(flow.second->getParentEdges().front());
4129 }
4130 }
4131 // update spread geometries of all edges
4132 for (const auto& edge : edgesToUpdate) {
4133 edge->updateVehicleSpreadGeometries();
4134 }
4135 // update view to show new vehicles positions
4136 updateViewNet();
4137 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4138 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_DRAWSPREADVEHICLES)) {
4140 } else if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_DRAWSPREADVEHICLES)) {
4142 }
4143 return 1;
4144}
4145
4146
4147long
4148GNEViewNet::onCmdToggleMergeAutomatically(FXObject*, FXSelector sel, void*) {
4149 // Toggle menuCheckWarnAboutMerge
4152 } else {
4154 }
4156 // Only update view
4157 updateViewNet();
4158 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4159 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_MERGEAUTOMATICALLY)) {
4161 }
4162 return 1;
4163}
4164
4165
4166long
4167GNEViewNet::onCmdToggleShowJunctionBubbles(FXObject*, FXSelector sel, void*) {
4168 // Toggle menuCheckShowJunctionBubble
4171 } else {
4173 }
4175 // Only update view
4176 updateViewNet();
4177 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4178 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES)) {
4180 }
4181 return 1;
4182}
4183
4184
4185long
4186GNEViewNet::onCmdToggleMoveElevation(FXObject*, FXSelector sel, void*) {
4187 // Toggle menuCheckMoveElevation
4190 } else {
4192 }
4194 // Only update view
4195 updateViewNet();
4196 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4197 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION)) {
4199 }
4200 return 1;
4201}
4202
4203
4204long
4205GNEViewNet::onCmdToggleChainEdges(FXObject*, FXSelector sel, void*) {
4206 // Toggle menuCheckMoveElevation
4209 } else {
4211 }
4213 // Only update view
4214 updateViewNet();
4215 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4216 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES)) {
4218 }
4219 return 1;
4220}
4221
4222
4223long
4224GNEViewNet::onCmdToggleAutoOppositeEdge(FXObject*, FXSelector sel, void*) {
4225 // Toggle menuCheckAutoOppositeEdge
4228 } else {
4230 }
4232 // Only update view
4233 updateViewNet();
4234 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4235 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES)) {
4237 }
4238 return 1;
4239}
4240
4241
4242long
4244 // Toggle menuCheckHideNonInspectedDemandElements
4247 } else {
4249 }
4251 // Only update view
4252 updateViewNet();
4253 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4254 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED)) {
4256 }
4257 return 1;
4258}
4259
4260
4261long
4262GNEViewNet::onCmdToggleShowOverlappedRoutes(FXObject*, FXSelector sel, void*) {
4263 // Toggle menuCheckShowOverlappedRoutes
4266 } else {
4268 }
4270 // Only update view
4271 updateViewNet();
4272 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4273 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_SHOWOVERLAPPEDROUTES)) {
4275 }
4276 return 1;
4277}
4278
4279
4280long
4281GNEViewNet::onCmdToggleHideShapes(FXObject*, FXSelector sel, void*) {
4282 // Toggle menuCheckHideShapes
4285 } else {
4287 }
4289 // Only update view
4290 updateViewNet();
4291 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4292 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES)) {
4294 }
4295 return 1;
4296}
4297
4298
4299long
4300GNEViewNet::onCmdToggleShowTrips(FXObject*, FXSelector sel, void*) {
4301 // Toggle menuCheckHideShapes
4304 } else {
4306 }
4308 // Only update view
4309 updateViewNet();
4310 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4311 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_SHOWTRIPS)) {
4313 }
4314 return 1;
4315}
4316
4317
4318long
4319GNEViewNet::onCmdToggleShowAllPersonPlans(FXObject*, FXSelector sel, void*) {
4320 // Toggle menuCheckShowAllPersonPlans
4323 } else {
4325 }
4327 // Only update view
4328 updateViewNet();
4329 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4330 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS)) {
4332 }
4333 return 1;
4334}
4335
4336
4337long
4338GNEViewNet::onCmdToggleLockPerson(FXObject*, FXSelector sel, void*) {
4339 // Toggle menuCheckLockPerson
4344 }
4346 // lock or unlock current inspected person depending of menuCheckLockPerson value
4348 // obtain locked person or person plan
4349 const GNEDemandElement* personOrPersonPlan = dynamic_cast<const GNEDemandElement*>(myInspectedElements.getFirstAC());
4350 if (personOrPersonPlan) {
4351 // lock person depending if casted demand element is either a person or a person plan
4352 if (personOrPersonPlan->getTagProperty()->isPerson()) {
4353 myDemandViewOptions.lockPerson(personOrPersonPlan);
4354 } else {
4355 myDemandViewOptions.lockPerson(personOrPersonPlan->getParentDemandElements().front());
4356 }
4357 }
4358 } else {
4359 // unlock current person
4361 }
4362 // update view
4363 updateViewNet();
4364 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4365 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON)) {
4367 }
4368 return 1;
4369}
4370
4371
4372long
4373GNEViewNet::onCmdToggleShowAllContainerPlans(FXObject*, FXSelector sel, void*) {
4374 // Toggle menuCheckShowAllContainerPlans
4377 } else {
4379 }
4381 // Only update view
4382 updateViewNet();
4383 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4384 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_SHOWALLCONTAINERPLANS)) {
4386 }
4387 return 1;
4388}
4389
4390
4391long
4392GNEViewNet::onCmdToggleLockContainer(FXObject*, FXSelector sel, void*) {
4393 // Toggle menuCheckLockContainer
4398 }
4400 // lock or unlock current inspected container depending of menuCheckLockContainer value
4402 // obtain locked container or container plan
4403 const GNEDemandElement* containerOrContainerPlan = dynamic_cast<const GNEDemandElement*>(myInspectedElements.getFirstAC());
4404 if (containerOrContainerPlan) {
4405 // lock container depending if casted demand element is either a container or a container plan
4406 if (containerOrContainerPlan->getTagProperty()->isContainer()) {
4407 myDemandViewOptions.lockContainer(containerOrContainerPlan);
4408 } else {
4409 myDemandViewOptions.lockContainer(containerOrContainerPlan->getParentDemandElements().front());
4410 }
4411 }
4412 } else {
4413 // unlock current container
4415 }
4416 // update view
4417 updateViewNet();
4418 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4419 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_LOCKCONTAINER)) {
4421 }
4422 return 1;
4423}
4424
4425
4426long
4427GNEViewNet::onCmdToggleShowAdditionals(FXObject*, FXSelector sel, void*) {
4428 // Toggle menuCheckShowAdditionals
4431 } else {
4433 }
4435 // Only update view
4436 updateViewNet();
4437 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4438 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_SHOWADDITIONALS)) {
4440 }
4441 return 1;
4442}
4443
4444
4445long
4446GNEViewNet::onCmdToggleShowShapes(FXObject*, FXSelector sel, void*) {
4447 // Toggle menuCheckShowShapes
4450 } else {
4452 }
4454 // Only update view
4455 updateViewNet();
4456 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4457 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_SHOWSHAPES)) {
4459 }
4460 return 1;
4461}
4462
4463
4464long
4465GNEViewNet::onCmdToggleShowDemandElementsNetwork(FXObject*, FXSelector sel, void*) {
4466 // Toggle menuCheckShowDemandElements
4469 } else {
4471 }
4473 // compute demand elements
4475 // update view to show demand elements
4476 updateViewNet();
4477 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4478 if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS)) {
4480 }
4481 return 1;
4482}
4483
4484
4485long
4486GNEViewNet::onCmdToggleShowDemandElementsData(FXObject*, FXSelector sel, void*) {
4487 // Toggle menuCheckShowDemandElements
4490 } else {
4492 }
4494 // compute demand elements
4496 // update view to show demand elements
4497 updateViewNet();
4498 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4499 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_SHOWDEMANDELEMENTS)) {
4501 }
4502 return 1;
4503}
4504
4505
4506long
4507GNEViewNet::onCmdToggleTAZRelDrawing(FXObject*, FXSelector sel, void*) {
4508 // Toggle menuCheckShowDemandElements
4511 } else {
4513 }
4515 // update view to show demand elements
4516 updateViewNet();
4517 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4518 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_TAZRELDRAWING)) {
4520 }
4521 return 1;
4522}
4523
4524
4525long
4526GNEViewNet::onCmdToggleTAZDrawFill(FXObject*, FXSelector sel, void*) {
4527 // Toggle menuCheckShowDemandElements
4530 } else {
4532 }
4534 // update view to show demand elements
4535 updateViewNet();
4536 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4537 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_TAZDRAWFILL)) {
4539 }
4540 return 1;
4541}
4542
4543
4544long
4545GNEViewNet::onCmdToggleTAZRelOnlyFrom(FXObject*, FXSelector sel, void*) {
4546 // Toggle menuCheckShowDemandElements
4549 } else {
4551 }
4553 // update view to show demand elements
4554 updateViewNet();
4555 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4556 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_TAZRELONLYFROM)) {
4558 }
4559 return 1;
4560}
4561
4562
4563long
4564GNEViewNet::onCmdToggleTAZRelOnlyTo(FXObject*, FXSelector sel, void*) {
4565 // Toggle menuCheckShowDemandElements
4568 } else {
4570 }
4572 // update view to show demand elements
4573 updateViewNet();
4574 // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
4575 if (sel == FXSEL(SEL_COMMAND, MID_GNE_DATAVIEWOPTIONS_TAZRELONLYTO)) {
4577 }
4578 return 1;
4579}
4580
4581
4582long
4583GNEViewNet::onCmdIntervalBarGenericDataType(FXObject*, FXSelector, void*) {
4585 return 1;
4586}
4587
4588
4589long
4590GNEViewNet::onCmdIntervalBarDataSet(FXObject*, FXSelector, void*) {
4592 return 1;
4593}
4594
4595
4596long
4597GNEViewNet::onCmdIntervalBarLimit(FXObject*, FXSelector, void*) {
4599 return 1;
4600}
4601
4602
4603long
4604GNEViewNet::onCmdIntervalBarSetBegin(FXObject*, FXSelector, void*) {
4606 return 1;
4607}
4608
4609
4610long
4611GNEViewNet::onCmdIntervalBarSetEnd(FXObject*, FXSelector, void*) {
4613 return 1;
4614}
4615
4616
4617long
4618GNEViewNet::onCmdIntervalBarSetParameter(FXObject*, FXSelector, void*) {
4620 return 1;
4621}
4622
4623
4624long
4625GNEViewNet::onCmdAddSelected(FXObject*, FXSelector, void*) {
4626 // only select if AC under cursor isn't previously selected
4628 if (AC && !AC->isAttributeCarrierSelected()) {
4630 }
4631 return 1;
4632}
4633
4634
4635long
4636GNEViewNet::onCmdRemoveSelected(FXObject*, FXSelector, void*) {
4637 // only unselect if AC under cursor isn't previously selected
4639 if (AC && AC->isAttributeCarrierSelected()) {
4641 }
4642 return 1;
4643}
4644
4645
4646long
4647GNEViewNet::onCmdAddEdgeSelected(FXObject*, FXSelector, void*) {
4648 // only select if edge under cursor isn't previously selected
4649 auto edge = myViewObjectsSelector.getEdgeFront();
4650 if (edge && !edge->isAttributeCarrierSelected()) {
4651 edge->selectAttributeCarrier();
4652 }
4653 return 1;
4654}
4655
4656
4657long
4658GNEViewNet::onCmdRemoveEdgeSelected(FXObject*, FXSelector, void*) {
4659 // only unselect if edge under cursor isn't previously selected
4660 auto edge = myViewObjectsSelector.getEdgeFront();
4661 if (edge && edge->isAttributeCarrierSelected()) {
4663 }
4664 return 1;
4665}
4666
4667
4668long
4669GNEViewNet::onCmdSetNeteditView(FXObject*, FXSelector sel, void*) {
4670 myEditModes.setView(FXSELID(sel));
4671 update();
4672 return 1;
4673}
4674
4675// ===========================================================================
4676// private
4677// ===========================================================================
4678
4679void
4681 // build supermode buttons
4683
4684 // build save elements buttons
4686
4687 // build time switch buttons
4689
4690 // build menu checks for Common checkable buttons
4692
4693 // build menu checks for Network checkable buttons
4695
4696 // build menu checks for Demand checkable buttons
4698
4699 // build menu checks of view options Data
4701
4702 // Create Vertical separator
4704 // XXX for some reason the vertical groove is not visible. adding more spacing to emphasize the separation
4707
4708 // build menu checks of view options Network
4710
4711 // build menu checks of view options Demand
4713
4714 // build menu checks of view options Data
4716
4717 // build interval bar
4719}
4720
4721
4722void
4724 // get menu checks
4726 // hide all checkbox of view options Network
4728 // hide all checkbox of view options Demand
4730 // hide all checkbox of view options Data
4732 // disable all common edit modes
4734 // disable all network edit modes
4736 // disable all network edit modes
4738 // hide interval bar
4740 // hide all frames
4742 // hide all menuchecks
4746 // In network mode, always show option "show grid", "draw spread vehicles" and "show demand elements"
4751 menuChecks.menuCheckToggleGrid->show();
4752 menuChecks.menuCheckToggleDrawJunctionShape->show();
4753 menuChecks.menuCheckDrawSpreadVehicles->show();
4754 menuChecks.menuCheckShowDemandElements->show();
4755 // show separator
4756 menuChecks.separator->show();
4757 // enable selected controls
4758 switch (myEditModes.networkEditMode) {
4759 // common modes
4765 // show view options
4771 // show menu checks
4772 menuChecks.menuCheckSelectEdges->show();
4773 menuChecks.menuCheckShowConnections->show();
4774 menuChecks.menuCheckShowAdditionalSubElements->show();
4775 menuChecks.menuCheckShowTAZElements->show();
4776 menuChecks.menuCheckShowJunctionBubble->show();
4777 // update lock menu bar
4779 // show
4780 break;
4790 // show view options
4793 menuChecks.menuCheckShowAdditionalSubElements->show();
4794 menuChecks.menuCheckShowTAZElements->show();
4795 menuChecks.menuCheckShowJunctionBubble->show();
4796 // show menu checks
4797 menuChecks.menuCheckSelectEdges->show();
4798 menuChecks.menuCheckShowConnections->show();
4799 break;
4805 // show view options
4812 // show menu checks
4813 menuChecks.menuCheckSelectEdges->show();
4814 menuChecks.menuCheckShowConnections->show();
4815 menuChecks.menuCheckExtendSelection->show();
4816 menuChecks.menuCheckShowAdditionalSubElements->show();
4817 menuChecks.menuCheckShowTAZElements->show();
4818 menuChecks.menuCheckShowJunctionBubble->show();
4819 break;
4820 // specific modes
4826 // show view options
4830 // show menu checks
4831 menuChecks.menuCheckChainEdges->show();
4832 menuChecks.menuCheckAutoOppositeEdge->show();
4833 menuChecks.menuCheckShowJunctionBubble->show();
4834 break;
4840 // show view options
4844 // show menu checks
4845 menuChecks.menuCheckMergeAutomatically->show();
4846 menuChecks.menuCheckShowJunctionBubble->show();
4847 menuChecks.menuCheckMoveElevation->show();
4848 break;
4854 break;
4860 // show view options
4862 // show menu checks
4863 menuChecks.menuCheckChangeAllPhases->show();
4864 break;
4870 // show view options
4872 // show menu checks
4873 menuChecks.menuCheckShowAdditionalSubElements->show();
4874 break;
4880 break;
4886 break;
4892 break;
4898 break;
4904 break;
4910 break;
4911 default:
4912 break;
4913 }
4914 // update menuChecks shorcuts
4915 menuChecks.updateShortcuts();
4916 // update common Network buttons
4918 // Update Network buttons
4920 // recalc toolbar
4923 // force repaint because different modes draw different things
4924 onPaint(nullptr, 0, nullptr);
4925 // finally update view
4926 updateViewNet();
4927}
4928
4929
4930void
4932 // get menu checks
4934 // hide all checkbox of view options Network
4936 // hide all checkbox of view options Demand
4938 // hide all checkbox of view options Data
4940 // disable all common edit modes
4942 // disable all Demand edit modes
4944 // disable all network edit modes
4946 // hide interval bar
4948 // hide all frames
4950 // hide all menuchecks
4954 // always show "hide shapes", "show grid", "draw spread vehicles", "show overlapped routes" and show/lock persons and containers
4965 menuChecks.menuCheckToggleGrid->show();
4966 menuChecks.menuCheckToggleDrawJunctionShape->show();
4967 menuChecks.menuCheckDrawSpreadVehicles->show();
4968 menuChecks.menuCheckHideShapes->show();
4969 menuChecks.menuCheckShowAllTrips->show();
4970 menuChecks.menuCheckShowAllPersonPlans->show();
4971 menuChecks.menuCheckLockPerson->show();
4972 menuChecks.menuCheckShowAllContainerPlans->show();
4973 menuChecks.menuCheckLockContainer->show();
4974 menuChecks.menuCheckShowOverlappedRoutes->show();
4975 // show separator
4976 menuChecks.separator->show();
4977 // enable selected controls
4978 switch (myEditModes.demandEditMode) {
4979 // common modes
4984 // set checkable button
4986 // show view options
4988 // show menu checks
4989 menuChecks.menuCheckHideNonInspectedDemandElements->show();
4990 break;
4995 // set checkable button
4997 break;
5002 // set checkable button
5004 break;
5009 // set checkable button
5011 break;
5012 // specific modes
5017 // set checkable button
5019 break;
5024 // set checkable button
5026 break;
5031 // set checkable button
5033 break;
5038 // set checkable button
5040 break;
5045 // set checkable button
5047 break;
5052 // set checkable button
5054 break;
5059 // set checkable button
5061 break;
5066 // set checkable button
5068 break;
5073 // set checkable button
5075 break;
5080 // set checkable button
5082 break;
5083 default:
5084 break;
5085 }
5086 // update menuChecks shorcuts
5087 menuChecks.updateShortcuts();
5088 // update common Network buttons
5090 // Update Demand buttons
5092 // recalc toolbar
5095 // force repaint because different modes draw different things
5096 onPaint(nullptr, 0, nullptr);
5097 // finally update view
5098 updateViewNet();
5099}
5100
5101
5102void
5104 // get menu checks
5106 // hide all checkbox of view options Network
5108 // hide all checkbox of view options Demand
5110 // hide all checkbox of view options Data
5112 // disable all common edit modes
5114 // disable all Data edit modes
5116 // show interval bar
5118 // hide all frames
5120 // hide all menuchecks
5124 // In data mode, always show options for show elements
5129 menuChecks.menuCheckToggleDrawJunctionShape->show();
5130 menuChecks.menuCheckShowAdditionals->show();
5131 menuChecks.menuCheckShowShapes->show();
5132 menuChecks.menuCheckShowDemandElements->show();
5133 // show separator
5134 menuChecks.separator->show();
5135 // enable selected controls
5136 switch (myEditModes.dataEditMode) {
5137 // common modes
5142 // set checkable button
5144 // show view option
5149 // show menu check
5150 menuChecks.menuCheckToggleTAZRelDrawing->show();
5151 menuChecks.menuCheckToggleTAZDrawFill->show();
5152 menuChecks.menuCheckToggleTAZRelOnlyFrom->show();
5153 menuChecks.menuCheckToggleTAZRelOnlyTo->show();
5154 break;
5159 // set checkable button
5161 // show toggle TAZRel drawing view option
5165 // show toggle TAZRel drawing menu check
5166 menuChecks.menuCheckToggleTAZRelDrawing->show();
5167 menuChecks.menuCheckToggleTAZRelOnlyFrom->show();
5168 menuChecks.menuCheckToggleTAZRelOnlyTo->show();
5169 break;
5174 // set checkable button
5176 // show toggle TAZRel drawing view option
5180 // show toggle TAZRel drawing menu check
5181 menuChecks.menuCheckToggleTAZRelDrawing->show();
5182 menuChecks.menuCheckToggleTAZRelOnlyFrom->show();
5183 menuChecks.menuCheckToggleTAZRelOnlyTo->show();
5184 break;
5189 // set checkable button
5191 break;
5196 // set checkable button
5198 break;
5203 // set checkable button
5205 // show view option
5210 // show menu check
5211 menuChecks.menuCheckToggleTAZRelDrawing->show();
5212 menuChecks.menuCheckToggleTAZDrawFill->show();
5213 menuChecks.menuCheckToggleTAZRelOnlyFrom->show();
5214 menuChecks.menuCheckToggleTAZRelOnlyTo->show();
5215 break;
5220 // set checkable button
5222 break;
5223 default:
5224 break;
5225 }
5226 // update menuChecks shorcuts
5227 menuChecks.updateShortcuts();
5228 // update common Network buttons
5230 // Update Data buttons
5232 // recalc toolbar
5235 // force repaint because different modes draw different things
5236 onPaint(nullptr, 0, nullptr);
5237 // finally update view
5238 updateViewNet();
5239}
5240
5241
5242void
5244 if (AC->getTagProperty()->getTag() == SUMO_TAG_JUNCTION) {
5245 // get junction (note: could be already removed if is a child, then hardfail=false)
5246 GNEJunction* junction = myNet->getAttributeCarriers()->retrieveJunction(AC->getID(), false);
5247 // if exist, remove it
5248 if (junction) {
5249 myNet->deleteJunction(junction, myUndoList);
5250 }
5251 } else if (AC->getTagProperty()->getTag() == SUMO_TAG_CROSSING) {
5252 // get crossing (note: could be already removed if is a child, then hardfail=false)
5254 // if exist, remove it
5255 if (crossing) {
5256 myNet->deleteCrossing(crossing, myUndoList);
5257 }
5258 } else if (AC->getTagProperty()->getTag() == SUMO_TAG_EDGE) {
5259 // get edge (note: could be already removed if is a child, then hardfail=false)
5260 GNEEdge* edge = myNet->getAttributeCarriers()->retrieveEdge(AC->getID(), false);
5261 // if exist, remove it
5262 if (edge) {
5263 myNet->deleteEdge(edge, myUndoList, false);
5264 }
5265 } else if (AC->getTagProperty()->getTag() == SUMO_TAG_LANE) {
5266 // get lane (note: could be already removed if is a child, then hardfail=false)
5268 // if exist, remove it
5269 if (lane) {
5270 myNet->deleteLane(lane, myUndoList, false);
5271 }
5272 } else if (AC->getTagProperty()->getTag() == SUMO_TAG_CONNECTION) {
5273 // get connection (note: could be already removed if is a child, then hardfail=false)
5275 // if exist, remove it
5276 if (connection) {
5277 myNet->deleteConnection(connection, myUndoList);
5278 }
5279 } else if ((AC->getTagProperty()->getTag() == SUMO_TAG_TAZSOURCE) || (AC->getTagProperty()->getTag() == SUMO_TAG_TAZSINK)) {
5280 // get TAZ SourceSink Element (note: could be already removed if is a child, then hardfail=false)
5281 GNETAZSourceSink* TAZSourceSink = myNet->getAttributeCarriers()->retrieveTAZSourceSink(AC, false);
5282 // if exist, remove it
5283 if (TAZSourceSink) {
5284 myNet->deleteTAZSourceSink(TAZSourceSink, myUndoList);
5285 }
5286 } else if (AC->getTagProperty()->isAdditionalElement()) {
5287 // get additional Element (note: could be already removed if is a child, then hardfail=false)
5288 GNEAdditional* additionalElement = myNet->getAttributeCarriers()->retrieveAdditional(AC->getGUIGlObject(), false);
5289 // if exist, remove it
5290 if (additionalElement) {
5291 myNet->deleteAdditional(additionalElement, myUndoList);
5292 }
5293 }
5294}
5295
5296
5297void
5299 // get demand Element (note: could be already removed if is a child, then hardfail=false)
5301 // if exist, remove it
5302 if (demandElement) {
5303 myNet->deleteDemandElement(demandElement, myUndoList);
5304 }
5305}
5306
5307
5308void
5310 if (AC->getTagProperty()->getTag() == SUMO_TAG_DATASET) {
5311 // get data set (note: could be already removed if is a child, then hardfail=false)
5312 GNEDataSet* dataSet = myNet->getAttributeCarriers()->retrieveDataSet(AC->getID(), false);
5313 // if exist, remove it
5314 if (dataSet) {
5315 myNet->deleteDataSet(dataSet, myUndoList);
5316 }
5317 } else if (AC->getTagProperty()->getTag() == SUMO_TAG_DATAINTERVAL) {
5318 // get data interval (note: could be already removed if is a child, then hardfail=false)
5319 GNEDataInterval* dataInterval = myNet->getAttributeCarriers()->retrieveDataInterval(AC, false);
5320 // if exist, remove it
5321 if (dataInterval) {
5322 myNet->deleteDataInterval(dataInterval, myUndoList);
5323 }
5324 } else {
5325 // get generic data (note: could be already removed if is a child, then hardfail=false)
5327 // if exist, remove it
5328 if (genericData) {
5329 myNet->deleteGenericData(genericData, myUndoList);
5330 }
5331 }
5332}
5333
5334
5335void
5338 switch (myEditModes.networkEditMode) {
5340 myViewParent->getInspectorFrame()->update();
5341 break;
5342 default:
5343 break;
5344 }
5345 }
5347 switch (myEditModes.demandEditMode) {
5349 myViewParent->getInspectorFrame()->update();
5350 break;
5353 break;
5356 break;
5359 break;
5362 break;
5365 break;
5368 break;
5371 break;
5374 break;
5377 break;
5378 default:
5379 break;
5380 }
5381 }
5383 switch (myEditModes.dataEditMode) {
5385 myViewParent->getInspectorFrame()->update();
5386 break;
5387 default:
5388 break;
5389 }
5390 // update data interval
5392 }
5393 // update view
5394 updateViewNet();
5395}
5396
5397// ---------------------------------------------------------------------------
5398// Private methods
5399// ---------------------------------------------------------------------------
5400
5401void
5403 PositionVector temporalShape;
5404 bool deleteLastCreatedPoint = false;
5405 // obtain temporal shape and delete last created point flag
5412 }
5413 // check if we're in drawing mode
5414 if (temporalShape.size() > 0) {
5415 // draw blue line with the current drawed shape
5417 glLineWidth(2);
5418 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5420 GLHelper::drawLine(temporalShape);
5422 // draw red line from the last point of shape to the current mouse position
5424 glLineWidth(2);
5425 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5426 // draw last line depending if shift key (delete last created point) is pressed
5427 if (deleteLastCreatedPoint) {
5429 } else {
5431 }
5434 }
5435}
5436
5437
5438void
5440 // first check if we're in correct mode
5445 // get mouse position
5446 const Position mousePosition = snapToActiveGrid(getPositionInformation());
5447 // get junction exaggeration
5448 const double junctionExaggeration = myVisualizationSettings->junctionSize.getExaggeration(*myVisualizationSettings, nullptr, 4);
5449 // get bubble color
5451 // change alpha
5452 bubbleColor.setAlpha(200);
5453 // push layer matrix
5455 // translate to temporal shape layer
5456 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5457 // push junction matrix
5459 // move matrix junction center
5460 glTranslated(mousePosition.x(), mousePosition.y(), 0.1);
5461 // set color
5462 GLHelper::setColor(bubbleColor);
5463 // draw outline circle
5464 const double circleWidth = myVisualizationSettings->neteditSizeSettings.junctionBubbleRadius * junctionExaggeration;
5465 GLHelper::drawOutlineCircle(circleWidth, circleWidth * 0.75, 32);
5466 // pop junction matrix
5468 // draw temporal edge
5470 // set temporal edge color
5471 RGBColor temporalEdgeColor = RGBColor::BLACK;
5472 temporalEdgeColor.setAlpha(200);
5473 // declare temporal edge geometry
5474 GUIGeometry temporalEdgeGeometry;
5475 // calculate geometry between source junction and mouse position
5476 PositionVector temporalEdge = {mousePosition, myViewParent->getCreateEdgeFrame()->getJunctionSource()->getPositionInView()};
5477 // move temporal edge 2 side
5478 temporalEdge.move2side(-1);
5479 // update geometry
5480 temporalEdgeGeometry.updateGeometry(temporalEdge);
5481 // push temporal edge matrix
5483 // set color
5484 GLHelper::setColor(temporalEdgeColor);
5485 // draw temporal edge
5487 // check if we have to draw opposite edge
5489 // move temporal edge to opposite edge
5490 temporalEdge.move2side(2);
5491 // update geometry
5492 temporalEdgeGeometry.updateGeometry(temporalEdge);
5493 // draw temporal edge
5495 }
5496 // pop temporal edge matrix
5498 }
5499 // pop layer matrix
5501 }
5502}
5503
5504
5505void
5507 // first check if we're in correct mode
5512 (gViewObjectsHandler.markedEdge != nullptr)) {
5513 // calculate split position
5514 const auto lane = gViewObjectsHandler.markedEdge->getChildLanes().back();
5515 auto shape = lane->getLaneShape();
5516 // move shape to side
5517 shape.move2side(lane->getDrawingConstants()->getDrawingWidth() * -1);
5518 const auto offset = shape.nearest_offset_to_point2D(snapToActiveGrid(getPositionInformation()));
5519 const auto splitPosition = shape.positionAtOffset2D(offset);
5520 // get junction exaggeration
5521 const double junctionExaggeration = myVisualizationSettings->junctionSize.getExaggeration(*myVisualizationSettings, nullptr, 4);
5522 // get bubble color
5524 // push layer matrix
5526 // translate to temporal shape layer
5527 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5528 // push junction matrix
5530 // move matrix junction center
5531 glTranslated(splitPosition.x(), splitPosition.y(), 0.1);
5532 // set color
5533 GLHelper::setColor(bubbleColor);
5534 // draw outline circle
5535 const double circleWidth = myVisualizationSettings->neteditSizeSettings.junctionBubbleRadius * junctionExaggeration;
5536 GLHelper::drawOutlineCircle(circleWidth, circleWidth * 0.75, 32);
5537 // draw filled circle
5539 // pop junction matrix
5541 // pop layer matrix
5543 }
5544}
5545
5546
5547void
5549 // check conditions
5550 if ((myCurrentObjectsDialog.size() > 0) && (myCurrentObjectsDialog.front()->getType() == GLO_JUNCTION) && myDrawPreviewRoundabout) {
5551 // get junction
5552 const auto junction = myNet->getAttributeCarriers()->retrieveJunction(myCurrentObjectsDialog.front()->getMicrosimID());
5553 // push layer matrix
5555 // translate to temporal shape layer
5556 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5557 // push junction matrix
5559 // move matrix junction center
5560 glTranslated(junction->getNBNode()->getPosition().x(), junction->getNBNode()->getPosition().y(), 0.1);
5561 // set color
5563 // draw outline circle
5564 const double circleWidth = (junction->getNBNode()->getRadius() < 0) ? 4.0 : junction->getNBNode()->getRadius();
5565 GLHelper::drawOutlineCircle(circleWidth * 1.30, circleWidth, 32);
5566 // pop junction matrix
5568 // pop layer matrix
5570 }
5571}
5572
5573
5574void
5576 // check conditions
5578 // get junction
5580 // push layer matrix
5582 // translate to TLLogic
5583 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5584 // iterate over all E1 detectors
5585 for (const auto& E1ID : myViewParent->getTLSEditorFrame()->getTLSAttributes()->getE1Detectors()) {
5586 // first check if E1 exists
5587 const auto E1 = myNet->getAttributeCarriers()->retrieveAdditional(SUMO_TAG_INDUCTION_LOOP, E1ID.second, false);
5588 if (E1) {
5589 // push line matrix
5591 // draw line between junction and E1
5592 GUIGeometry::drawChildLine(*myVisualizationSettings, junctionPos, E1->getPositionInView(),
5594 // pop line matrix
5596 }
5597 }
5598 // pop layer matrix
5600 }
5601}
5602
5603
5604void
5606 // check conditions
5608 // get junction
5610 // push layer matrix
5612 // translate to TLLogic
5613 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5614 // iterate over all Junction detectors
5615 for (const auto& selectedJunctionID : myViewParent->getTLSEditorFrame()->getTLSJunction()->getSelectedJunctionIDs()) {
5616 // get junction
5617 const auto selectedJunction = myNet->getAttributeCarriers()->retrieveJunction(selectedJunctionID);
5618 // push line matrix
5620 // draw line between junction and Junction
5621 GUIGeometry::drawChildLine(*myVisualizationSettings, junctionPos, selectedJunction->getPositionInView(),
5623 // pop line matrix
5625 }
5626 // pop layer matrix
5628 }
5629}
5630
5631
5632void
5635 /*
5636 myViewParent->getAdditionalFrame()->getNeteditAttributesEditor()->drawLaneReference(gViewObjectsHandler.markedLane);
5637 // get element length
5638 const double elementLength = getElementLength();
5639 // check lane
5640 if (lane && shown() && myReferencePointComboBox->shown() && (myReferencePoint != ReferencePoint::INVALID) &&
5641 (elementLength != INVALID_DOUBLE)) {
5642 // Obtain position of the mouse over lane (limited over grid)
5643 const double mousePosOverLane = lane->getLaneShape().nearest_offset_to_point2D(myFrameParent->getViewNet()->snapToActiveGrid(myFrameParent->getViewNet()->getPositionInformation())) / lane->getLengthGeometryFactor();
5644 // continue depending of mouse pos over lane
5645 if (mousePosOverLane >= 0) {
5646 // set start and end position
5647 const double startPos = setStartPosition(mousePosOverLane, elementLength);
5648 const double endPos = setEndPosition(mousePosOverLane, elementLength, lane->getLaneShape().length2D());
5649 // get lane geometry
5650 const auto laneShape = lane->getLaneGeometry().getShape();
5651 // difference between start-end position and elementLength
5652 const auto lengthDifference = (endPos - startPos) - elementLength;
5653 // set color
5654 RGBColor segmentColor;
5655 // check if force length
5656 if (myForceLengthFrame->shown() && (myForceLengthCheckButton->getCheck() == TRUE) && abs(lengthDifference) >= 0.1) {
5657 segmentColor = RGBColor::RED;
5658 } else {
5659 segmentColor = RGBColor::ORANGE;
5660 }
5661 // declare geometries
5662 GUIGeometry geometry;
5663 // trim geomtry
5664 geometry.updateGeometry(laneShape,
5665 (startPos == INVALID_DOUBLE) ? -1 : startPos,
5666 Position::INVALID,
5667 (endPos == INVALID_DOUBLE) ? -1 : endPos,
5668 Position::INVALID);
5669 // push layer matrix
5670 GLHelper::pushMatrix();
5671 // translate to temporal shape layer
5672 glTranslated(0, 0, GLO_TEMPORALSHAPE);
5673 // set color
5674 GLHelper::setColor(segmentColor);
5675 // draw temporal edge
5676 GUIGeometry::drawGeometry(lane->getDrawingConstants()->getDetail(), geometry, 0.45);
5677 // check if draw starPos
5678 if (startPos != INVALID_DOUBLE) {
5679 // cut start pos
5680 geometry.updateGeometry(laneShape, startPos, Position::INVALID, startPos + 0.5, Position::INVALID);
5681 // draw startPos
5682 GUIGeometry::drawGeometry(lane->getDrawingConstants()->getDetail(), geometry, 1);
5683 } else {
5684 // push circle matrix
5685 GLHelper::pushMatrix();
5686 // translate to test layer, but under magenta square
5687 glTranslated(laneShape.front().x(), laneShape.front().y(), 0);
5688 // draw circle
5689 GLHelper::drawFilledCircle(0.8, 8);
5690 // pop circle matrix
5691 GLHelper::popMatrix();
5692 }
5693 // check if draw endPos
5694 if (endPos != INVALID_DOUBLE) {
5695 // cut endPos
5696 geometry.updateGeometry(laneShape, endPos - 0.5, Position::INVALID, endPos, Position::INVALID);
5697 // draw endPos
5698 GUIGeometry::drawGeometry(lane->getDrawingConstants()->getDetail(), geometry, 1);
5699 } else {
5700 // push circle matrix
5701 GLHelper::pushMatrix();
5702 // translate to test layer, but under magenta square
5703 glTranslated(laneShape.back().x(), laneShape.back().y(), 0);
5704 // draw circle
5705 GLHelper::drawFilledCircle(0.8, 8);
5706 // pop circle matrix
5707 GLHelper::popMatrix();
5708 }
5709 // set color
5710 GLHelper::setColor(segmentColor.changedBrightness(-32));
5711 // translate to front
5712 glTranslated(0, 0, 2);
5713 // check if draw at end, or over circle
5714 if (endPos == INVALID_DOUBLE) {
5715 // cut endPos
5716 geometry.updateGeometry(laneShape, laneShape.length() - 0.5, Position::INVALID, laneShape.length(), Position::INVALID);
5717 // draw triangle at end
5718 GLHelper::drawTriangleAtEnd(geometry.getShape().front(), geometry.getShape().back(), (double) 0.45, (double) 0.3, 0.3);
5719 } else {
5720 // draw triangle at end
5721 GLHelper::drawTriangleAtEnd(geometry.getShape().front(), geometry.getShape().back(), (double) 0.45, (double) 0.3, -0.1);
5722 }
5723 // pop layer matrix
5724 GLHelper::popMatrix();
5725 }
5726 }
5727 */
5728 }
5729}
5730
5731
5732void
5735 // get mouse position
5736 const Position mousePosition = snapToActiveGrid(getPositionInformation());
5737 // push layer matrix
5739 // translate to test layer, but under magenta square
5740 glTranslated(mousePosition.x(), mousePosition.y(), GLO_TESTELEMENT - 1);
5741 // set color
5743 // draw circle
5745 // pop layer matrix
5747 }
5748}
5749
5750
5751void
5753 // reset moving selected edge
5755 // decide what to do based on mode
5756 switch (myEditModes.networkEditMode) {
5758 // first swap lane to edges if mySelectEdges is enabled and shift key isn't pressed
5759 if (checkSelectEdges()) {
5761 } else {
5763 }
5764 // now filter locked elements
5766 // check if we're selecting a new parent for the current inspected element
5769 } else {
5770 // inspect clicked elements
5772 }
5773 // process click
5774 processClick(eventData);
5775 break;
5776 }
5778 // first swap lane to edges if mySelectEdges is enabled and shift key isn't pressed
5779 if (checkSelectEdges()) {
5781 } else {
5783 }
5784 // now filter locked elements forcing excluding walkingAreas
5786 // continue depending of AC
5788 // now check if we want only delete geometry points
5790 // only remove geometry point
5793 // remove all selected attribute carriers
5796 }
5797 } else {
5798 // remove attribute carrier under cursor
5800 }
5801 } else {
5802 // process click
5803 processClick(eventData);
5804 }
5805 break;
5806 }
5808 // first swap lane to edges if mySelectEdges is enabled and shift key isn't pressed
5809 if (checkSelectEdges()) {
5811 } else {
5813 }
5814 // now filter locked elements
5816 // avoid to select if control key is pressed
5818 // check if a rect for selecting is being created
5820 // begin rectangle selection
5823 // process click
5824 processClick(eventData);
5825 }
5826 } else {
5827 // process click
5828 processClick(eventData);
5829 }
5830 break;
5832 // check what buttons are pressed
5834 // get edge under cursor
5836 if (edge) {
5837 // obtain reverse edge
5838 const auto oppositeEdges = edge->getOppositeEdges();
5839 // check if we're split one or both edges
5842 } else if (oppositeEdges.size() > 0) {
5843 myNet->splitEdgesBidi(edge, oppositeEdges.front(), edge->getSplitPos(getPositionInformation()), myUndoList);
5844 } else {
5846 }
5847 }
5849 // process left click in create edge frame Frame
5854 }
5855 // process click
5856 processClick(eventData);
5857 break;
5858 }
5860 // editing lane shapes in move mode isn't finished, then always filter lanes
5862 // filter locked elements
5864 // check if we're editing a shape
5866 // check if we're removing a geometry point
5868 // remove geometry point
5871 }
5873 // process click if there isn't movable elements (to move camera using drag an drop)
5874 processClick(eventData);
5875 }
5876 } else {
5877 // filter connections and crossings, because are moved setting custom shape
5880 // get AC under cursor
5882 // check that AC is an network or additional element
5883 if (AC && (AC->getTagProperty()->isNetworkElement() || AC->getTagProperty()->isAdditionalElement())) {
5884 // check if we're moving a set of selected items
5885 if (AC->isAttributeCarrierSelected()) {
5886 // move selected ACs
5889 // process click if there isn't movable elements (to move camera using drag an drop)
5890 processClick(eventData);
5891 }
5892 } else {
5893 // process click if there isn't movable elements (to move camera using drag an drop)
5894 processClick(eventData);
5895 }
5896 }
5897 break;
5898 }
5900 // check if we're clicked over a non locked lane
5902 // Handle laneclick (shift key may pass connections, Control key allow conflicts)
5904 updateViewNet();
5905 }
5906 // process click
5907 processClick(eventData);
5908 break;
5909 }
5911 // edit TLS in TLSEditor frame
5913 // process click
5914 processClick(eventData);
5915 break;
5916 }
5918 // avoid create additionals if control key is pressed
5921 updateViewNet();
5922 }
5923 }
5924 // process click
5925 processClick(eventData);
5926 break;
5927 }
5929 // filter elements over junctions
5933 // call function addCrossing from crossing frame
5935 // process click
5936 processClick(eventData);
5937 break;
5938 }
5940 // avoid create TAZs if control key is pressed
5942 // check if we want to create a rect for selecting edges
5944 // begin rectangle selection
5946 } else {
5947 // check if process click was successfully
5949 updateViewNet();
5950 }
5951 // process click
5952 processClick(eventData);
5953 }
5954 } else {
5955 // process click
5956 processClick(eventData);
5957 }
5958 break;
5959 }
5961 // avoid create shapes if control key is pressed
5964 // declare processClick flag
5965 bool updateTemporalShape = false;
5966 // process click
5968 updateViewNet();
5969 // process click depending of the result of "process click"
5970 if (!updateTemporalShape) {
5971 // process click
5972 processClick(eventData);
5973 }
5974 }
5975 } else {
5976 // process click
5977 processClick(eventData);
5978 }
5979 break;
5980 }
5983 // shift key may pass connections, Control key allow conflicts.
5985 updateViewNet();
5986 }
5987 // process click
5988 processClick(eventData);
5989 break;
5990 }
5992 // avoid create wires if control key is pressed
5995 updateViewNet();
5996 }
5997 // process click
5998 processClick(eventData);
5999 break;
6000 }
6002 // process click
6003 processClick(eventData);
6004 break;
6005 }
6006 default: {
6007 // process click
6008 processClick(eventData);
6009 }
6010 }
6011}
6012
6013
6014void
6016 // check moved items
6020 // check if we're creating a rectangle selection or we want only to select a lane
6022 // check if we're selecting all type of elements o we only want a set of edges for TAZ
6026 // process edge selection
6028 }
6030 // check if there is a lane in objects under cursor
6032 // if we clicked over an lane with shift key pressed, select or unselect it
6035 } else {
6037 }
6038 }
6039 }
6040 // finish selection
6042 } else {
6043 // finish moving of single elements
6045 }
6046}
6047
6048
6049void
6050GNEViewNet::processMoveMouseNetwork(const bool mouseLeftButtonPressed) {
6051 // change "delete last created point" depending if during movement shift key is pressed
6056 }
6057 // check what type of additional is moved
6059 // move entire selection
6060 myMoveMultipleElements.moveSelection(mouseLeftButtonPressed);
6062 // update selection corner of selecting area
6064 } else {
6065 // move single elements
6066 myMoveSingleElement.moveSingleElement(mouseLeftButtonPressed);
6067 }
6068}
6069
6070
6071void
6073 // filter shapes (because POIs and polygons doesn't interact in demand mode)
6075 // decide what to do based on mode
6076 switch (myEditModes.demandEditMode) {
6078 // filter locked elements
6080 // inspect clicked elements
6082 // process click
6083 processClick(eventData);
6084 break;
6085 }
6087 // filter locked elements
6089 // get front AC
6090 const auto markAC = myViewObjectsSelector.getAttributeCarrierFront();
6091 // check conditions
6092 if (markAC) {
6093 // check if we are deleting a selection or an single attribute carrier
6094 if (markAC->isAttributeCarrierSelected()) {
6096 } else {
6098 }
6099 } else {
6100 // process click
6101 processClick(eventData);
6102 }
6103 break;
6104 }
6106 // filter locked elements
6108 // avoid to select if control key is pressed
6110 // check if a rect for selecting is being created
6112 // begin rectangle selection
6115 // process click
6116 processClick(eventData);
6117 }
6118 } else {
6119 // process click
6120 processClick(eventData);
6121 }
6122 break;
6124 // filter locked elements
6126 // get front AC
6127 const auto markAC = myViewObjectsSelector.getAttributeCarrierFront();
6128 // check that AC under cursor is a demand element
6129 if (markAC) {
6130 // check if we're moving a set of selected items
6131 if (markAC->isAttributeCarrierSelected()) {
6132 // move selected ACs
6135 // process click if there isn't movable elements (to move camera using drag an drop)
6136 processClick(eventData);
6137 }
6138 } else {
6139 // process click if there isn't movable elements (to move camera using drag an drop)
6140 processClick(eventData);
6141 }
6142 break;
6143 }
6145 // check if we clicked over a lane
6147 // Handle edge click
6149 }
6150 // process click
6151 processClick(eventData);
6152 break;
6153 }
6155 // filter additionals (except TAZs) and demands (except routes)
6158 // Handle click
6160 // process click
6161 processClick(eventData);
6162 break;
6163 }
6165 // filter additionals (except stoppingPlaces) and demands
6168 // Handle click
6170 updateViewNet();
6171 }
6172 // process click
6173 processClick(eventData);
6174 break;
6175 }
6177 // filter additionals (except stoppingPlaces and TAZs)
6180 // special case if we're creating person over walk routes
6183 } else {
6185 }
6186 // Handle click
6188 }
6189 // process click
6190 processClick(eventData);
6191 break;
6192 }
6194 // filter additionals (except stoppingPlaces and TAZs)
6197 // special case if we're creating person over walk routes
6200 } else {
6202 }
6203 // Handle person plan click
6205 }
6206 // process click
6207 processClick(eventData);
6208 break;
6209 }
6211 // filter additionals (except stoppingPlaces and TAZs) and demands
6214 // Handle click
6216 // process click
6217 processClick(eventData);
6218 break;
6219 }
6221 // filter additionals (except stoppingPlaces and TAZs) and demands
6224 // Handle container plan click
6226 // process click
6227 processClick(eventData);
6228 break;
6229 }
6230 default: {
6231 // process click
6232 processClick(eventData);
6233 }
6234 }
6235}
6236
6237
6238void
6240 // check moved items
6244 // check if we're creating a rectangle selection or we want only to select a lane
6247 }
6248 // finish selection
6250 } else {
6251 // finish moving of single elements
6253 }
6254}
6255
6256
6257void
6258GNEViewNet::processMoveMouseDemand(const bool mouseLeftButtonPressed) {
6260 // update selection corner of selecting area
6262 } else {
6263 // move single elements
6264 myMoveSingleElement.moveSingleElement(mouseLeftButtonPressed);
6265 }
6266}
6267
6268
6269void
6271 // get AC
6273 // decide what to do based on mode
6274 switch (myEditModes.dataEditMode) {
6276 // filter locked elements
6278 // process left click in Inspector Frame
6279 if (AC && AC->getTagProperty()->getTag() == SUMO_TAG_TAZ) {
6281 } else {
6282 // inspect clicked elements
6284 }
6285 // process click
6286 processClick(eventData);
6287 break;
6288 }
6290 // check conditions
6291 if (AC) {
6292 // check if we are deleting a selection or an single attribute carrier
6293 if (AC->isAttributeCarrierSelected()) {
6294 if (!AC->getGUIGlObject()->isGLObjectLocked()) {
6296 }
6297 } else {
6299 }
6300 } else {
6301 // process click
6302 processClick(eventData);
6303 }
6304 break;
6305 }
6307 // filter locked elements
6309 // avoid to select if control key is pressed
6311 // check if a rect for selecting is being created
6313 // begin rectangle selection
6316 // process click
6317 processClick(eventData);
6318 }
6319 } else {
6320 // process click
6321 processClick(eventData);
6322 }
6323 break;
6325 // avoid create edgeData if control key is pressed
6328 updateViewNet();
6329 }
6330 }
6331 // process click
6332 processClick(eventData);
6333 break;
6335 // avoid create edgeData if control key is pressed
6338 updateViewNet();
6339 }
6340 }
6341 // process click
6342 processClick(eventData);
6343 break;
6345 // avoid create TAZData if control key is pressed
6348 updateViewNet();
6349 }
6350 }
6351 // process click
6352 processClick(eventData);
6353 break;
6355 // avoid create TAZData if control key is pressed
6357 //
6358 }
6359 // process click
6360 processClick(eventData);
6361 break;
6362 default: {
6363 // process click
6364 processClick(eventData);
6365 }
6366 }
6367}
6368
6369
6370void
6372 // check moved items
6376 // check if we're creating a rectangle selection or we want only to select a lane
6379 }
6380 // finish selection
6382 } else {
6383 // finish moving of single elements
6385 }
6386}
6387
6388
6389void
6390GNEViewNet::processMoveMouseData(const bool mouseLeftButtonPressed) {
6392 // update selection corner of selecting area
6394 } else {
6395 // move single elements
6396 myMoveSingleElement.moveSingleElement(mouseLeftButtonPressed);
6397 }
6398}
6399
6400/****************************************************************************/
FXDEFMAP(GNEViewNet) GNEViewNetMap[]
@ DATA_MEANDATA
mode for create meanData elements
@ DATA_EDGERELDATA
mode for create edgeRelData elements
@ DATA_SELECT
mode for selecting data elements
@ DATA_TAZRELDATA
mode for create TAZRelData elements
@ DATA_INSPECT
mode for inspecting data elements
@ DATA_EDGEDATA
mode for create edgeData elements
@ DATA_DELETE
mode for deleting data elements
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
@ NETWORK_SHAPE
Mode for editing Polygons.
@ NETWORK_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ NETWORK_WIRE
Mode for editing wires.
@ NETWORK_ADDITIONAL
Mode for editing additionals.
@ NETWORK_TAZ
Mode for editing TAZ.
@ NETWORK_CREATE_EDGE
mode for creating new edges
@ NETWORK_TLS
mode for editing tls
@ NETWORK_CROSSING
Mode for editing crossing.
@ NETWORK_SELECT
mode for selecting network elements
@ NETWORK_INSPECT
mode for inspecting network elements
@ NETWORK_PROHIBITION
Mode for editing connection prohibitions.
@ NETWORK_CONNECT
mode for connecting lanes
@ NETWORK_DECAL
Mode for editing decals.
@ DEMAND_PERSONPLAN
Mode for editing person plan.
@ DEMAND_INSPECT
mode for inspecting demand elements
@ DEMAND_CONTAINER
Mode for editing container.
@ DEMAND_DELETE
mode for deleting demand elements
@ DEMAND_ROUTEDISTRIBUTION
Mode for editing route distributions.
@ DEMAND_PERSON
Mode for editing person.
@ DEMAND_TYPEDISTRIBUTION
Mode for editing type distributions.
@ DEMAND_SELECT
mode for selecting demand elements
@ DEMAND_ROUTE
Mode for editing routes.
@ DEMAND_VEHICLE
Mode for editing vehicles.
@ DEMAND_MOVE
mode for moving demand elements
@ DEMAND_STOP
Mode for editing stops.
@ DEMAND_CONTAINERPLAN
Mode for editing container plan.
@ DEMAND_TYPE
Mode for editing types.
@ MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES
automatically create opposite edge
Definition GUIAppEnum.h:847
@ MID_GNE_ADDSELECT_EDGE
Add edge to selected items - menu entry.
Definition GUIAppEnum.h:849
@ MID_HOTKEY_F3_SUPERMODE_DEMAND
select demand supermode in netedit
Definition GUIAppEnum.h:234
@ MID_GNE_LANE_EDIT_SHAPE
edit lane shape
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS
show all person plans
Definition GUIAppEnum.h:879
@ MID_HOTKEY_SHIFT_S_LOCATESTOP
Locate stop - button.
Definition GUIAppEnum.h:188
@ MID_GNE_LANE_TRANSFORM_BIKE
transform lane to bikelane
@ MID_GNE_DATAVIEWOPTIONS_TAZRELDRAWING
toggle TAZRel drawing
Definition GUIAppEnum.h:903
@ MID_GNE_EDGE_REVERSE
reverse an edge
@ MID_GNE_JUNCTION_ADDTLS
Add TLS into junction.
@ MID_ADDSELECT
Add to selected items - menu entry.
Definition GUIAppEnum.h:485
@ MID_HOTKEY_U_MODE_DECAL_TYPEDISTRIBUTION
hotkey for mode decal AND type distribution
Definition GUIAppEnum.h:69
@ MID_GNE_LANE_ADD_BUS
add busLane
@ MID_GNE_NETWORKVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
Definition GUIAppEnum.h:821
@ MID_GNE_JUNCTION_RESET_EDGE_ENDPOINTS
reset edge endpoints
@ MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION
move elevation instead of x,y
Definition GUIAppEnum.h:843
@ MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS
hide connections
Definition GUIAppEnum.h:829
@ MID_GNE_REMOVESELECT_EDGE
Remove edge from selected items - Menu Entry.
Definition GUIAppEnum.h:851
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS
show connections
Definition GUIAppEnum.h:827
@ MID_GNE_INTERVALBAR_BEGIN
begin changed in InterbalBar
Definition GUIAppEnum.h:923
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYTO
toggle draw TAZRel only to
Definition GUIAppEnum.h:909
@ MID_GNE_ADDREVERSE
add reverse element
@ MID_GNE_CONNECTION_SMOOTH_SHAPE
@ brief smooth connection shape
@ MID_GNE_DATAVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:895
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWTAZELEMENTS
show TAZ elements
Definition GUIAppEnum.h:833
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON
lock person
Definition GUIAppEnum.h:881
@ MID_HOTKEY_Z_MODE_TAZ_TAZREL
hotkey for mode editing TAZ and TAZRel
Definition GUIAppEnum.h:75
@ MID_GNE_DEMANDVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:869
@ MID_GNE_JUNCTION_CLEAR_CONNECTIONS
clear junction's connections
@ MID_HOTKEY_A_MODE_STARTSIMULATION_ADDITIONALS_STOPS
hotkey for start simulation in SUMO and set editing mode additionals AND stops in netedit
Definition GUIAppEnum.h:43
@ MID_GNE_JUNCTION_SELECT_ROUNDABOUT
select all roundabout nodes and edges of the current roundabout
@ MID_GNE_JUNCTION_RESET_SHAPE
reset junction shape
@ MID_GNE_JUNCTION_RESET_CONNECTIONS
reset junction's connections
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWGRID
show grid
Definition GUIAppEnum.h:867
@ MID_GNE_POLYGON_TRIANGULATE
triangulate polygon
@ MID_GNE_JUNCTION_SPLIT
turn junction into multiple junctions
@ MID_GNE_EDGE_STRAIGHTEN_ELEVATION
interpolate z values linear between junctions
@ MID_HOTKEY_D_MODE_SINGLESIMULATIONSTEP_DELETE
hotkey for perform a single simulation step in SUMO and set delete mode in netedit
Definition GUIAppEnum.h:49
@ MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES
create edges in chain mode
Definition GUIAppEnum.h:845
@ MID_GNE_DATAVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition GUIAppEnum.h:901
@ MID_GNE_POLYGON_CLOSE
close opened polygon
@ MID_GNE_EDGE_SMOOTH
smooth geometry
@ MID_HOTKEY_C_MODE_CONNECT_CONTAINER
hotkey for mode connecting lanes AND container
Definition GUIAppEnum.h:45
@ MID_HOTKEY_H_MODE_PROHIBITION_CONTAINERPLAN
hotkey for mode prohibition AND container plan
Definition GUIAppEnum.h:53
@ MID_HOTKEY_SHIFT_O_LOCATEPOI
Locate poi - button.
Definition GUIAppEnum.h:182
@ MID_HOTKEY_W_MODE_WIRE_ROUTEDISTRIBUTION
hotkey for mode editing overhead wires AND route distributions
Definition GUIAppEnum.h:73
@ MID_HOTKEY_T_MODE_TLS_TYPE
hotkey for mode editing TLS AND Vehicle Types
Definition GUIAppEnum.h:67
@ MID_GNE_LANE_RESET_CUSTOMSHAPE
reset custom shape
@ MID_GNE_EDGE_STRAIGHTEN
remove inner geometry
@ MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES
hide shapes
Definition GUIAppEnum.h:875
@ MID_GNE_LANE_TRANSFORM_BUS
transform lane to busLane
@ MID_GNE_POLYGON_SET_FIRST_POINT
Set a vertex of polygon as first vertex.
@ MID_GNE_SHAPEEDITED_DELETE_GEOMETRY_POINT
delete geometry point in shape edited
@ MID_HOTKEY_SHIFT_A_LOCATEADDITIONAL
Locate additional structure - button.
Definition GUIAppEnum.h:172
@ MID_GNE_LANE_DUPLICATE
duplicate a lane
@ MID_GNE_DATAVIEWOPTIONS_SHOWADDITIONALS
show additionals
Definition GUIAppEnum.h:897
@ MID_HOTKEY_SHIFT_R_LOCATEROUTE
Locate route - button.
Definition GUIAppEnum.h:186
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES
show junctions as bubbles
Definition GUIAppEnum.h:841
@ MID_GNE_LANE_ADD_GREENVERGE_FRONT
add greenVerge front of current lane
@ MID_GNE_INTERVALBAR_END
end changed in InterbalBar
Definition GUIAppEnum.h:925
@ MID_HOTKEY_SHIFT_W_LOCATEWALKINGAREA
Locate edge - button.
Definition GUIAppEnum.h:194
@ MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION
extend selection
Definition GUIAppEnum.h:835
@ MID_GNE_LANE_REMOVE_GREENVERGE
remove greenVerge
@ MID_HOTKEY_S_MODE_STOPSIMULATION_SELECT
hotkey for stop simulation in SUMO and set select mode in netedit
Definition GUIAppEnum.h:63
@ MID_GNE_EDGE_ADD_REVERSE_DISCONNECTED
add reverse edge disconnected (used for for spreadtype center)
@ MID_GNE_EDGE_SPLIT_BIDI
split an edge
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWSUBADDITIONALS
show sub-additionals
Definition GUIAppEnum.h:831
@ MID_GNE_JUNCTION_REPLACE
turn junction into geometry node
@ MID_HOTKEY_SHIFT_C_LOCATECONTAINER
Locate container - button.
Definition GUIAppEnum.h:174
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLCONTAINERPLANS
show all container plans
Definition GUIAppEnum.h:883
@ MID_HOTKEY_SHIFT_V_LOCATEVEHICLE
Locate vehicle - button.
Definition GUIAppEnum.h:192
@ MID_GNE_VIEW_DEFAULT
set default view
Definition GUIAppEnum.h:783
@ MID_HOTKEY_F4_SUPERMODE_DATA
select data supermode in netedit
Definition GUIAppEnum.h:236
@ MID_HOTKEY_SHIFT_L_LOCATEPOLY
Locate polygons - button.
Definition GUIAppEnum.h:180
@ MID_GNE_LANE_REMOVE_BIKE
remove bikelane
@ MID_GNE_SHAPEEDITED_RESET
reset shape
@ MID_HOTKEY_SHIFT_E_LOCATEEDGE
Locate edge - button.
Definition GUIAppEnum.h:176
@ MID_GNE_VIEW_JUPEDSIM
set juPedSim view
Definition GUIAppEnum.h:785
@ MID_GNE_SHAPEEDITED_STRAIGHTEN
straighten shape edited geometry
@ MID_GNE_POI_TRANSFORM
Transform POI to POILane, and viceversa.
@ MID_GNE_LANE_RESET_OPPOSITELANE
reset opposite lane
@ MID_GNE_INTERVALBAR_PARAMETER
parameter changed in InterbalBar
Definition GUIAppEnum.h:927
@ MID_HOTKEY_R_MODE_CROSSING_ROUTE_EDGERELDATA
hotkey for mode editing crossing, routes and edge rel datas
Definition GUIAppEnum.h:65
@ MID_GNE_JUNCTION_CONVERT_ROUNDABOUT
convert junction to roundabout
@ MID_GNE_DATAVIEWOPTIONS_TAZDRAWFILL
toggle draw TAZ fill
Definition GUIAppEnum.h:905
@ MID_REACHABILITY
show reachability from a given lane
Definition GUIAppEnum.h:531
@ MID_HOTKEY_L_MODE_PERSONPLAN
hotkey for mode person plan
Definition GUIAppEnum.h:57
@ MID_GNE_EDGE_RESET_LENGTH
reset custom lengths
@ MID_HOTKEY_V_MODE_VEHICLE
hotkey for mode create vehicles
Definition GUIAppEnum.h:71
@ MID_HOTKEY_SHIFT_P_LOCATEPERSON
Locate person - button.
Definition GUIAppEnum.h:184
@ MID_HOTKEY_I_MODE_INSPECT
hotkey for mode inspecting object attributes
Definition GUIAppEnum.h:55
@ MID_GNE_LANE_REMOVE_BUS
remove busLane
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition GUIAppEnum.h:823
@ MID_HOTKEY_SHIFT_J_LOCATEJUNCTION
Locate junction - button.
Definition GUIAppEnum.h:178
@ MID_GNE_POLYGON_SELECT
select elements within polygon boundary
@ MID_GNE_JUNCTION_SPLIT_RECONNECT
turn junction into multiple junctions and reconnect them heuristically
@ MID_GNE_REVERSE
reverse current element
@ MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
Definition GUIAppEnum.h:469
@ MID_GNE_WALKINGAREA_EDIT_SHAPE
edit crossing shape
@ MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED
hide non-inspected demand element
Definition GUIAppEnum.h:873
@ MID_GNE_JUNCTION_EDIT_SHAPE
edit junction shape
@ MID_GNE_LANE_REMOVE_SIDEWALK
remove sidewalk
@ MID_GNE_SHAPEEDITED_OPEN
open closed shape edited
@ MID_GNE_EDGE_RESET_ENDPOINT
reset default geometry endpoints
@ MID_GNE_INTERVALBAR_GENERICDATATYPE
generic data selected
Definition GUIAppEnum.h:917
@ MID_GNE_LANE_ADD_GREENVERGE_BACK
add greenVerge back of current lane
@ MID_GNE_NETWORKVIEWOPTIONS_MERGEAUTOMATICALLY
don't ask before merging junctions
Definition GUIAppEnum.h:839
@ MID_GNE_EDGE_SMOOTH_ELEVATION
smooth elevation with regard to adjoining edges
@ MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES
change all phases
Definition GUIAppEnum.h:837
@ MID_GNE_DATAVIEWOPTIONS_SHOWSHAPES
show shapes
Definition GUIAppEnum.h:899
@ MID_HOTKEY_E_MODE_EDGE_EDGEDATA
hotkey for mode adding edges AND edgeDatas
Definition GUIAppEnum.h:51
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYFROM
toggle draw TAZRel only from
Definition GUIAppEnum.h:907
@ MID_GNE_EDGE_ADD_REVERSE
add reverse edge
@ MID_GNE_EDGE_APPLYTEMPLATE
apply template
@ MID_GNE_EDGE_USEASTEMPLATE
use edge as tempalte
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:819
@ MID_GNE_SHAPEEDITED_SIMPLIFY
simplify shape edited geometry
@ MID_GNE_DEMANDVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
Definition GUIAppEnum.h:871
@ MID_GNE_LANE_ADD_SIDEWALK
add sidewalk
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWOVERLAPPEDROUTES
show overlapped routes
Definition GUIAppEnum.h:887
@ MID_GNE_SHAPEEDITED_FINISH
finish editing shape edited
@ MID_GNE_RESET_GEOMETRYPOINT
reset geometry point
@ MID_GNE_CONNECTION_EDIT_SHAPE
edit connection shape
@ MID_GNE_SHAPEEDITED_CLOSE
close opened shape edited
@ MID_GNE_INTERVALBAR_DATASET
data set selected
Definition GUIAppEnum.h:919
@ MID_HOTKEY_SHIFT_T_LOCATETLS
Locate TLS - button.
Definition GUIAppEnum.h:190
@ MID_GNE_LANE_TRANSFORM_SIDEWALK
transform lane to sidewalk
@ MID_GNE_SHAPEEDITED_SET_FIRST_POINT
Set a vertex of shape edited as first vertex.
@ MID_GNE_LANE_ADD_BIKE
add bikelane
@ MID_HOTKEY_M_MODE_MOVE_MEANDATA
hotkey for mode moving element AND mean data
Definition GUIAppEnum.h:59
@ MID_HOTKEY_F2_SUPERMODE_NETWORK
select network supermode in netedit
Definition GUIAppEnum.h:232
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKCONTAINER
lock container
Definition GUIAppEnum.h:885
@ MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES
select edges
Definition GUIAppEnum.h:825
@ MID_GNE_EDGE_SPLIT
split an edge
@ MID_GNE_LANE_TRANSFORM_GREENVERGE
transform lane to greenVerge
@ MID_GNE_CUSTOM_GEOMETRYPOINT
set custom geometry point
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWTRIPS
show all trips
Definition GUIAppEnum.h:877
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEGRID
show grid
Definition GUIAppEnum.h:817
@ MID_GNE_INTERVALBAR_LIMITED
enable/disable show data elements by interval
Definition GUIAppEnum.h:921
@ MID_GNE_EDGE_EDIT_ENDPOINT
change default geometry endpoints
@ MID_GNE_POLYGON_DELETE_GEOMETRY_POINT
delete geometry point
@ MID_HOTKEY_P_MODE_POLYGON_PERSON
hotkey for mode creating polygons
Definition GUIAppEnum.h:61
@ MID_GNE_JUNCTION_ADDJOINTLS
Add join TLS into junctions.
@ MID_GNE_CROSSING_EDIT_SHAPE
edit crossing shape
@ MID_GNE_POLYGON_OPEN
open closed polygon
@ MID_GNE_POLYGON_SIMPLIFY_SHAPE
simplify polygon geometry
@ MID_REMOVESELECT
Remove from selected items - Menu Entry.
Definition GUIAppEnum.h:487
GUICompleteSchemeStorage gSchemeStorage
@ MOVEELEMENT
move element cursor
@ MOVEVIEW
move view cursor
@ SELECT_LANE
select lanecursor
@ DEFAULT
default cursor
@ SELECT
select cursor
@ DELETE_CURSOR
delete cursor
@ INSPECT_LANE
inspect lane cursor
@ INSPECT
inspect cursor
#define GUIDesignButtonPopup
checkable button placed in popup (for example, locate buttons)
Definition GUIDesigns.h:112
#define GUIDesignVerticalSeparator
vertical separator
Definition GUIDesigns.h:466
unsigned int GUIGlID
Definition GUIGlObject.h:44
GUIGlObjectType
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_WALKINGAREA
a walkingArea
@ GLO_TEMPORALSHAPE
temporal shape (used in netedit)
@ GLO_TESTELEMENT
test element (used in netedit)
@ GLO_JUNCTION
a junction
@ GLO_LANE
a lane
@ GLO_CONNECTION
a connection
@ GLO_EDGE
an edge
@ GLO_VEHICLE
a vehicle
@ GLO_TLLOGIC
a tl-logic
@ GLO_CROSSING
a tl-logic
GUIViewObjectsHandler gViewObjectsHandler
GUIViewUpdater gViewUpdater
@ LOCATEVEHICLE
@ LOCATEWALKINGAREA
@ LOCATEPERSON
@ LOCATECONTAINER
@ LOCATEJUNCTION
#define WRITE_WARNINGF(...)
Definition MsgHandler.h:288
#define WRITE_ERROR(msg)
Definition MsgHandler.h:296
#define WRITE_WARNING(msg)
Definition MsgHandler.h:287
#define TL(string)
Definition MsgHandler.h:305
#define TLF(string,...)
Definition MsgHandler.h:307
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_BUS
vehicle is a bus
@ SVC_PEDESTRIAN
pedestrian
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_DATAINTERVAL
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ GNE_TAG_EDGEREL_SINGLE
@ 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
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_CONNECTION
connectioon between two lanes
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_DATASET
@ GNE_TAG_JPS_OBSTACLE
polygon used for draw juPedSim obstacles
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ GNE_TAG_ROUTE_EMBEDDED
embedded route
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ GNE_TAG_JPS_WALKABLEAREA
polygon used for draw juPedSim walkable areas
@ SUMO_TAG_VIEWSETTINGS
@ SUMO_TAG_VIEWPORT
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_LANE
@ GNE_ATTR_OPPOSITE
to busStop (used by personPlans)
@ SUMO_ATTR_Y
@ SUMO_ATTR_X
@ GNE_ATTR_SELECTED
element is selected
@ SUMO_ATTR_CUSTOMSHAPE
whether a given shape is user-defined
@ SUMO_ATTR_POSITION_LAT
@ SUMO_ATTR_ZOOM
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
@ SUMO_ATTR_ANGLE
@ GNE_ATTR_SHAPE_END
last coordinate of edge shape
@ SUMO_ATTR_TLID
link,node: the traffic light id responsible for this link
@ SUMO_ATTR_FRIENDLY_POS
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_LENGTH
@ SUMO_ATTR_ID
@ GNE_ATTR_SHAPE_START
first coordinate of edge shape
@ SUMO_ATTR_POSITION
const double SUMO_const_laneWidth
Definition StdDefs.h:48
T MIN2(T a, T b)
Definition StdDefs.h:76
T MAX2(T a, T b)
Definition StdDefs.h:82
const unsigned char TLS[]
Definition TLS.cpp:22
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition Boundary.cpp:75
double ymin() const
Returns minimum y-coordinate.
Definition Boundary.cpp:127
double xmin() const
Returns minimum x-coordinate.
Definition Boundary.cpp:115
Boundary & grow(double by)
extends the boundary by the given amount
Definition Boundary.cpp:340
double ymax() const
Returns maximum y-coordinate.
Definition Boundary.cpp:133
double xmax() const
Returns maximum x-coordinate.
Definition Boundary.cpp:121
void addBoolAttribute(const SumoXMLAttr attr, const bool value)
add bool attribute into current SumoBaseObject node
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
Definition GLHelper.cpp:433
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition GLHelper.cpp:649
static void drawOutlineCircle(double radius, double iRadius, int steps=8)
Draws an unfilled circle around (0,0)
Definition GLHelper.cpp:591
static void drawFilledCircle(const double widradiusth, const int steps=8)
Draws a filled circle around (0,0)
Definition GLHelper.cpp:564
static void popMatrix()
pop matrix
Definition GLHelper.cpp:131
static void pushMatrix()
push matrix
Definition GLHelper.cpp:118
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
bool createPath(const bool useLastRoute)
create path
bool addAdditional(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add additional element
GNEViewObjectSelector * getViewObjetsSelector() const
get module for select view objects
virtual void openAdditionalDialog()
open Additional Dialog
GNEApplicationWindowHelper::EditMenuCommands & getEditMenuCommands()
get Edit Menu Commands (needed for show/hide menu commands)
bool allowInputSignals(FXObject *obj) const
check if ignore input signal (using during netedit tests)
GNEApplicationWindowHelper::ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void selectAttributeCarrier()
select attribute carrier using GUIGlobalSelection
void unselectAttributeCarrier()
unselect attribute carrier using GUIGlobalSelection
const std::string & getTagStr() const
get tag assigned to this object in string format
const std::string & getFilename() const
get filename in which save this AC
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
virtual GUIGlObject * getGUIGlObject()=0
void setNewParent(const GNEAttributeCarrier *AC)
set new parent
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void smootShape()
smoothShape
long onCmdSaveModifications(FXObject *, FXSelector, void *)
Called when the user presses the OK-Button saves any connection modifications.
long onCmdCancelModifications(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
ConnectionModifications * getConnectionModifications() const
get pointer to ConnectionModifications module
void handleLaneClick(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
either sets the current lane or toggles the connection of the
void drawTemporalConsecutiveLanePath() const
draw temporal consecutive lane path
void abortPathCreation()
abort path creation
void removeLastElement()
remove path element
GNEPlanCreator * getPlanCreator() const
get plan creator module
bool addContainer(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add vehicle element
void show()
show Frame
GNEPlanCreator * getPlanCreator() const
get plan creator module
bool addContainerPlanElement(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add container plan element
void processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const bool oppositeEdge, const bool chainEdge)
handle processClick and set the relative coloring
void abortEdgeCreation()
abort current edge creation
void show()
show create edge frame
const GNEJunction * getJunctionSource() const
get junction source for new edge
void clearEdgesHotkey()
clear edges (used when user press ESC key in Crossing mode)
void createCrossingHotkey()
create crossing (used when user press ENTER key in Crossing mode)
void addCrossing(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add Crossing element
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition GNECrossing.h:44
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
bool removeGeometryPoint(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
remove geometry point
DeleteOptions * getDeleteOptions() const
get delete options modul
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
void removeAttributeCarrier(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
remove attribute carrier (element)
void show()
show delete frame
void startDrawing()
start drawing
bool isDrawing() const
return true if currently a shape is drawed
bool getDeleteLastCreatedPoint()
get flag delete last created point
void abortDrawing()
abort drawing
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
void stopDrawing()
stop drawing and check if shape can be created
const PositionVector & getTemporalShape() const
get Temporal shape
bool addEdgeData(const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add additional element
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
void smooth(GNEUndoList *undoList)
make geometry smooth
Definition GNEEdge.cpp:2461
NBEdge * getNBEdge() const
returns the internal NBEdge
Definition GNEEdge.cpp:829
void smoothElevation(GNEUndoList *undoList)
smooth elevation with regard to adjoining edges
Definition GNEEdge.cpp:2473
std::vector< GNEEdge * > getOppositeEdges() const
get opposite edges
Definition GNEEdge.cpp:763
void copyTemplate(const GNEEdgeTemplate *edgeTemplate, GNEUndoList *undoList)
copy edge attributes from edgetemplate
Definition GNEEdge.cpp:1098
void editEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end, or remove current existent endpoint
Definition GNEEdge.cpp:851
Position getSplitPos(const Position &clickPos)
Definition GNEEdge.cpp:835
void straightenElevation(GNEUndoList *undoList)
interpolate z values linear between junctions
Definition GNEEdge.cpp:2378
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Definition GNEEdge.cpp:1290
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
Definition GNEEdge.cpp:903
bool addEdgeRelationData(const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add additional element
void focusUpperElement()
focus upper element of frame
Definition GNEFrame.cpp:114
virtual void show()
show Frame
Definition GNEFrame.cpp:120
GNEPathCreator * getPathCreator() const
get GNEPathCreator modul
Dialog to edit geometry points.
const GNEHierarchicalContainerParents< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const GNEHierarchicalContainerParents< GNEJunction * > & getParentJunctions() const
get parent junctions
void setEdgeTemplate(const GNEEdge *edge)
set edge template
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
TemplateEditor * getTemplateEditor() const
get template editor
bool inspectClickedElements(GNEViewNetHelper::ViewObjectsSelector &viewObjects, const Position &clickedPosition, const bool shiftKeyPressed)
process click over Viewnet
void show()
show inspector frame
GNEOverlappedInspection * getOverlappedInspection() const
get GNEOverlappedInspection modul
void clearInspection()
clear inspection
GNEAttributesEditor * getAttributesEditor() const
get AttributesEditor
void inspectElement(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousInspectedAC=nullptr)
Inspect a single element.
const std::vector< GNEEdge * > & getGNEIncomingEdges() const
Returns incoming GNEEdges.
std::string getAttribute(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Position getPositionInView() const
Returns position of hierarchical element in view.
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
NBNode * getNBNode() const
Return net build node.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
const PositionVector & getLaneShape() const
get elements shape
Definition GNELane.cpp:220
int getIndex() const
returns the index of the lane
Definition GNELane.cpp:650
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Definition GNELane.cpp:777
GNEEdge * getParentEdge() const
get parent edge
Definition GNELane.cpp:202
void show()
show Frame
virtual void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)=0
remove geometry point in the clicked position
void show()
show prohibition frame
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * >, std::hash< int > > & getDemandElements() const
get demand elements
GNETAZSourceSink * retrieveTAZSourceSink(const GNEAttributeCarrier *sourceSink, bool hardFail=true) const
Returns the named sourceSink.
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool hardFail=true) const
get a single attribute carrier based on a GLID
std::vector< GNEAdditional * > getSelectedShapes() const
get selected shapes
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEGenericData * >, std::hash< int > > & getGenericDatas() const
get all generic datas
GNECrossing * retrieveCrossing(const GUIGlObject *glObject, bool hardFail=true) const
get Crossing by AC
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
GNEWalkingArea * retrieveWalkingArea(const GUIGlObject *glObject, bool hardFail=true) const
get WalkingArea by GlObject
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
std::vector< GNELane * > getSelectedLanes() const
get selected lanes
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
std::vector< GNEJunction * > getSelectedJunctions() const
return selected junctions
GNEDataInterval * retrieveDataInterval(const GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the data interval.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
const std::unordered_map< const GUIGlObject *, GNELane * > & getLanes() const
get lanes
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
const std::map< std::string, GNEJunction * > & getJunctions() const
get junctions
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNEGenericData * retrieveGenericData(const GUIGlObject *glObject, bool hardFail=true) const
Returns the generic data.
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNEConnection * retrieveConnection(const std::string &id, bool hardFail=true) const
get Connection by id
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
Definition GNENet.cpp:461
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
Definition GNENet.cpp:640
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
Definition GNENet.cpp:697
SUMORTree & getGrid()
Returns the RTree used for visualisation speed-up.
Definition GNENet.cpp:196
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
Definition GNENet.cpp:715
void computeAndUpdate(OptionsCont &neteditOptions, bool volatileOptions)
recompute the network and update lane geometries
Definition GNENet.cpp:3022
GNEPathManager * getDataPathManager()
get data path manager
Definition GNENet.cpp:183
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
Definition GNENet.cpp:1117
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
Definition GNENet.cpp:2201
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
Definition GNENet.cpp:856
void setViewNet(GNEViewNet *viewNet)
Set the net to be notified of network changes.
Definition GNENet.cpp:1425
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
Definition GNENet.cpp:749
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
Definition GNENet.cpp:840
void deleteDataInterval(GNEDataInterval *dataInterval, GNEUndoList *undoList)
remove data interval
Definition GNENet.cpp:788
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
Definition GNENet.cpp:682
GNEPathManager * getDemandPathManager()
get demand path manager
Definition GNENet.cpp:177
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
Definition GNENet.cpp:2116
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition GNENet.cpp:230
void deleteGenericData(GNEGenericData *genericData, GNEUndoList *undoList)
remove generic data
Definition GNENet.cpp:801
std::pair< GNEJunction *, GNEEdge * > splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
Definition GNENet.cpp:976
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:147
GNEEdge * addReversedEdge(GNEEdge *edge, const bool disconnected, GNEUndoList *undoList)
add reversed edge
Definition GNENet.cpp:1133
void splitEdgesBidi(GNEEdge *edge, GNEEdge *oppositeEdge, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
Definition GNENet.cpp:1093
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, GNEUndoList *undoList)
remove restricted lane
Definition GNENet.cpp:962
void deleteTAZSourceSink(GNETAZSourceSink *TAZSourceSink, GNEUndoList *undoList)
remove TAZSourceSink
Definition GNENet.cpp:740
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, int index, GNEUndoList *undoList)
add restricted lane to edge
Definition GNENet.cpp:909
bool addGreenVergeLane(GNEEdge *edge, int index, GNEUndoList *undoList)
add restricted lane to edge
Definition GNENet.cpp:945
void deleteDataSet(GNEDataSet *dataSet, GNEUndoList *undoList)
remove data set
Definition GNENet.cpp:775
GNEPathManager * getNetworkPathManager()
get network path manager
Definition GNENet.cpp:171
void splitJunction(GNEJunction *junction, bool reconnect, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint
Definition GNENet.cpp:2019
void selectRoundabout(GNEJunction *junction, GNEUndoList *undoList)
select all roundabout edges and junctions for the current roundabout
Definition GNENet.cpp:1202
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
Definition GNENet.cpp:1974
void createRoundabout(GNEJunction *junction, GNEUndoList *undoList)
transform the given junction into a roundabout
Definition GNENet.cpp:1221
void requireRecompute()
inform the net about the need for recomputation
Definition GNENet.cpp:1601
void initGNEConnections()
initialize GNEConnections
Definition GNENet.cpp:3009
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
Definition GNENet.cpp:414
NBEdgeCont & getEdgeCont()
returns the NBEdgeCont of the underlying netbuilder
Definition GNENet.cpp:2207
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2195
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
Definition GNENet.cpp:2104
void computeDemandElements(GNEApplicationWindow *window)
compute demand elements param[in] window The window to inform about delay
Definition GNENet.cpp:1550
void closeShapeEdited(GNEUndoList *undoList)
close shape edited
void setFirstGeometryPointShapeEdited(const int index, GNEUndoList *undoList)
set first geometry point shape edited
void openShapeEdited(GNEUndoList *undoList)
open shape edited
int getGeometryPointUnderCursorShapeEdited() const
get index geometry point under cursor of shape edited
void simplifyShapeEdited(GNEUndoList *undoList)
simplify shape edited
void straigthenShapeEdited(GNEUndoList *undoList)
straigthen shape edited
void deleteGeometryPointShapeEdited(const int index, GNEUndoList *undoList)
delete geometry point shape edited
void resetShapeEdited(GNEUndoList *undoList)
reset shape edited
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
long onCmdCreatePath(FXObject *, FXSelector, void *)
void abortPathCreation()
abort path creation
void removeLastElement()
remove path element
bool createPath(const bool useLastRoute)
create path
void drawTemporalRoute(const GUIVisualizationSettings &s) const
draw temporal route
void calculateReachability(const SUMOVehicleClass vClass, GNEEdge *originEdge)
calculate reachability for given edge
void clearPathDraw()
clear path draw
PathCalculator * getPathCalculator()
obtain instance of PathCalculator
PathDraw * getPathDraw()
obtain instance of PathDraw
void redrawPathElements(const GUIVisualizationSettings &s) const
redraw path elements saved in gViewObjectsHandler buffer
void show()
show Frame
GNEPlanCreator * getPlanCreator() const
get plan creator module
GNEPlanSelector * getPlanSelector() const
get personPlan selector
bool addPerson(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add vehicle element
bool addPersonPlanElement(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add person plan element
GNEPlanCreator * getPlanCreator() const
get plan creator module
GNEPlanSelector * getPlanSelector() const
get personPlan selector
void removeLastElement()
remove path element
long onCmdCreatePath(FXObject *, FXSelector, void *)
void abortPathCreation()
abort path creation
void drawTemporalRoute(const GUIVisualizationSettings &s) const
draw temporal route
const GNETagProperties * getCurrentPlanTagProperties() const
get current plan tag properties
int getVertexIndex(Position pos, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge
Definition GNEPoly.cpp:345
void closePolygon(bool allowUndo=true)
close polygon
Definition GNEPoly.cpp:424
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
Definition GNEPoly.cpp:445
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
Definition GNEPoly.cpp:361
CommonXMLStructure::SumoBaseObject * getSumoBaseObject() const
get SUMOBaseObject with all polygon attributes
Definition GNEPoly.cpp:517
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
Definition GNEPoly.cpp:485
void openPolygon(bool allowUndo=true)
open polygon
Definition GNEPoly.cpp:403
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any prohibition modifications.
void handleProhibitionClick(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
handle prohibitions and set the relative coloring
GNEProhibitionFrame::Selection * getSelectionModul() const
get selection module
void show()
show prohibition frame
GNEDistributionFrame::DistributionSelector * getDistributionSelector() const
get route distribution selector
void show()
show delete frame
GNEPathCreator * getPathCreator() const
get path creator module
bool addEdgeRoute(GNEEdge *clickedEdge, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add route edge
static void addReverse(GNEDemandElement *element)
add reverse for given demand element
static void reverse(GNEDemandElement *element)
reverse given demand element
void show()
show Frame
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
bool selectAttributeCarrier(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
select attribute carrier (element)
void show()
show Frame
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects, bool &updateTemporalShape)
process click over Viewnet
GNEDrawingShape * getDrawingShapeModule() const
get drawing mode editor
void show()
show Frame
bool addStop(const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add Stop element
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
GNETAZ * getTAZ() const
get current TAZ
bool isChangesPending() const
return true if there is changes to save
long onCmdSaveChanges(FXObject *, FXSelector, void *)
TAZSaveChanges * getTAZSaveChangesModule() const
get TAZ Save Changes modul
GNEDrawingShape * getDrawingShapeModule() const
get drawing mode modul
CurrentTAZ * getCurrentTAZModule() const
get Current TAZ modul
void show()
show TAZ Frame
void processEdgeSelection(const std::vector< GNEEdge * > &edges)
process selection of edges in view net
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click over Viewnet
bool setTAZ(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
set clicked TAZ
void buildTAZRelationData()
build TAZRelation data
void clearTAZSelection()
clear TAZ selection
bool isSetDetectorsToggleButtonEnabled() const
toggle button for set detectors mode
void disableE1DetectorMode()
disable detector mode
const std::map< std::string, std::string > & getE1Detectors() const
get E1 detectors vinculated with this TLS
bool checkHaveModifications() const
check if current TLS was modified
long onCmdSaveChanges(FXObject *, FXSelector, void *)
Called when the user presses the save-Button.
void discardChanges(const bool editJunctionAgain)
discard changes
const std::vector< std::string > & getSelectedJunctionIDs() const
get selected junction IDs
long onCmdCancelJoin(FXObject *, FXSelector, void *)
cancel join
long onCmdAcceptJoin(FXObject *, FXSelector, void *)
accept join
GNEJunction * getCurrentJunction() const
get current modified junction
bool isJoiningJunctions() const
is joining junctions
GNETLSEditorFrame::TLSAttributes * getTLSAttributes() const
get module for TLS attributes
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
GNETLSEditorFrame::TLSJunction * getTLSJunction() const
get module for TLS Junction
void editTLS(GNEViewNetHelper::ViewObjectsSelector &viewObjects, const Position &clickedPosition, const bool shiftKeyPressed)
edits the traffic light for the given clicked junction
GNETLSEditorFrame::TLSDefinition * getTLSDefinition() const
get module for TLS Definition
void show()
show inspector frame
bool isContainer() const
return true if tag correspond to a container element
bool planRoute() const
return true if tag correspond to a plan placed over route
bool isPlacedInRTree() const
return true if Tag correspond to an element that has to be placed in RTREE
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
bool isPerson() const
return true if tag correspond to a person element
GNEDistributionFrame::DistributionSelector * getDistributionSelector() const
get type distribution selector
void show()
show Frame
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...
void abortAllChangeGroups()
reverts and discards ALL active chained change groups
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
GNEPathCreator * getPathCreator() const
get GNEPathCreator module
void show()
show Frame
bool addVehicle(const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add vehicle element
class used for group inspected elements
bool isInspectingElements() const
check if we're inspecting at least one element
const std::unordered_set< GNEAttributeCarrier * > & getACs() const
get hash table with all inspected ACs
GNEAttributeCarrier * getFirstAC() const
class used to group all variables related to interval bar
void hideIntervalBar()
hide all options menu checks
void setGenericDataType()
set generic data type
void showIntervalBar()
show interval option bar
void buildIntervalBarElements()
build interval bar elements
void setInterval()
update limit by interval
void updateLockMenuBar()
update lock inspect menuBar
bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const
check if given GLObject is locked for inspect, select, delete and move
class used for group front elements
void unmarkAC(GNEAttributeCarrier *AC)
unmark AC for drawing front
const std::unordered_set< GNEAttributeCarrier * > & getACs() const
get hash table with all fronted ACs
class used to group all variables related with objects under cursor after a click over view
void updateObjects()
update objects (using gViewObjectsHandler)
void filterConnections()
filter (remove) connections
void updateMergingJunctions()
update merging junctions
GNEConnection * getConnectionFront() const
get front connection or a pointer to nullptr
const std::vector< GNEAttributeCarrier * > & getAttributeCarriers() const
get vector with ACs
void filterEdges()
filter (remove) edges
void filterLockedElements(const std::vector< GUIGlObjectType > ignoreFilter={})
filter locked elements (except the ignoreFilter)
void filterCrossings()
filter (remove) crossings
GNEPOI * getPOIFront() const
get front POI or a pointer to nullptr
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
void filterDemandElements(const bool includeRoutes)
filter (remove) demand elements
void filterWalkingAreas()
filter (remove) walkingAreas
void filterAdditionals(const bool includeStoppigPlaces, const bool includeTAZs)
filter (remove) additionals
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
GNELane * getLaneFrontNonLocked() const
get front lane or a pointer to nullptr checking if is locked
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
GNENetworkElement * getNetworkElementFront() const
get front network element or a pointer to nullptr
void filterLanes()
filter (remove) lanes
const std::vector< GUIGlObject * > & getGLObjects() const
get vector with GL objects
void filterShapes()
filter (remove) polys and POIs
GNEViewNetHelper::EditNetworkElementShapes myEditNetworkElementShapes
struct for grouping all variables related with edit shapes
Definition GNEViewNet.h:715
long onCmdToggleShowDemandElementsNetwork(FXObject *, FXSelector, void *)
toggle show demand elements (network)
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
bool isCurrentlyMovingElements() const
check if an element is being moved
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
void processMoveMouseNetwork(const bool mouseLeftButtonPressed)
process move mouse function in Supermode Network
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
GNENet * getNet() const
get the net object
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
long onCmdEdgeUseAsTemplate(FXObject *, FXSelector, void *)
use edge as template
long onCmdSmoothConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
GNEViewNetHelper::CommonCheckableButtons myCommonCheckableButtons
variable used to save checkable buttons for common supermodes
Definition GNEViewNet.h:645
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
void hotkeyBackSpace()
handle backspace keypress
GNEViewNetHelper::MarkFrontElements myMarkFrontElements
front element
Definition GNEViewNet.h:724
GNEDemandElement * myLastCreatedRoute
last created route
Definition GNEViewNet.h:739
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
long onCmdAddSelected(FXObject *, FXSelector, void *)
select AC under cursor
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
GNEAllowVClassesDialog * getAllowVClassesDialog() const
get allow vClasses dialog
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
void buildViewToolBars(GUIGlChildWindow *v)
builds the view toolbars
void updateNetworkModeSpecificControls()
updates Network mode specific controls
long onCmdAddTLS(FXObject *, FXSelector, void *)
add TLS
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
void updateCursor()
update cursor after every click/key press/release
void updateDataModeSpecificControls()
updates Data mode specific controls
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
long onCmdToggleShowDemandElementsData(FXObject *, FXSelector, void *)
toggle show demand elements (data)
GNEViewNetHelper::EditModes myEditModes
variable used to save variables related with edit moves modes
Definition GNEViewNet.h:626
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
bool restrictLane(GNELane *lane, SUMOVehicleClass vclass)
restrict lane
long onCmdSplitJunction(FXObject *, FXSelector, void *)
split junction into multiple junctions
void drawGrid() const
draw grid and update grid button
void deleteDemandAttributeCarrier(const GNEAttributeCarrier *AC)
delete given demand attribute carriers
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
void abortOperation(bool clearSelection=true)
abort current edition operation
long onCmdToggleTAZDrawFill(FXObject *, FXSelector, void *)
toggle TAZdrawFill
long onCmdResetEndPoints(FXObject *, FXSelector, void *)
reset edge end points
void updateObjectsInPosition(const Position &pos)
update objects and boundaries in position
GNEViewNetHelper::TestingMode myTestingMode
variable used to save variables related with testing mode
Definition GNEViewNet.h:629
GNEDemandElement * getLastCreatedRoute() const
get last created route
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
long onCmdToggleDrawSpreadVehicles(FXObject *, FXSelector, void *)
toggle draw vehicles in begin position or spread in lane
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
GNEViewNetHelper::SelectingArea mySelectingArea
variable used for grouping all variables related with selecting areas
Definition GNEViewNet.h:712
GNENetworkElement * getShapeEditedAtPopupPosition()
try to retreive a edited shape at popup position
const GNEViewNetHelper::MoveSingleElementModul & getMoveSingleElementValues() const
get move single element values
long onCmdToggleShowConnections(FXObject *, FXSelector, void *)
toggle show connections
long onCmdLaneReachability(FXObject *, FXSelector sel, void *)
show lane reachability
long onCmdToggleShowTAZElements(FXObject *, FXSelector, void *)
toggle show TAZ elements
GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons
variable used to save checkable buttons for Supermode Network
Definition GNEViewNet.h:648
long onCmdCloseShapeEdited(FXObject *, FXSelector, void *)
close opened shape edited
std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
bool myCreatedPopup
flag for mark if during this frame a popup was created (needed to avoid problems in linux with Cursor...
Definition GNEViewNet.h:745
void openSelectDialogAtCursor(const std::vector< GUIGlObject * > &GLObjects)
open select dialog at cursor
long onCmdSimplifyShapeEdited(FXObject *, FXSelector, void *)
void openObjectDialogAtCursor(const FXEvent *ev)
open object dialog
void processClick(void *eventData)
Auxiliary function used by onLeftBtnPress(...)
void drawNeteditAttributesReferences()
draw circle in testing mode (needed for grid)
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
GNEViewNetHelper::MouseButtonKeyPressed myMouseButtonKeyPressed
variable used to save key status after certain events
Definition GNEViewNet.h:637
bool askMergeJunctions(const GNEJunction *movedJunction, const GNEJunction *targetJunction, bool &alreadyAsked)
ask merge junctions
void recalculateBoundaries()
recalculate boundaries
GNEViewNetHelper::IntervalBar myIntervalBar
variable used to save IntervalBar
Definition GNEViewNet.h:673
GNEViewParent * myViewParent
view parent
Definition GNEViewNet.h:727
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
bool changeAllPhases() const
change all phases
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
long onCmdToggleMoveElevation(FXObject *, FXSelector, void *)
toggle move elevation
GNEWalkingArea * getWalkingAreaAtPopupPosition()
try to retrieve a walkingArea at popup position
long onCmdToggleShowAllPersonPlans(FXObject *, FXSelector, void *)
toggle show all person plans in super mode demand
bool setColorScheme(const std::string &name)
set color scheme
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
long onCmdToggleTAZRelOnlyTo(FXObject *, FXSelector, void *)
toggle TAZRez only to
long onCmdEgeApplyTemplate(FXObject *, FXSelector, void *)
apply template to edge
long onCmdSetNeteditView(FXObject *, FXSelector sel, void *)
called when a new view is set
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
void hotkeyFocusFrame()
handle focus frame keypress
long onCmdToggleChainEdges(FXObject *, FXSelector, void *)
toggle chain edges
GNEViewNetHelper::DemandViewOptions myDemandViewOptions
variable used to save variables related with view options in supermode Demand
Definition GNEViewNet.h:665
void drawTemporalJunctionTLSLines() const
draw temporal Junction TLS Lines
std::vector< std::string > getEdgeLaneParamKeys(bool edgeKeys) const
return list of available edge parameters
long onCmdLaneOperation(FXObject *, FXSelector sel, void *)
add/remove/restrict lane
void processMoveMouseData(const bool mouseLeftButtonPressed)
process move mouse function in Supermode Data
GNEFrame * myCurrentFrame
the current frame
Definition GNEViewNet.h:733
bool autoSelectNodes()
whether to autoselect nodes or to lanes
void drawTemporalRoundabout() const
draw temporal roundabout
void deleteDataAttributeCarrier(const GNEAttributeCarrier *AC)
delete data attribute carriers
long onCmdToggleLockContainer(FXObject *, FXSelector, void *)
toggle lock container in super mode demand
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
Definition GNEViewNet.h:736
GNEViewNetHelper::NetworkViewOptions myNetworkViewOptions
variable used to save variables related with view options in supermode Network
Definition GNEViewNet.h:662
void doInit()
called after some features are already initialized
long onCmdResetEdgeEndPoints(FXObject *, FXSelector, void *)
edit junction shape
void buildEditModeControls()
create edit mode buttons and elements
GNEViewNetHelper::MoveSingleElementModul myMoveSingleElement
modul used for moving single element
Definition GNEViewNet.h:679
long onMiddleBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
int getDrawingToggle() const
get draw toggle (used to avoid drawing junctions twice)
GNEViewNetHelper::DataCheckableButtons myDataCheckableButtons
variable used to save checkable buttons for Supermode Data
Definition GNEViewNet.h:654
long onCmdToggleShowGrid(FXObject *, FXSelector, void *)
toggle show grid
void processLeftButtonPressDemand(void *eventData)
process left button press function in Supermode Demand
GNEAllowVClassesDialog * myAllowVClassesDialog
allowVClasses dialog
Definition GNEViewNet.h:701
GNEDemandElement * getDemandElementAtPopupPosition()
try to retrieve a demand element at popup position
GNEViewNetHelper::TimeFormat myTimeFormat
variable used for grouping all variables related with switch time
Definition GNEViewNet.h:709
long onLeaveConvertRoundabout(FXObject *, FXSelector, void *)
leave to convert junction to roundabout
GNEViewNetHelper::IntervalBar & getIntervalBar()
get interval bar
long onCmdEditLaneShape(FXObject *, FXSelector, void *)
edit lane shape
GNEViewNetHelper::MarkFrontElements & getMarkFrontElements()
get marked for drawing front elements
long onCmdToggleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toggle hide non inspected demand elements
GNEViewParent * getViewParent() const
get the net object
long onCmdToggleDrawJunctionShape(FXObject *, FXSelector, void *)
toggle draw junction shape
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
long onCmdStraightenShapeEdited(FXObject *, FXSelector, void *)
straight shape edited
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
void processLeftButtonReleaseNetwork()
process left button release function in Supermode Network
long onCmdDeleteGeometryPointShapeEdited(FXObject *, FXSelector, void *)
delete the closes geometry point in shape edited
bool checkSelectEdges() const
check if select edges (toggle using button or shift)
long onMiddleBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's left button
long onCmdAddReversedEdgeDisconnected(FXObject *, FXSelector, void *)
add reversed edge disconnected
long onCmdIntervalBarGenericDataType(FXObject *, FXSelector, void *)
change generic data type in interval bar
long onCmdConvertRoundabout(FXObject *, FXSelector, void *)
convert junction to roundabout
long onCmdRemoveEdgeSelected(FXObject *, FXSelector, void *)
unselect Edge under cursor
long onCmdAddReverse(FXObject *, FXSelector, void *)
add a reverse demand element
long onCmdToggleShowShapes(FXObject *, FXSelector, void *)
toggle show shapes in super mode data
long onCmdToggleMergeAutomatically(FXObject *, FXSelector, void *)
toggle warn for merge
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
GNEViewNetHelper::InspectedElements myInspectedElements
inspected element
Definition GNEViewNet.h:721
long onCmdSetCustomGeometryPoint(FXObject *, FXSelector, void *)
set custom geometry point
bool removeRestrictedLane(GNELane *lane, SUMOVehicleClass vclass)
remove restricted lane
long onCmdIntervalBarDataSet(FXObject *, FXSelector, void *)
change data set in interval bar
GNEViewNetHelper::SaveElements & getSaveElements()
get variable used to save elements
void processLeftButtonReleaseDemand()
process left button release function in Supermode Demand
const GNEViewNetHelper::TestingMode & getTestingMode() const
get testing mode
GNEUndoList * getUndoList() const
get the undoList object
void processLeftButtonPressData(void *eventData)
process left button press function in Supermode Data
long onCmdTransformPOI(FXObject *, FXSelector, void *)
transform POI to POILane, and vice versa
void saveVisualizationSettings() const
GNEViewNetHelper::SaveElements mySaveElements
variable used for grouping all variables related with salve elements
Definition GNEViewNet.h:706
const GNEViewNetHelper::MoveMultipleElementModul & getMoveMultipleElementValues() const
get move multiple element values
void deleteNetworkAttributeCarrier(const GNEAttributeCarrier *AC)
delete given network attribute carriers
GNEViewNetHelper::LockManager myLockManager
lock manager
Definition GNEViewNet.h:718
long onCmdAddEdgeSelected(FXObject *, FXSelector, void *)
select Edge under cursor
long onCmdIntervalBarSetEnd(FXObject *, FXSelector, void *)
change end in interval bar
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
void drawTemporalDrawingShape() const
draw temporal polygon shape in Polygon Mode
void setLastCreatedRoute(GNEDemandElement *lastCreatedRoute)
set last created route
void drawTestsCircle() const
draw circle in testing mode (needed for grid)
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
long onCmdAddJoinTLS(FXObject *, FXSelector, void *)
add Join TLS
GUIGlID getToolTipID()
returns the id of object under cursor to show their tooltip
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
void drawTemporalSplitJunction() const
draw temporal split junction in create edge mode
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
long onCmdToggleExtendSelection(FXObject *, FXSelector, void *)
toggle extend selection
long onCmdTriangulatePolygon(FXObject *, FXSelector, void *)
triangulate polygon
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
Definition GNEViewNet.h:651
bool aksChangeSupermode(const std::string &operation, Supermode expectedSupermode)
ask about change supermode
GNETAZ * getTAZAtPopupPosition()
try to retrieve a TAZ at popup position
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
long onCmdIntervalBarSetBegin(FXObject *, FXSelector, void *)
change begin in interval bar
long onCmdResetLength(FXObject *, FXSelector, void *)
reset custom edge lengths
long onCmdSelectPolygonElements(FXObject *, FXSelector, void *)
select elements within polygon boundary
long onCmdSetFirstGeometryPointShapeEdited(FXObject *, FXSelector, void *)
set first geometry point in shape edited
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
unselect AC under cursor
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
void processLeftButtonPressNetwork(void *eventData)
mouse process functions
void hotkeyEnter()
handle enter keypress
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
long onCmdOpenShapeEdited(FXObject *, FXSelector, void *)
open closed shape edited
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
long onCmdToggleShowOverlappedRoutes(FXObject *, FXSelector, void *)
toggle hide non inspected demand elements
long onCmdToggleAutoOppositeEdge(FXObject *, FXSelector, void *)
toggle autoOpposite edge
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
GNEViewNetHelper::LockManager & getLockManager()
get lock manager
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
void updateControls()
update control contents after undo/redo or recompute
~GNEViewNet()
destructor
GNEViewNetHelper::MoveMultipleElementModul myMoveMultipleElements
modul used for moving multiple elements
Definition GNEViewNet.h:682
long onCmdSplitJunctionReconnect(FXObject *, FXSelector, void *)
split junction into multiple junctions and reconnect them
long onCmdFinishShapeEdited(FXObject *, FXSelector, void *)
finish shape edited
void hotkeyDel()
handle del keypress
long onCmdToggleChangeAllPhases(FXObject *, FXSelector, void *)
toggle change all phases
long onEnterConvertRoundabout(FXObject *, FXSelector, void *)
enter to convert junction to roundabout
bool myDrawPreviewRoundabout
draw preview roundabout
Definition GNEViewNet.h:742
void redrawPathElementContours()
redraw elements only for calculating boundary
GNEViewNet()
FOX needs this.
long onCmdToggleTAZRelDrawing(FXObject *, FXSelector, void *)
toggle TAZRel drawing
long onCmdToggleShowJunctionBubbles(FXObject *, FXSelector, void *)
toggle show junction bubbles
bool selectingDetectorsTLSMode() const
check if we're selecting detectors in TLS mode
bool selectingJunctionsTLSMode() const
check if we're selecting junctions in TLS mode
long onCmdToggleShowAdditionalSubElements(FXObject *, FXSelector, void *)
toggle show additional sub-elements
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
long onCmdToggleShowAllContainerPlans(FXObject *, FXSelector, void *)
toggle show all container plans in super mode demand
long onCmdResetJunctionShape(FXObject *, FXSelector, void *)
reset junction shape
long onCmdToggleTAZRelOnlyFrom(FXObject *, FXSelector, void *)
toggle TAZRez only from
long onCmdResetShapeEdited(FXObject *, FXSelector, void *)
reset shape edited
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
void buildColorRainbow(const GUIVisualizationSettings &s, GUIColorScheme &scheme, int active, GUIGlObjectType objectType, const GUIVisualizationRainbowSettings &rs)
recalibrate color scheme according to the current value range
long onCmdIntervalBarSetParameter(FXObject *, FXSelector, void *)
change parameter in interval bar
void drawTemporalE1TLSLines() const
draw temporal E1 TLS Lines
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
void processLeftButtonReleaseData()
process left button release function in Supermode Data
long onCmdToggleShowAdditionals(FXObject *, FXSelector, void *)
toggle show additionals in super mode data
long onCmdToggleLockPerson(FXObject *, FXSelector, void *)
toggle lock person in super mode demand
GNEViewNetHelper::TimeFormat & getTimeFormat()
get variable used to switch between time formats
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
Definition GNEViewNet.h:730
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position
long onCmdToggleSelectEdges(FXObject *, FXSelector, void *)
toggle select edges
GNEViewNetHelper::DataViewOptions myDataViewOptions
variable used to save variables related with view options in supermode Data
Definition GNEViewNet.h:668
int myDrawingToggle
drawin toggle (used in drawGLElements to avoid draw elements twice)
Definition GNEViewNet.h:748
long onCmdToggleShowTrips(FXObject *, FXSelector, void *)
toggle show all trips in super mode demand
long onCmdToggleHideShapes(FXObject *, FXSelector, void *)
toggle hide shapes in super mode demand
long onCmdEditEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
long onCmdToggleHideConnections(FXObject *, FXSelector, void *)
toggle hide connections
void openDeleteDialogAtCursor(const std::vector< GUIGlObject * > &GLObjects)
open delete dialog at cursor
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
long onCmdResetLaneCustomShape(FXObject *, FXSelector, void *)
reset custom shapes of selected lanes
bool addRestrictedLane(GNELane *lane, SUMOVehicleClass vclass, const bool insertAtFront)
add restricted lane
void setStatusBarText(const std::string &text)
set statusBar text
long onCmdEditWalkingAreaShape(FXObject *, FXSelector, void *)
edit walkingArea shape
void processMoveMouseDemand(const bool mouseLeftButtonPressed)
process move mouse function in Supermode Demand
long onCmdResetOppositeLane(FXObject *, FXSelector, void *)
reset oppositeLane of current lane
void setSelectorFrameScale(double selectionScale)
set selection scaling (in GNESelectorFrame)
void viewUpdated()
called when view is updated
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
void updateObjectsInShape(const PositionVector &shape)
get objects in the given shape (using triangulation)
void updateDemandModeSpecificControls()
updates Demand mode specific controls
void forceSupemodeNetwork()
force supermode network(used after load/create new network)
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
long onCmdReverse(FXObject *, FXSelector, void *)
reverse current demand element
void drawTemporalJunction() const
draw temporal junction in create edge mode
long onCmdSelectRoundabout(FXObject *, FXSelector, void *)
select all roundabout nodes and edges
long onLeftBtnPress(FXObject *, FXSelector, void *)
void updateViewNet(const bool ignoreViewUpdater=true) const
Mark the entire GNEViewNet to be repainted later.
int doPaintGL(int mode, const Boundary &drawingBoundary)
do paintGL
std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
int drawGLElements(const Boundary &bound)
draw functions
long onCmdIntervalBarLimit(FXObject *, FXSelector, void *)
change limit interval in interval bar
GNEViewNetHelper::ViewObjectsSelector myViewObjectsSelector
variable use to select objects in view
Definition GNEViewNet.h:620
void clearSelection()
clear selection
A single child window which contains a view of the simulation area.
GNECrossingFrame * getCrossingFrame() const
get frame for NETWORK_CROSSING
GNEConnectorFrame * getConnectorFrame() const
get frame for NETWORK_CONNECT
GNEStopFrame * getStopFrame() const
get frame for DEMAND_STOP
GNEProhibitionFrame * getProhibitionFrame() const
get frame for NETWORK_PROHIBITION
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for DEMAND_PERSONFRAME
GNEMeanDataFrame * getMeanDataFrame() const
get frame for DATA_TAZRELDATA
GNEShapeFrame * getShapeFrame() const
get frame for NETWORK_SHAPE
GNETAZRelDataFrame * getTAZRelDataFrame() const
get frame for DATA_TAZRELDATA
GNEMoveFrame * getMoveFrame() const
get frame for move elements
GNESelectorFrame * getSelectorFrame() const
get frame for select elements
GNEContainerPlanFrame * getContainerPlanFrame() const
get frame for DEMAND_CONTAINERFRAME
GNEEdgeDataFrame * getEdgeDataFrame() const
get frame for DATA_EDGEDATA
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
GNETypeDistributionFrame * getTypeDistributionFrame() const
get frame for DEMAND_TYPEDISTRIBUTION
GNEVehicleFrame * getVehicleFrame() const
get frame for DEMAND_VEHICLE
GNEDecalFrame * getDecalFrame() const
get frame for NETWORK_DECAL
void hideAllFrames()
hide all frames
GNETypeFrame * getTypeFrame() const
get frame for DEMAND_TYPE
GNETAZFrame * getTAZFrame() const
get frame for NETWORK_TAZ
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for NETWORK_TLS
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNEContainerFrame * getContainerFrame() const
get frame for DEMAND_CONTAINER
GNEAdditionalFrame * getAdditionalFrame() const
get frame for NETWORK_ADDITIONAL
GNERouteDistributionFrame * getRouteDistributionFrame() const
get frame for DEMAND_ROUTEDISTRIBUTION
GNEWireFrame * getWireFrame() const
get frame for NETWORK_WIRE
GNEPersonFrame * getPersonFrame() const
get frame for DEMAND_PERSON
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
GNEEdgeRelDataFrame * getEdgeRelDataFrame() const
get frame for DATA_EDGERELDATA
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for NETWORK_CREATEEDGE
GNERouteFrame * getRouteFrame() const
get frame for DEMAND_ROUTE
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
bool createPath(const bool useLastRoute)
create path
void show()
show wire frame
bool addWire(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add wire element
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
Dialog for edit rerouter intervals.
static FXCursor * getCursor(GUICursor which)
returns a cursor previously defined in the enum GUICursor
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
static void drawChildLine(const GUIVisualizationSettings &s, const Position &child, const Position &parent, const RGBColor &color, const bool drawEntire, const double lineWidth)
draw line between child and parent (used in netedit)
void updateGeometry(const PositionVector &shape)
update entire geometry
MFXComboBoxIcon * getColoringSchemesCombo()
return combobox with the current coloring schemes (standard, fastest standard, real world....
FXPopup * getLocatorPopup()
@ brief return a pointer to locator popup
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual bool isGLObjectLocked() const
check if element is locked (Currently used only in netedit)
GUIGlID getGlID() const
Returns the numerical id of the object.
GUIGlObject * getObjectBlocking(GUIGlID id) const
Returns the object from the container locking it.
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
MFXStaticToolTip * getStaticTooltipMenu() const
get static toolTip for menus
virtual void setStatusBarText(const std::string &)
get status bar text (can be implemented in children)
virtual double getRotation() const =0
Returns the rotation of the canvas stored in this changer.
virtual double getZoom() const =0
Returns the zoom factor computed stored in this changer.
virtual void onLeftBtnPress(void *data)
mouse functions
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
T getColor(const double value) const
const std::string & getName() const
int addColor(const T &color, const double threshold, const std::string &name="")
bool myAmInitialised
Internal information whether doInit() was called.
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
std::vector< GUIGlObject * > myCurrentObjectsDialog
vector with current objects dialog
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
const SUMORTree * myGrid
The visualization speed-up.
void openObjectDialog(const std::vector< GUIGlObject * > &objects, const bool filter=true)
open object dialog for the given object
void paintGLGrid() const
paints a grid
FXbool makeCurrent()
A reimplementation due to some internal reasons.
Position myClickedPopupPosition
clicked poup position
void buildMinMaxRainbow(const GUIVisualizationSettings &s, GUIColorScheme &scheme, const GUIVisualizationRainbowSettings &rs, double minValue, double maxValue, bool hasMissingData)
helper function for buildColorRainbow
virtual long onMiddleBtnRelease(FXObject *, FXSelector, void *)
virtual long onMouseMove(FXObject *, FXSelector, void *)
bool myPanning
Panning flag.
GUIMainWindow * myApp
The application.
std::vector< GUIGlID > getObjectsInBoundary(Boundary bound)
returns the ids of all objects in the given boundary
const Position & getPopupPosition() const
get position of current popup
double m2p(double meter) const
meter-to-pixels conversion method
GUIVisualizationSettings * myVisualizationSettings
visualization settings
void destroyPopup()
destroys the popup
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
virtual long onMiddleBtnPress(FXObject *, FXSelector, void *)
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
GUIDialog_ViewSettings * myGUIDialogViewSettings
Visualization changer.
void drawDecals()
Draws the stored decals.
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
GUIPerspectiveChanger * myChanger
The perspective changer.
GUIGLObjectPopupMenu * myPopup
The current popup-menu.
virtual long onPaint(FXObject *, FXSelector, void *)
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
void openPopupDialog()
open popup dialog
static void resetTextures()
Reset textures.
void setSelectionPosition(const Position &pos)
set selection position
void addToRedrawPathElements(const GNEPathElement *pathElement)
add path element to redrawing set
void reverseSelectedObjects()
reverse selected objects
void isolateEdgeGeometryPoints()
isolate edge geometry points (used for moving)
void reset()
reset view objects handler
void setSelectionTriangle(const Triangle &triangle)
set selection triangle
const GLObjectsSortedContainer & getSelectedObjects() const
get all elements under cursor sorted by layer
const GNEEdge * markedEdge
marked edge (used in create edge mode, for splitting)
void updateFrontObject(const GUIGlObject *GLObject)
move the given object to the front (currently used only in netedit)
bool allowUpdate()
allow update
Stores the information about how to visualize structures.
GUIVisualizationSizeSettings junctionSize
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
std::string name
The name of this setting.
bool drawJunctionShape
whether the shape of the junction should be drawn
bool disableLaneIcons
whether drawing is performed in left-hand networks
bool lefthand
whether drawing is performed in left-hand networks
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
GUIVisualizationColorSettings colorSettings
color settings
bool showGrid
Information whether a grid shall be shown.
void save(OutputDevice &dev) const
Writes the settings into an output device.
double scale
information about a lane's width (temporary, used for a single view)
void updateIgnoreHideByZoom()
update ignore hide by zoom (call BEFORE drawing all elements).
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
double selectorFrameScale
the current selection scaling in netedit (set in SelectorFrame)
GUIColorer junctionColorer
The junction colorer.
static const std::string SCHEME_NAME_PERMISSION_CODE
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
bool amChecked() const
check if this MFXCheckableButton is checked
void setChecked(bool val, const bool inform=false)
check or uncheck this MFXCheckableButton
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint getNumItems() const
Return the number of items in the list.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon item in the last position
EdgeVector getAllEdges() const
return all edges
The representation of a single edge during network building.
Definition NBEdge.h:92
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition NBEdge.h:783
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
Definition NBEdge.cpp:590
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node (The set of tls that control this node)
Definition NBNode.h:340
const Position & getPosition() const
Definition NBNode.h:260
const PositionVector & getShape() const
retrieve the junction shape
Definition NBNode.cpp:2757
bool exist(const std::string &newID, bool requireComputed=true) const
check if exists a definition with the given ID
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
void close()
Closes the device and removes it from the dictionary.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.
C++ TraCI client API implementation.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimensions
Definition Position.h:263
double distanceSquaredTo(const Position &p2) const
returns the square of the distance to another position
Definition Position.h:268
double x() const
Returns the x-position.
Definition Position.h:52
double y() const
Returns the y-position.
Definition Position.h:57
A list of positions.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
int indexOfClosest(const Position &p, bool twoD=false) const
void move2side(double amount, double maxExtension=100)
move position vector to side using certain amount
void setAlpha(unsigned char alpha)
Sets a new alpha value.
Definition RGBColor.cpp:108
static const RGBColor BLUE
Definition RGBColor.h:190
static const RGBColor ORANGE
Definition RGBColor.h:194
static const RGBColor GREEN
Definition RGBColor.h:189
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
Definition RGBColor.cpp:403
static const RGBColor BLACK
Definition RGBColor.h:196
static const RGBColor RED
named colors
Definition RGBColor.h:188
const PositionVector & getShape() const
Returns the shape of the polygon.
void addAdditionalGLObject(GUIGlObject *o, const double exaggeration=1)
Adds an additional object (detector/shape/trigger) for visualisation.
Definition SUMORTree.h:122
void removeAdditionalGLObject(GUIGlObject *o, const double exaggeration=1)
Removes an additional object (detector/shape/trigger) from being visualised.
Definition SUMORTree.h:158
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
Definition SUMORTree.h:114
static std::vector< Triangle > triangulate(PositionVector shape)
Definition Triangle.cpp:129
DemandViewOptions demandViewOptions
demand view options
NetworkViewOptions networkViewOptions
network view options
FXMenuBar * modes
The application menu bar (for select, inspect...)
void buildCommonCheckableButtons()
build checkable buttons
void updateCommonCheckableButtons()
update Common checkable buttons
void disableCommonCheckableButtons()
hide all options menu checks
MFXCheckableButton * selectButton
checkable button for edit mode select
MFXCheckableButton * inspectButton
checkable button for edit mode inspect
MFXCheckableButton * deleteButton
checkable button for edit mode delete
void disableDataCheckableButtons()
hide all options menu checks
void buildDataCheckableButtons()
build checkable buttons
void updateDataCheckableButtons()
update Data checkable buttons
MFXCheckableButton * edgeDataButton
checkable button for edit mode "edgeData"
MFXCheckableButton * edgeRelDataButton
checkable button for edit mode "edgeRelData"
MFXCheckableButton * TAZRelDataButton
checkable button for edit mode "TAZRelData"
MFXCheckableButton * meanDataButton
checkable button for edit mode "meanData"
struct used to group all variables related to view options in supermode Data
void hideDataViewOptionsMenuChecks()
hide all options menu checks
MFXCheckableButton * menuCheckToggleTAZDrawFill
menu check to toggle TAZ draw fill
MFXCheckableButton * menuCheckShowAdditionals
menu check to show Additionals
MFXCheckableButton * menuCheckShowShapes
menu check to show Shapes
MFXCheckableButton * menuCheckToggleTAZRelOnlyFrom
menu check to toggle TAZRel only from
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
void buildDataViewOptionsMenuChecks()
build menu checks
MFXCheckableButton * menuCheckToggleTAZRelDrawing
menu check to toggle TAZ Rel drawing
MFXCheckableButton * menuCheckShowDemandElements
menu check to show Demand Elements
MFXCheckableButton * menuCheckToggleTAZRelOnlyTo
menu check to toggle TAZRel only to
MFXCheckableButton * routeDistributionButton
checkable button for edit mode create route distributions
MFXCheckableButton * containerButton
checkable button for edit mode create containers
MFXCheckableButton * moveDemandElementsButton
checkable button for edit mode "move demand elements"
MFXCheckableButton * typeButton
checkable button for edit mode create type
void buildDemandCheckableButtons()
build checkable buttons
MFXCheckableButton * vehicleButton
checkable button for edit mode create vehicles
MFXCheckableButton * containerPlanButton
checkable button for edit mode create container plans
MFXCheckableButton * routeButton
checkable button for edit mode create routes
MFXCheckableButton * stopButton
checkable button for edit mode create stops
MFXCheckableButton * personPlanButton
checkable button for edit mode create person plans
MFXCheckableButton * personButton
checkable button for edit mode create persons
void updateDemandCheckableButtons()
update Demand checkable buttons
MFXCheckableButton * typeDistributionButton
checkable button for edit mode create type distribution
void disableDemandCheckableButtons()
hide all options menu checks
struct used to group all variables related to view options in supermode Demand
MFXCheckableButton * menuCheckShowAllTrips
show all trips
void lockPerson(const GNEDemandElement *person)
lock person
MFXCheckableButton * menuCheckToggleGrid
menu check to show grid button
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
void lockContainer(const GNEDemandElement *container)
lock container
void buildDemandViewOptionsMenuChecks()
build menu checks
const GNEDemandElement * getLockedPerson() const
get locked person
MFXCheckableButton * menuCheckDrawSpreadVehicles
menu check to draw vehicles in begin position or spread in lane
MFXCheckableButton * menuCheckShowOverlappedRoutes
show overlapped routes
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
MFXCheckableButton * menuCheckShowAllPersonPlans
show all person plans
MFXCheckableButton * menuCheckShowAllContainerPlans
show all container plans
MFXCheckableButton * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
MFXCheckableButton * menuCheckHideShapes
Hide shapes (Polygons and POIs)
MFXCheckableButton * menuCheckLockPerson
Lock Person.
MFXCheckableButton * menuCheckLockContainer
Lock Container.
struct used to group all variables related with Supermodes
DataEditMode dataEditMode
the current Data edit mode
void buildSuperModeButtons()
build checkable buttons
DemandEditMode demandEditMode
the current Demand edit mode
Supermode currentSupermode
the current supermode
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
void setDemandEditMode(DemandEditMode demandMode, const bool force=false)
set Demand edit mode
MFXCheckableButton * dataButton
checkable button for supermode Data
bool isCurrentSupermodeData() const
@check if current supermode is Data
void setView(FXSelector sel)
set view
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
MFXCheckableButton * networkButton
checkable button for supermode Network
bool isJuPedSimView() const
check if default view is enabled
void setSupermode(Supermode supermode, const bool force)
set supermode
MFXCheckableButton * demandButton
checkable button for supermode Demand
void setNetworkEditMode(NetworkEditMode networkMode, const bool force=false)
set Network edit mode
void setDataEditMode(DataEditMode dataMode, const bool force=false)
set Data edit mode
struct used to group all variables related with edit shapes of NetworkElements
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
void startEditCustomShape(GNENetworkElement *element)
start edit custom shape
class used to group all variables related with mouse buttons and key pressed after certain events
bool shiftKeyPressed() const
check if SHIFT is pressed during current event
bool altKeyPressed() const
check if ALT is pressed during current event
void update(void *eventData)
update status of MouseButtonKeyPressed during current event
bool controlKeyPressed() const
check if CONTROL is pressed during current event
bool mouseLeftButtonPressed() const
check if mouse left button is pressed during current event
struct used to group all variables related with movement of groups of elements
void moveSelection(const bool mouseLeftButtonPressed)
move selection
bool isCurrentlyMovingMultipleElements() const
check if there are moving elements
void finishMoveSelection()
finish moving selection
bool isMovingSelection() const
check if currently there is element being moved
void resetMovingSelectedEdge()
reset flag for moving edge
struct used to group all variables related with movement of single elements
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
void moveSingleElement(const bool mouseLeftButtonPressed)
move single element in Network AND Demand mode
bool isCurrentlyMovingSingleElement() const
check if there are moving elements
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
bool beginMoveNetworkElementShape()
begin move network elementshape
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
void updateNetworkCheckableButtons()
update network checkable buttons
MFXCheckableButton * trafficLightButton
checkable button for edit mode traffic light
MFXCheckableButton * moveNetworkElementsButton
checkable button for edit mode "move network elements"
MFXCheckableButton * additionalButton
checkable button for edit mode additional
MFXCheckableButton * crossingButton
checkable button for edit mode crossing
MFXCheckableButton * createEdgeButton
checkable button for edit mode create edge
MFXCheckableButton * prohibitionButton
checkable button for edit mode prohibition
void buildNetworkCheckableButtons()
build checkable buttons
MFXCheckableButton * shapeButton
checkable button for edit mode shape
MFXCheckableButton * connectionButton
checkable button for edit mode connection
MFXCheckableButton * TAZButton
checkable button for edit mode TAZ
void disableNetworkCheckableButtons()
hide all options menu checks
MFXCheckableButton * wireButton
checkable button for edit mode wires
MFXCheckableButton * decalButton
checkable button for edit mode decals
struct used to group all variables related to view options in supermode Network
MFXCheckableButton * menuCheckSelectEdges
checkable button to select only edges
MFXCheckableButton * menuCheckChainEdges
checkable button to the endpoint for a created edge should be set as the new source
MFXCheckableButton * menuCheckShowDemandElements
checkable button to show Demand Elements
MFXCheckableButton * menuCheckMoveElevation
checkable button to apply movement to elevation
MFXCheckableButton * menuCheckShowTAZElements
checkable button to show TAZ elements
MFXCheckableButton * menuCheckAutoOppositeEdge
check checkable to create auto create opposite edge
MFXCheckableButton * menuCheckDrawSpreadVehicles
checkable button to draw vehicles in begin position or spread in lane
MFXCheckableButton * menuCheckShowConnections
checkable button to show connections
MFXCheckableButton * menuCheckHideConnections
checkable button to hide connections in connect mode
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
MFXCheckableButton * menuCheckToggleGrid
checkable button to show grid button
MFXCheckableButton * menuCheckMergeAutomatically
checkable button to we should't warn about merging junctions
bool selectEdges() const
check if select edges checkbox is enabled
MFXCheckableButton * menuCheckShowJunctionBubble
checkable button to show connection as bubble in "Move" mode.
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
MFXCheckableButton * menuCheckShowAdditionalSubElements
checkable button to show additional sub-elements
void buildNetworkViewOptionsMenuChecks()
build menu checks
MFXCheckableButton * menuCheckChangeAllPhases
checkable button to set change all phases
MFXCheckableButton * menuCheckExtendSelection
checkable button to extend to edge nodes
struct used to group all variables related with save elements
void buildSaveElementsButtons()
build save buttons
void finishRectangleSelection()
finish rectangle selection
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
void beginRectangleSelection()
begin rectangle selection
bool selectingUsingRectangle
whether we have started rectangle-selection
void moveRectangleSelection()
move rectangle selection
bool startDrawing
whether we have started rectangle-selection
void processRectangleSelection()
process rectangle Selection
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
struct used to group all variables related with testing
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
void initTestingMode()
init testing mode
struct used to group all variables related with time format
void buildTimeFormatButtons()
build time format buttons
static const RGBColor TLSConnectionColor
connection color between E1/junctions and TLS
RGBColor selectionColor
basic selection color
static const double junctionBubbleRadius
junction bubble radius
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values