Eclipse SUMO - Simulation of Urban MObility
GNEViewNet.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // A view on the network being edited (adapted from GUIViewTraffic)
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 
50 #include <netbuild/NBEdgeCont.h>
52 #include <utils/gui/div/GLHelper.h>
61 
62 #include "GNENet.h"
63 #include "GNEUndoList.h"
64 #include "GNEViewNet.h"
65 #include "GNEViewParent.h"
66 #include "GNEApplicationWindow.h"
67 
68 
69 // ===========================================================================
70 // FOX callback mapping
71 // ===========================================================================
72 
73 FXDEFMAP(GNEViewNet) GNEViewNetMap[] = {
74  // Super Modes
77  // Modes
78  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_E_EDGEMODE, GNEViewNet::onCmdSetMode),
79  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_M_MOVEMODE, GNEViewNet::onCmdSetMode),
80  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_D_DELETEMODE, GNEViewNet::onCmdSetMode),
81  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_I_INSPECTMODE, GNEViewNet::onCmdSetMode),
82  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_S_SELECTMODE, GNEViewNet::onCmdSetMode),
87  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_Z_TAZMODE, GNEViewNet::onCmdSetMode),
89  FXMAPFUNC(SEL_COMMAND, MID_HOTKEY_V_VEHICLEMODE, GNEViewNet::onCmdSetMode),
91  // Common view options
93  // Network view options
105  // Demand view options
110  // Select elements
111  FXMAPFUNC(SEL_COMMAND, MID_ADDSELECT, GNEViewNet::onCmdAddSelected),
112  FXMAPFUNC(SEL_COMMAND, MID_REMOVESELECT, GNEViewNet::onCmdRemoveSelected),
113  // Junctions
121  // Connections
123  // Crossings
125  // Edges
126  FXMAPFUNC(SEL_COMMAND, MID_GNE_EDGE_SPLIT, GNEViewNet::onCmdSplitEdge),
128  FXMAPFUNC(SEL_COMMAND, MID_GNE_EDGE_REVERSE, GNEViewNet::onCmdReverseEdge),
133  FXMAPFUNC(SEL_COMMAND, MID_GNE_EDGE_SMOOTH, GNEViewNet::onCmdSmoothEdges),
137  // Lanes
145  FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_BIKE, GNEViewNet::onCmdLaneOperation),
146  FXMAPFUNC(SEL_COMMAND, MID_GNE_LANE_ADD_BUS, GNEViewNet::onCmdLaneOperation),
152  // Additionals
154  // Polygons
156  FXMAPFUNC(SEL_COMMAND, MID_GNE_POLYGON_CLOSE, GNEViewNet::onCmdClosePolygon),
157  FXMAPFUNC(SEL_COMMAND, MID_GNE_POLYGON_OPEN, GNEViewNet::onCmdOpenPolygon),
160  // POIs
161  FXMAPFUNC(SEL_COMMAND, MID_GNE_POI_TRANSFORM, GNEViewNet::onCmdTransformPOI),
162 };
163 
164 // Object implementation
165 FXIMPLEMENT(GNEViewNet, GUISUMOAbstractView, GNEViewNetMap, ARRAYNUMBER(GNEViewNetMap))
166 
167 // ===========================================================================
168 // member method definitions
169 // ===========================================================================
170 
171 GNEViewNet::GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMainWindow& app,
172  GNEViewParent* viewParent, GNENet* net, GNEUndoList* undoList,
173  FXGLVisual* glVis, FXGLCanvas* share) :
174  GUISUMOAbstractView(tmpParent, app, viewParent, net->getVisualisationSpeedUp(), glVis, share),
175  myEditModes(this),
176  myTestingMode(this),
177  myCommonCheckableButtons(this),
178  myNetworkCheckableButtons(this),
179  myDemandCheckableButtons(this),
180  myCommonViewOptions(this),
181  myNetworkViewOptions(this),
182  myDemandViewOptions(this),
183  myMoveSingleElementValues(this),
184  myMoveMultipleElementValues(this),
185  myVehicleOptions(this),
186  myVehicleTypeOptions(this),
187  mySelectingArea(this),
188  myEditShapes(this),
189  myViewParent(viewParent),
190  myNet(net),
191  myCurrentFrame(nullptr),
192  myUndoList(undoList) {
193  // view must be the final member of actualParent
194  reparent(actualParent);
195  // Build edit modes
196  buildEditModeControls();
197  // Mark undo list
198  myUndoList->mark();
199  // set this viewNet in Net
200  myNet->setViewNet(this);
201 
202  // set drag delay
203  ((GUIDanielPerspectiveChanger*)myChanger)->setDragDelay(100000000); // 100 milliseconds
204 
205  // Reset textures
207 
208  // init testing mode
209  myTestingMode.initTestingMode();
210 }
211 
212 
214 
215 
216 void
218 
219 
220 void
222  // build coloring tools
223  {
224  for (auto it_names : gSchemeStorage.getNames()) {
225  cw.getColoringSchemesCombo()->appendItem(it_names.c_str());
226  if (it_names == myVisualizationSettings->name) {
227  cw.getColoringSchemesCombo()->setCurrentItem(cw.getColoringSchemesCombo()->getNumItems() - 1);
228  }
229  }
230  cw.getColoringSchemesCombo()->setNumVisible(MAX2(5, (int)gSchemeStorage.getNames().size() + 1));
231  }
232  // for junctions
233  new FXButton(cw.getLocatorPopup(),
234  "\tLocate Junction\tLocate a junction within the network.",
236  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
237  // for edges
238  new FXButton(cw.getLocatorPopup(),
239  "\tLocate Street\tLocate a street within the network.",
241  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
242 
243  // for vehicles
244  new FXButton(cw.getLocatorPopup(),
245  "\tLocate Vehicle\tLocate a vehicle within the network.",
247  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
248 
249  // for person
250  new FXButton(cw.getLocatorPopup(),
251  "\tLocate Person\tLocate a person within the network.",
253  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
254 
255  // for routes
256  new FXButton(cw.getLocatorPopup(),
257  "\tLocate Route\tLocate a route within the network.",
259  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
260 
261  // for routes
262  new FXButton(cw.getLocatorPopup(),
263  "\tLocate Stop\tLocate a stop within the network.",
265  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
266 
267  // for persons (currently unused)
268  /*
269  new FXButton(cw.getLocatorPopup(),
270  "\tLocate Vehicle\tLocate a person within the network.",
271  GUIIconSubSys::getIcon(ICON_LOCATEPERSON), &v, MID_LOCATEPERSON,
272  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
273  */
274 
275  // for tls
276  new FXButton(cw.getLocatorPopup(),
277  "\tLocate TLS\tLocate a tls within the network.",
279  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
280  // for additional stuff
281  new FXButton(cw.getLocatorPopup(),
282  "\tLocate Additional\tLocate an additional structure within the network.",
284  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
285  // for pois
286  new FXButton(cw.getLocatorPopup(),
287  "\tLocate PoI\tLocate a PoI within the network.",
289  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
290  // for polygons
291  new FXButton(cw.getLocatorPopup(),
292  "\tLocate Polygon\tLocate a Polygon within the network.",
294  ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
295 }
296 
297 
298 void
300  // this call is only used for breakpoints (to check when view is updated)
301  GUISUMOAbstractView::update();
302 }
303 
304 
305 std::set<std::pair<std::string, GNEAttributeCarrier*> >
306 GNEViewNet::getAttributeCarriersInBoundary(const Boundary& boundary, bool forceSelectEdges) {
307  // use a SET of pairs to obtain IDs and Pointers to attribute carriers. We need this because certain ACs can be returned many times (example: Edges)
308  // Note: a map cannot be used because there is different ACs with the same ID (example: Additionals)
309  std::set<std::pair<std::string, GNEAttributeCarrier*> > result;
310  // firstm make OpenGL context current prior to performing OpenGL commands
311  if (makeCurrent()) {
312  // obtain GUIGLIds of all objects in the given boundary (disabling drawForRectangleSelection)
313  std::vector<GUIGlID> ids = getObjectsInBoundary(boundary, false);
314  // finish make OpenGL context current
315  makeNonCurrent();
316  // iterate over GUIGlIDs
317  for (auto i : ids) {
318  // avoid to select Net (i = 0)
319  if (i != 0) {
321  // in the case of a Lane, we need to change the retrieved lane to their the parent if myNetworkViewOptions.mySelectEdges is enabled
322  if ((retrievedAC->getTagProperty().getTag() == SUMO_TAG_LANE) && (myNetworkViewOptions.selectEdges() || forceSelectEdges)) {
323  retrievedAC = dynamic_cast<GNELane*>(retrievedAC)->getParentEdge();
324  }
325  // make sure that AttributeCarrier can be selected
326  GUIGlObject* glObject = dynamic_cast<GUIGlObject*>(retrievedAC);
327  if (glObject && !myViewParent->getSelectorFrame()->getLockGLObjectTypes()->IsObjectTypeLocked(glObject->getType())) {
328  result.insert(std::make_pair(retrievedAC->getID(), retrievedAC));
329  }
330  }
331  }
332  }
333  return result;
334 }
335 
336 
337 void
339  if (AC->isAttributeCarrierSelected()) {
340  new FXMenuCommand(ret, "Remove From Selected", GUIIconSubSys::getIcon(ICON_FLAG_MINUS), this, MID_REMOVESELECT);
341  } else {
342  new FXMenuCommand(ret, "Add To Selected", GUIIconSubSys::getIcon(ICON_FLAG_PLUS), this, MID_ADDSELECT);
343  }
344  new FXMenuSeparator(ret);
345 }
346 
347 
348 bool
349 GNEViewNet::setColorScheme(const std::string& name) {
350  if (!gSchemeStorage.contains(name)) {
351  return false;
352  }
353  if (myVisualizationChanger != nullptr) {
354  if (myVisualizationChanger->getCurrentScheme() != name) {
356  }
357  }
358  myVisualizationSettings = &gSchemeStorage.get(name.c_str());
359  update();
360  return true;
361 }
362 
363 
364 void
366  // reimplemented from GUISUMOAbstractView due OverlappedInspection
367  ungrab();
368  if (!isEnabled() || !myAmInitialised) {
369  return;
370  }
371  if (makeCurrent()) {
372  // initialise the select mode
373  int id = getObjectUnderCursor();
374  GUIGlObject* o = nullptr;
375  // we need to check if we're inspecting a overlapping element
379  o = dynamic_cast<GUIGlObject*>(myViewParent->getInspectorFrame()->getAttributesEditor()->getEditedACs().front());
380  } else if (id != 0) {
382  } else {
384  }
385  // check if open popup menu can be opened
386  if (o != nullptr) {
387  myPopup = o->getPopUpMenu(*myApp, *this);
388  int x, y;
389  FXuint b;
390  myApp->getCursorPosition(x, y, b);
391  myPopup->setX(x + myApp->getX());
392  myPopup->setY(y + myApp->getY());
393  myPopup->create();
394  myPopup->show();
396  myChanger->onRightBtnRelease(nullptr);
398  setFocus();
399  }
400  makeNonCurrent();
401  }
402 }
403 
404 
405 void
407  // first check if we have to save gui settings in a file (only used for testing purposes)
409  if (oc.getString("gui-testing.setting-output").size() > 0) {
410  try {
411  // open output device
412  OutputDevice& output = OutputDevice::getDevice(oc.getString("gui-testing.setting-output"));
413  // save view settings
415  myVisualizationSettings->save(output);
416  // save viewport (zoom, X, Y and Z)
417  output.openTag(SUMO_TAG_VIEWPORT);
422  output.closeTag();
423  output.closeTag();
424  // close output device
425  output.close();
426  } catch (...) {
427  WRITE_ERROR("GUI-Settings cannot be saved in " + oc.getString("gui-testing.setting-output"));
428  }
429  }
430 }
431 
432 
435  return myEditModes;
436 }
437 
438 
441  return myTestingMode;
442 }
443 
444 
447  return myCommonViewOptions;
448 }
449 
450 
453  return myNetworkViewOptions;
454 }
455 
456 
459  return myDemandViewOptions;
460 }
461 
462 
465  return myKeyPressed;
466 }
467 
468 
471  return myEditShapes;
472 }
473 
474 
475 void
477  bool hide, double hideThreshold) {
478  assert(!scheme.isFixed());
479  UNUSED_PARAMETER(s);
480  double minValue = std::numeric_limits<double>::infinity();
481  double maxValue = -std::numeric_limits<double>::infinity();
482  // retrieve range
483  if (objectType == GLO_LANE) {
484  // XXX (see #3409) multi-colors are not currently handled. this is a quick hack
485  if (active == 9) {
486  active = 8; // segment height, fall back to start height
487  } else if (active == 11) {
488  active = 10; // segment incline, fall back to total incline
489  }
490  for (GNELane* lane : myNet->retrieveLanes()) {
491  const double val = lane->getColorValue(s, active);
492  minValue = MIN2(minValue, val);
493  maxValue = MAX2(maxValue, val);
494  }
495  } else if (objectType == GLO_JUNCTION) {
496  if (active == 3) {
497  for (GNEJunction* junction : myNet->retrieveJunctions()) {
498  minValue = MIN2(minValue, junction->getPositionInView().z());
499  maxValue = MAX2(maxValue, junction->getPositionInView().z());
500  }
501  }
502  }
503  if (minValue != std::numeric_limits<double>::infinity()) {
504  scheme.clear();
505  // add new thresholds
506  if (hide) {
507  minValue = MAX2(hideThreshold + 1, minValue);
508  scheme.addColor(RGBColor(204, 204, 204), hideThreshold);
509  }
510  double range = maxValue - minValue;
511  scheme.addColor(RGBColor::RED, (minValue));
512  scheme.addColor(RGBColor::ORANGE, (minValue + range * 1 / 6.0));
513  scheme.addColor(RGBColor::YELLOW, (minValue + range * 2 / 6.0));
514  scheme.addColor(RGBColor::GREEN, (minValue + range * 3 / 6.0));
515  scheme.addColor(RGBColor::CYAN, (minValue + range * 4 / 6.0));
516  scheme.addColor(RGBColor::BLUE, (minValue + range * 5 / 6.0));
517  scheme.addColor(RGBColor::MAGENTA, (maxValue));
518  }
519 }
520 
521 
522 void
523 GNEViewNet::setStatusBarText(const std::string& text) {
524  myApp->setStatusBarText(text);
525 }
526 
527 
528 bool
530  return (myNetworkViewOptions.menuCheckExtendSelection->getCheck() != 0);
531 }
532 
533 
534 void
535 GNEViewNet::setSelectionScaling(double selectionScale) {
536  myVisualizationSettings->selectionScale = selectionScale;
537 }
538 
539 
540 bool
542  return (myNetworkViewOptions.menuCheckChangeAllPhases->getCheck() != 0);
543 }
544 
545 
546 bool
549 }
550 
551 
553  myEditModes(this),
554  myTestingMode(this),
555  myCommonCheckableButtons(this),
556  myNetworkCheckableButtons(this),
557  myDemandCheckableButtons(this),
558  myCommonViewOptions(this),
559  myNetworkViewOptions(this),
560  myDemandViewOptions(this),
561  myMoveSingleElementValues(this),
562  myMoveMultipleElementValues(this),
563  myVehicleOptions(this),
564  myVehicleTypeOptions(this),
565  mySelectingArea(this),
566  myEditShapes(this) {
567 }
568 
569 std::vector<std::string>
570 GNEViewNet::getEdgeLaneParamKeys(bool edgeKeys) const {
571  std::set<std::string> keys;
572  for (const NBEdge* e : myNet->getEdgeCont().getAllEdges()) {
573  if (edgeKeys) {
574  for (const auto& item : e->getParametersMap()) {
575  keys.insert(item.first);
576  }
577  for (const auto con : e->getConnections()) {
578  for (const auto& item : con.getParametersMap()) {
579  keys.insert(item.first);
580  }
581  }
582  } else {
583  for (const auto lane : e->getLanes()) {
584  int i = 0;
585  for (const auto& item : lane.getParametersMap()) {
586  keys.insert(item.first);
587  }
588  for (const auto con : e->getConnectionsFromLane(i)) {
589  for (const auto& item : con.getParametersMap()) {
590  keys.insert(item.first);
591  }
592  }
593  i++;
594  }
595  }
596  }
597  return std::vector<std::string>(keys.begin(), keys.end());
598 }
599 
600 
601 
602 int
603 GNEViewNet::doPaintGL(int mode, const Boundary& bound) {
604  // init view settings
608  } else {
610  }
613  }
614  // set lefthand and laneIcons
617 
618  glRenderMode(mode);
619  glMatrixMode(GL_MODELVIEW);
620  glPushMatrix();
621  glDisable(GL_TEXTURE_2D);
622  glDisable(GL_ALPHA_TEST);
623  glEnable(GL_BLEND);
624  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
625  glEnable(GL_DEPTH_TEST);
626 
627  // visualize rectangular selection
629 
630  // compute lane width
631  double lw = m2p(SUMO_const_laneWidth);
632  // draw decals (if not in grabbing mode)
634  drawDecals();
635  // depending of the visualizationSettings, enable or disable check box show grid
637  myCommonViewOptions.menuCheckShowGrid->setCheck(true);
638  paintGLGrid();
639  } else {
640  myCommonViewOptions.menuCheckShowGrid->setCheck(false);
641  }
643  }
644  // draw temporal elements
648  // draw testing elements
650  // draw temporal trip/flow route
652  // draw temporal person plan route
655  // draw temporal non consecutive edge
657  }
658  // check menu checks of supermode demand
660  // enable or disable menuCheckShowAllPersonPlans depending of there is a locked person
663  } else {
665  }
666  // check if menuCheckLockPerson must be enabled or disabled
667  if (myDemandViewOptions.menuCheckLockPerson->getCheck() == FALSE) {
668  // check if we're in inspector mode and we're inspecting exactly one element
670  // obtain tag property
672  // enable menu check lock person if is either a person, a person plan or a person stop
673  if (tagProperty.isPerson() || tagProperty.isPersonPlan() || tagProperty.isPersonStop()) {
675  } else {
677  }
678  } else {
680  }
681  }
682  }
683  // draw elements
684  glLineWidth(1);
685  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
686  const float minB[2] = { (float)bound.xmin(), (float)bound.ymin() };
687  const float maxB[2] = { (float)bound.xmax(), (float)bound.ymax() };
689  glEnable(GL_POLYGON_OFFSET_FILL);
690  glEnable(GL_POLYGON_OFFSET_LINE);
691  // obtain objects included in minB and maxB
692  int hits2 = myGrid->Search(minB, maxB, *myVisualizationSettings);
693  // pop draw matrix
694  glPopMatrix();
695  return hits2;
696 }
697 
698 
699 long
700 GNEViewNet::onLeftBtnPress(FXObject*, FXSelector, void* eventData) {
701  // set focus in view net
702  setFocus();
703  // update keyPressed
704  myKeyPressed.update(eventData);
705  // interpret object under cursor
706  if (makeCurrent()) {
707  // fill objects under cursor
709  // if grid is enabled, fill objects under gripped cursor
712  }
713  // process left button press function depending of supermode
717  processLeftButtonPressDemand(eventData);
718  }
719  makeNonCurrent();
720  }
721  // update cursor
722  updateCursor();
723  // update view
724  update();
725  return 1;
726 }
727 
728 
729 long
730 GNEViewNet::onLeftBtnRelease(FXObject* obj, FXSelector sel, void* eventData) {
731  // process parent function
732  GUISUMOAbstractView::onLeftBtnRelease(obj, sel, eventData);
733  // first update keyPressed
734  myKeyPressed.update(eventData);
735  // update cursor
736  updateCursor();
737  // process left button release function depending of supermode
742  }
743  // update view
744  update();
745  return 1;
746 }
747 
748 
749 long
750 GNEViewNet::onRightBtnPress(FXObject* obj, FXSelector sel, void* eventData) {
751  // update keyPressed
752  myKeyPressed.update(eventData);
753  // update cursor
754  updateCursor();
756  // disable right button press during drawing polygon
757  return 1;
758  } else {
759  return GUISUMOAbstractView::onRightBtnPress(obj, sel, eventData);
760  }
761 }
762 
763 
764 long
765 GNEViewNet::onRightBtnRelease(FXObject* obj, FXSelector sel, void* eventData) {
766  // update keyPressed
767  myKeyPressed.update(eventData);
768  // update cursor
769  updateCursor();
770  // disable right button release during drawing polygon
772  return 1;
773  } else {
774  return GUISUMOAbstractView::onRightBtnRelease(obj, sel, eventData);
775  }
776 }
777 
778 
779 long
780 GNEViewNet::onMouseMove(FXObject* obj, FXSelector sel, void* eventData) {
781  // process mouse move in GUISUMOAbstractView
782  GUISUMOAbstractView::onMouseMove(obj, sel, eventData);
783  // update keyPressed
784  myKeyPressed.update(eventData);
785  // update cursor
786  updateCursor();
787  // process mouse move function depending of supermode
792  }
793  return 1;
794 }
795 
796 
797 long
798 GNEViewNet::onKeyPress(FXObject* o, FXSelector sel, void* eventData) {
799  // update keyPressed
800  myKeyPressed.update(eventData);
801  // update cursor
802  updateCursor();
803  // change "delete last created point" depending of shift key
806  update();
809  update();
810  }
811  return GUISUMOAbstractView::onKeyPress(o, sel, eventData);
812 }
813 
814 
815 long
816 GNEViewNet::onKeyRelease(FXObject* o, FXSelector sel, void* eventData) {
817  // update keyPressed
818  myKeyPressed.update(eventData);
819  // update cursor
820  updateCursor();
821  // change "delete last created point" depending of shift key
824  update();
825  }
826  // check if selecting using rectangle has to be disabled
829  update();
830  }
831  return GUISUMOAbstractView::onKeyRelease(o, sel, eventData);
832 }
833 
834 
835 void
836 GNEViewNet::abortOperation(bool clearSelection) {
837  // steal focus from any text fields and place it over view net
838  setFocus();
839  // check what supermode is enabled
841  // abort operation depending of current mode
843  // abort edge creation in create edge frame
847  // check if current selection has to be cleaned
848  if (clearSelection) {
850  }
852  // abort changes in Connector Frame
854  } else if (myEditModes.networkEditMode == GNE_NMODE_TLS) {
855  myViewParent->getTLSEditorFrame()->onCmdCancel(nullptr, 0, nullptr);
859  // abort current drawing
861  } else if (myEditModes.networkEditMode == GNE_NMODE_TAZ) {
863  // abort current drawing
865  } else if (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() != nullptr) {
866  // finish current editing TAZ
868  }
870  myViewParent->getProhibitionFrame()->onCmdCancel(nullptr, 0, nullptr);
872  // abort select lanes
874  }
876  // abort operation depending of current mode
879  // check if current selection has to be cleaned
880  if (clearSelection) {
882  }
891  }
892  }
893  // abort undo list
894  myUndoList->p_abort();
895 }
896 
897 
898 void
901  setStatusBarText("Cannot delete in this mode");
902  } else {
903  // delete elements depending of current supermode
905  myUndoList->p_begin("delete network selection");
913  myUndoList->p_end();
914  } else {
915  myUndoList->p_begin("delete demand selection");
917  myUndoList->p_end();
918  }
919  // update view
920  update();
921  }
922 }
923 
924 
925 void
927  // check what supermode is enabled
929  // abort operation depending of current mode
931  // Accept changes in Connector Frame
933  } else if (myEditModes.networkEditMode == GNE_NMODE_TLS) {
934  myViewParent->getTLSEditorFrame()->onCmdOK(nullptr, 0, nullptr);
935  } else if ((myEditModes.networkEditMode == GNE_NMODE_MOVE) && (myEditShapes.editedShapePoly != nullptr)) {
939  // stop current drawing
941  } else {
942  // start drawing
944  }
947  } else if (myEditModes.networkEditMode == GNE_NMODE_TAZ) {
949  // stop current drawing
951  } else if (myViewParent->getTAZFrame()->getTAZCurrentModul()->getTAZ() == nullptr) {
952  // start drawing
955  // save pending changes
957  }
960  // stop select lanes to create additional
962  }
963  }
965  // abort operation depending of current mode
974  }
975  }
976 }
977 
978 
979 void
981  // Currently only used in Demand mode
983  // abort operation depending of current mode
992  }
993  }
994 }
995 
996 void
998  // if there is a visible frame, set focus over it. In other case, set focus over ViewNet
999  if (myCurrentFrame != nullptr) {
1001  } else {
1002  setFocus();
1003  }
1004 }
1005 
1006 
1009  return myViewParent;
1010 }
1011 
1012 
1013 GNENet*
1015  return myNet;
1016 }
1017 
1018 
1019 GNEUndoList*
1021  return myUndoList;
1022 }
1023 
1024 
1025 const GNEAttributeCarrier*
1027  return myDottedAC;
1028 }
1029 
1030 
1031 void
1033  myDottedAC = AC;
1034 }
1035 
1036 
1037 bool
1040 }
1041 
1042 
1043 GNEJunction*
1045  GNEJunction* junction = nullptr;
1046  if (makeCurrent()) {
1050  if (pointed) {
1051  switch (pointed->getType()) {
1052  case GLO_JUNCTION:
1053  junction = (GNEJunction*)pointed;
1054  break;
1055  default:
1056  break;
1057  }
1058  }
1059  }
1060  return junction;
1061 }
1062 
1063 
1066  GNEConnection* connection = nullptr;
1067  if (makeCurrent()) {
1071  if (pointed) {
1072  switch (pointed->getType()) {
1073  case GLO_CONNECTION:
1074  connection = (GNEConnection*)pointed;
1075  break;
1076  default:
1077  break;
1078  }
1079  }
1080  }
1081  return connection;
1082 }
1083 
1084 
1085 GNECrossing*
1087  GNECrossing* crossing = nullptr;
1088  if (makeCurrent()) {
1092  if (pointed) {
1093  switch (pointed->getType()) {
1094  case GLO_CROSSING:
1095  crossing = (GNECrossing*)pointed;
1096  break;
1097  default:
1098  break;
1099  }
1100  }
1101  }
1102  return crossing;
1103 }
1104 
1105 GNEEdge*
1107  GNEEdge* edge = nullptr;
1108  if (makeCurrent()) {
1112  if (pointed) {
1113  switch (pointed->getType()) {
1114  case GLO_EDGE:
1115  edge = (GNEEdge*)pointed;
1116  break;
1117  case GLO_LANE:
1118  edge = (((GNELane*)pointed)->getParentEdge());
1119  break;
1120  default:
1121  break;
1122  }
1123  }
1124  }
1125  return edge;
1126 }
1127 
1128 
1129 GNELane*
1131  GNELane* lane = nullptr;
1132  if (makeCurrent()) {
1136  if (pointed) {
1137  if (pointed->getType() == GLO_LANE) {
1138  lane = (GNELane*)pointed;
1139  }
1140  }
1141  }
1142  return lane;
1143 }
1144 
1145 
1148  if (makeCurrent()) {
1152  if (pointed) {
1153  return dynamic_cast<GNEAdditional*>(pointed);
1154  }
1155  }
1156  return nullptr;
1157 }
1158 
1159 
1160 GNEPoly*
1162  if (makeCurrent()) {
1166  if (pointed) {
1167  return dynamic_cast<GNEPoly*>(pointed);
1168  }
1169  }
1170  return nullptr;
1171 }
1172 
1173 
1174 GNEPOI*
1176  if (makeCurrent()) {
1180  if (pointed) {
1181  return dynamic_cast<GNEPOI*>(pointed);
1182  }
1183  }
1184  return nullptr;
1185 }
1186 
1187 long
1188 GNEViewNet::onCmdSetSupermode(FXObject*, FXSelector sel, void*) {
1189  // check what network mode will be set
1190  switch (FXSELID(sel)) {
1193  break;
1196  break;
1197  default:
1198  break;
1199  }
1200  return 1;
1201 }
1202 
1203 long
1204 GNEViewNet::onCmdSetMode(FXObject*, FXSelector sel, void*) {
1206  // check what network mode will be set
1207  switch (FXSELID(sel)) {
1210  break;
1213  break;
1216  break;
1217  case MID_HOTKEY_M_MOVEMODE:
1219  break;
1220  case MID_HOTKEY_E_EDGEMODE:
1222  break;
1225  break;
1228  break;
1231  break;
1234  break;
1235  case MID_HOTKEY_Z_TAZMODE:
1237  break;
1240  break;
1243  break;
1244  default:
1245  break;
1246  }
1247  } else {
1248  // check what demand mode will be set
1249  switch (FXSELID(sel)) {
1252  break;
1255  break;
1258  break;
1259  case MID_HOTKEY_M_MOVEMODE:
1261  break;
1264  break;
1267  break;
1270  break;
1273  break;
1276  break;
1279  break;
1282  break;
1283  default:
1284  break;
1285  }
1286  }
1287  return 1;
1288 }
1289 
1290 
1291 long
1292 GNEViewNet::onCmdSplitEdge(FXObject*, FXSelector, void*) {
1293  GNEEdge* edge = getEdgeAtPopupPosition();
1294  if (edge != nullptr) {
1296  }
1297  return 1;
1298 }
1299 
1300 
1301 long
1302 GNEViewNet::onCmdSplitEdgeBidi(FXObject*, FXSelector, void*) {
1303  GNEEdge* edge = getEdgeAtPopupPosition();
1304  if (edge != nullptr) {
1305  // obtain reverse edge
1306  GNEEdge* reverseEdge = edge->getOppositeEdge();
1307  // check that reverse edge works
1308  if (reverseEdge != nullptr) {
1309  myNet->splitEdgesBidi(edge, reverseEdge, edge->getSplitPos(getPopupPosition()), myUndoList);
1310  }
1311  }
1312  return 1;
1313 }
1314 
1315 
1316 long
1317 GNEViewNet::onCmdReverseEdge(FXObject*, FXSelector, void*) {
1318  GNEEdge* edge = getEdgeAtPopupPosition();
1319  if (edge != nullptr) {
1320  if (edge->isAttributeCarrierSelected()) {
1321  myUndoList->p_begin("Reverse selected " + toString(SUMO_TAG_EDGE) + "s");
1322  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1323  for (auto it : edges) {
1325  }
1326  myUndoList->p_end();
1327  } else {
1328  myUndoList->p_begin("Reverse " + toString(SUMO_TAG_EDGE));
1329  myNet->reverseEdge(edge, myUndoList);
1330  myUndoList->p_end();
1331  }
1332  }
1333  return 1;
1334 }
1335 
1336 
1337 long
1338 GNEViewNet::onCmdAddReversedEdge(FXObject*, FXSelector, void*) {
1339  GNEEdge* edge = getEdgeAtPopupPosition();
1340  if (edge != nullptr) {
1341  if (edge->isAttributeCarrierSelected()) {
1342  myUndoList->p_begin("Add Reverse edge for selected " + toString(SUMO_TAG_EDGE) + "s");
1343  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1344  for (auto it : edges) {
1346  }
1347  myUndoList->p_end();
1348  } else {
1349  myUndoList->p_begin("Add reverse " + toString(SUMO_TAG_EDGE));
1351  myUndoList->p_end();
1352  }
1353  }
1354  return 1;
1355 }
1356 
1357 
1358 long
1359 GNEViewNet::onCmdEditEdgeEndpoint(FXObject*, FXSelector, void*) {
1360  GNEEdge* edge = getEdgeAtPopupPosition();
1361  if (edge != nullptr) {
1362  // snap to active grid the Popup position
1364  }
1365  return 1;
1366 }
1367 
1368 
1369 long
1370 GNEViewNet::onCmdResetEdgeEndpoint(FXObject*, FXSelector, void*) {
1371  GNEEdge* edge = getEdgeAtPopupPosition();
1372  if (edge != nullptr) {
1374  }
1375  return 1;
1376 }
1377 
1378 
1379 long
1380 GNEViewNet::onCmdStraightenEdges(FXObject*, FXSelector, void*) {
1381  GNEEdge* edge = getEdgeAtPopupPosition();
1382  if (edge != nullptr) {
1383  if (edge->isAttributeCarrierSelected()) {
1384  myUndoList->p_begin("straighten selected " + toString(SUMO_TAG_EDGE) + "s");
1385  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1386  for (auto it : edges) {
1387  it->setAttribute(SUMO_ATTR_SHAPE, "", myUndoList);
1388  }
1389  myUndoList->p_end();
1390  } else {
1391 
1392  myUndoList->p_begin("straighten " + toString(SUMO_TAG_EDGE));
1394  myUndoList->p_end();
1395  }
1396  }
1397  return 1;
1398 }
1399 
1400 
1401 long
1402 GNEViewNet::onCmdSmoothEdges(FXObject*, FXSelector, void*) {
1403  GNEEdge* edge = getEdgeAtPopupPosition();
1404  if (edge != nullptr) {
1405  if (edge->isAttributeCarrierSelected()) {
1406  myUndoList->p_begin("straighten elevation of selected " + toString(SUMO_TAG_EDGE) + "s");
1407  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1408  for (auto it : edges) {
1409  it->smooth(myUndoList);
1410  }
1411  myUndoList->p_end();
1412  } else {
1413  myUndoList->p_begin("straighten edge elevation");
1414  edge->smooth(myUndoList);
1415  myUndoList->p_end();
1416  }
1417  }
1418  return 1;
1419 }
1420 
1421 
1422 long
1423 GNEViewNet::onCmdStraightenEdgesElevation(FXObject*, FXSelector, void*) {
1424  GNEEdge* edge = getEdgeAtPopupPosition();
1425  if (edge != nullptr) {
1426  if (edge->isAttributeCarrierSelected()) {
1427  myUndoList->p_begin("straighten elevation of selected " + toString(SUMO_TAG_EDGE) + "s");
1428  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1429  for (auto it : edges) {
1430  it->straightenElevation(myUndoList);
1431  }
1432  myUndoList->p_end();
1433  } else {
1434  myUndoList->p_begin("straighten edge elevation");
1436  myUndoList->p_end();
1437  }
1438  }
1439  return 1;
1440 }
1441 
1442 
1443 long
1444 GNEViewNet::onCmdSmoothEdgesElevation(FXObject*, FXSelector, void*) {
1445  GNEEdge* edge = getEdgeAtPopupPosition();
1446  if (edge != nullptr) {
1447  if (edge->isAttributeCarrierSelected()) {
1448  myUndoList->p_begin("smooth elevation of selected " + toString(SUMO_TAG_EDGE) + "s");
1449  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1450  for (auto it : edges) {
1451  it->smoothElevation(myUndoList);
1452  }
1453  myUndoList->p_end();
1454  } else {
1455  myUndoList->p_begin("smooth edge elevation");
1456  edge->smoothElevation(myUndoList);
1457  myUndoList->p_end();
1458  }
1459  }
1460  return 1;
1461 }
1462 
1463 
1464 long
1465 GNEViewNet::onCmdResetLength(FXObject*, FXSelector, void*) {
1466  GNEEdge* edge = getEdgeAtPopupPosition();
1467  if (edge != nullptr) {
1468  if (edge->isAttributeCarrierSelected()) {
1469  myUndoList->p_begin("reset edge lengthss");
1470  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1471  for (auto it : edges) {
1472  it->setAttribute(SUMO_ATTR_LENGTH, "-1", myUndoList);
1473  }
1474  myUndoList->p_end();
1475  } else {
1477  }
1478  }
1479  return 1;
1480 }
1481 
1482 
1483 long
1484 GNEViewNet::onCmdSimplifyShape(FXObject*, FXSelector, void*) {
1485  if (myEditShapes.editedShapePoly != nullptr) {
1487  update();
1488  } else {
1489  GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
1490  if (polygonUnderMouse) {
1491  polygonUnderMouse->simplifyShape();
1492  }
1493  }
1494  return 1;
1495 }
1496 
1497 
1498 long
1499 GNEViewNet::onCmdDeleteGeometryPoint(FXObject*, FXSelector, void*) {
1500  if (myEditShapes.editedShapePoly != nullptr) {
1502  update();
1503  } else {
1504  GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
1505  if (polygonUnderMouse) {
1506  polygonUnderMouse->deleteGeometryPoint(getPopupPosition());
1507  }
1508  }
1509  return 1;
1510 }
1511 
1512 
1513 long
1514 GNEViewNet::onCmdClosePolygon(FXObject*, FXSelector, void*) {
1515  if (myEditShapes.editedShapePoly != nullptr) {
1517  update();
1518  } else {
1519  GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
1520  if (polygonUnderMouse) {
1521  polygonUnderMouse->closePolygon();
1522  }
1523  }
1524  return 1;
1525 }
1526 
1527 
1528 long
1529 GNEViewNet::onCmdOpenPolygon(FXObject*, FXSelector, void*) {
1530  if (myEditShapes.editedShapePoly != nullptr) {
1532  update();
1533  } else {
1534  GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
1535  if (polygonUnderMouse) {
1536  polygonUnderMouse->openPolygon();
1537  }
1538  }
1539  return 1;
1540 }
1541 
1542 
1543 long
1544 GNEViewNet::onCmdSetFirstGeometryPoint(FXObject*, FXSelector, void*) {
1545  if (myEditShapes.editedShapePoly != nullptr) {
1547  update();
1548  } else {
1549  GNEPoly* polygonUnderMouse = getPolygonAtPopupPosition();
1550  if (polygonUnderMouse) {
1551  polygonUnderMouse->changeFirstGeometryPoint(polygonUnderMouse->getVertexIndex(getPopupPosition(), false, false));
1552  }
1553  }
1554  return 1;
1555 }
1556 
1557 
1558 long
1559 GNEViewNet::onCmdTransformPOI(FXObject*, FXSelector, void*) {
1560  // obtain POI at popup position
1562  if (POI) {
1563  // check what type of POI will be transformed
1564  if (POI->getTagProperty().getTag() == SUMO_TAG_POI) {
1565  // obtain lanes around POI boundary
1566  std::vector<GUIGlID> GLIDs = getObjectsInBoundary(POI->getCenteringBoundary(), false);
1567  std::vector<GNELane*> lanes;
1568  for (auto i : GLIDs) {
1569  GNELane* lane = dynamic_cast<GNELane*>(GUIGlObjectStorage::gIDStorage.getObjectBlocking(i));
1570  if (lane) {
1571  lanes.push_back(lane);
1572  }
1573  }
1574  if (lanes.empty()) {
1575  WRITE_WARNING("No lanes around " + toString(SUMO_TAG_POI) + " to attach it");
1576  } else {
1577  // obtain nearest lane to POI
1578  GNELane* nearestLane = lanes.front();
1579  double minorPosOverLane = nearestLane->getLaneShape().nearest_offset_to_point2D(POI->getPositionInView());
1580  double minorLateralOffset = nearestLane->getLaneShape().positionAtOffset(minorPosOverLane).distanceTo(POI->getPositionInView());
1581  for (auto i : lanes) {
1582  double posOverLane = i->getLaneShape().nearest_offset_to_point2D(POI->getPositionInView());
1583  double lateralOffset = i->getLaneShape().positionAtOffset(posOverLane).distanceTo(POI->getPositionInView());
1584  if (lateralOffset < minorLateralOffset) {
1585  minorPosOverLane = posOverLane;
1586  minorLateralOffset = lateralOffset;
1587  nearestLane = i;
1588  }
1589  }
1590  // obtain values of POI
1591  std::string id = POI->getID();
1592  std::string type = POI->getShapeType();
1593  RGBColor color = POI->getShapeColor();
1594  Position pos = (*POI);
1595  double layer = POI->getShapeLayer();
1596  double angle = POI->getShapeNaviDegree();
1597  std::string imgFile = POI->getShapeImgFile();
1598  bool relativePath = POI->getShapeRelativePath();
1599  double POIWidth = POI->getWidth(); // double width -> C4458
1600  double POIHeight = POI->getHeight(); // double height -> C4458
1601  // remove POI
1602  myUndoList->p_begin("attach POI into " + toString(SUMO_TAG_LANE));
1604  // add POILane
1605  myNet->addPOI(id, type, color, pos, false, nearestLane->getID(), minorPosOverLane, 0, layer, angle, imgFile, relativePath, POIWidth, POIHeight);
1606  myUndoList->p_end();
1607  }
1608  } else {
1609  // obtain values of POILane
1610  std::string id = POI->getID();
1611  std::string type = POI->getShapeType();
1612  RGBColor color = POI->getShapeColor();
1613  Position pos = (*POI);
1614  double layer = POI->getShapeLayer();
1615  double angle = POI->getShapeNaviDegree();
1616  std::string imgFile = POI->getShapeImgFile();
1617  bool relativePath = POI->getShapeRelativePath();
1618  double POIWidth = POI->getWidth(); // double width -> C4458
1619  double POIWeight = POI->getHeight(); // double height -> C4458
1620  // remove POI
1621  myUndoList->p_begin("release POI from " + toString(SUMO_TAG_LANE));
1623  // add POI
1624  myNet->addPOI(id, type, color, pos, false, "", 0, 0, layer, angle, imgFile, relativePath, POIWidth, POIWeight);
1625  myUndoList->p_end();
1626  }
1627  // update view after transform
1628  update();
1629  }
1630  return 1;
1631 }
1632 
1633 
1634 long
1635 GNEViewNet::onCmdDuplicateLane(FXObject*, FXSelector, void*) {
1636  GNELane* lane = getLaneAtPopupPosition();
1637  if (lane != nullptr) {
1638  // when duplicating an unselected lane, keep all connections as they
1639  // are, otherwise recompute them
1640  if (lane->isAttributeCarrierSelected()) {
1641  myUndoList->p_begin("duplicate selected " + toString(SUMO_TAG_LANE) + "s");
1642  std::vector<GNELane*> lanes = myNet->retrieveLanes(true);
1643  for (auto it : lanes) {
1644  myNet->duplicateLane(it, myUndoList, true);
1645  }
1646  myUndoList->p_end();
1647  } else {
1648  myUndoList->p_begin("duplicate " + toString(SUMO_TAG_LANE));
1649  myNet->duplicateLane(lane, myUndoList, false);
1650  myUndoList->p_end();
1651  }
1652  }
1653  return 1;
1654 }
1655 
1656 
1657 long
1658 GNEViewNet::onCmdResetLaneCustomShape(FXObject*, FXSelector, void*) {
1659  GNELane* lane = getLaneAtPopupPosition();
1660  if (lane != nullptr) {
1661  // when duplicating an unselected lane, keep all connections as they
1662  // are, otherwise recompute them
1663  if (lane->isAttributeCarrierSelected()) {
1664  myUndoList->p_begin("reset custom lane shapes");
1665  std::vector<GNELane*> lanes = myNet->retrieveLanes(true);
1666  for (auto it : lanes) {
1667  it->setAttribute(SUMO_ATTR_CUSTOMSHAPE, "", myUndoList);
1668  }
1669  myUndoList->p_end();
1670  } else {
1671  myUndoList->p_begin("reset custom lane shape");
1673  myUndoList->p_end();
1674  }
1675  }
1676  return 1;
1677 }
1678 
1679 
1680 long
1681 GNEViewNet::onCmdLaneOperation(FXObject*, FXSelector sel, void*) {
1682  // check lane operation
1683  switch (FXSELID(sel)) {
1685  return restrictLane(SVC_PEDESTRIAN);
1687  return restrictLane(SVC_BICYCLE);
1689  return restrictLane(SVC_BUS);
1691  return restrictLane(SVC_IGNORING);
1694  case MID_GNE_LANE_ADD_BIKE:
1696  case MID_GNE_LANE_ADD_BUS:
1697  return addRestrictedLane(SVC_BUS);
1705  return removeRestrictedLane(SVC_BUS);
1708  default:
1709  return 0;
1710  break;
1711  }
1712 }
1713 
1714 
1715 long
1716 GNEViewNet::onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*) {
1717  // retrieve additional under cursor
1719  // check if additional can open dialog
1720  if (addtional && addtional->getTagProperty().hasDialog()) {
1721  addtional->openAdditionalDialog();
1722  }
1723  return 1;
1724 }
1725 
1726 
1727 bool
1729  GNELane* lane = getLaneAtPopupPosition();
1730  if (lane != nullptr) {
1731  // Get selected lanes
1732  std::vector<GNELane*> lanes = myNet->retrieveLanes(true); ;
1733  // Declare map of edges and lanes
1734  std::map<GNEEdge*, GNELane*> mapOfEdgesAndLanes;
1735  // Iterate over selected lanes
1736  for (auto i : lanes) {
1737  mapOfEdgesAndLanes[myNet->retrieveEdge(i->getParentEdge()->getID())] = i;
1738  }
1739  // Throw warning dialog if there hare multiple lanes selected in the same edge
1740  if (mapOfEdgesAndLanes.size() != lanes.size()) {
1741  FXMessageBox::information(getApp(), MBOX_OK,
1742  "Multiple lane in the same edge selected", "%s",
1743  ("There are selected lanes that belong to the same edge.\n Only one lane per edge will be restricted for " + toString(vclass) + ".").c_str());
1744  }
1745  // If we handeln a set of lanes
1746  if (mapOfEdgesAndLanes.size() > 0) {
1747  // declare counter for number of Sidewalks
1748  int counter = 0;
1749  // iterate over selected lanes
1750  for (auto i : mapOfEdgesAndLanes) {
1751  if (i.first->hasRestrictedLane(vclass)) {
1752  counter++;
1753  }
1754  }
1755  // if all edges parent own a Sidewalk, stop function
1756  if (counter == (int)mapOfEdgesAndLanes.size()) {
1757  FXMessageBox::information(getApp(), MBOX_OK,
1758  ("Set vclass for " + toString(vclass) + " to selected lanes").c_str(), "%s",
1759  ("All lanes own already another lane in the same edge with a restriction for " + toString(vclass)).c_str());
1760  return 0;
1761  } else {
1762  WRITE_DEBUG("Opening FXMessageBox 'restrict lanes'");
1763  // Ask confirmation to user
1764  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1765  ("Set vclass for " + toString(vclass) + " to selected lanes").c_str(), "%s",
1766  (toString(mapOfEdgesAndLanes.size() - counter) + " lanes will be restricted for " + toString(vclass) + ". continue?").c_str());
1767  if (answer != 1) { //1:yes, 2:no, 4:esc
1768  // write warning if netedit is running in testing mode
1769  if (answer == 2) {
1770  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'No'");
1771  } else if (answer == 4) {
1772  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'ESC'");
1773  }
1774  return 0;
1775  } else {
1776  // write warning if netedit is running in testing mode
1777  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'Yes'");
1778  }
1779  }
1780  // begin undo operation
1781  myUndoList->p_begin("restrict lanes to " + toString(vclass));
1782  // iterate over selected lanes
1783  for (std::map<GNEEdge*, GNELane*>::iterator i = mapOfEdgesAndLanes.begin(); i != mapOfEdgesAndLanes.end(); i++) {
1784  // Transform lane to Sidewalk
1785  myNet->restrictLane(vclass, i->second, myUndoList);
1786  }
1787  // end undo operation
1788  myUndoList->p_end();
1789  } else {
1790  // If only have a single lane, start undo/redo operation
1791  myUndoList->p_begin("restrict lane to " + toString(vclass));
1792  // Transform lane to Sidewalk
1793  myNet->restrictLane(vclass, lane, myUndoList);
1794  // end undo operation
1795  myUndoList->p_end();
1796  }
1797  }
1798  return 1;
1799 }
1800 
1801 
1802 bool
1804  GNELane* lane = getLaneAtPopupPosition();
1805  if (lane != nullptr) {
1806  // Get selected edges
1807  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1808  // get selected lanes
1809  std::vector<GNELane*> lanes = myNet->retrieveLanes(true);
1810  // Declare set of edges
1811  std::set<GNEEdge*> setOfEdges;
1812  // Fill set of edges with vector of edges
1813  for (auto i : edges) {
1814  setOfEdges.insert(i);
1815  }
1816  // iterate over selected lanes
1817  for (auto it : lanes) {
1818  // Insert pointer to edge into set of edges (To avoid duplicates)
1819  setOfEdges.insert(myNet->retrieveEdge(it->getParentEdge()->getID()));
1820  }
1821  // If we handeln a set of edges
1822  if (setOfEdges.size() > 0) {
1823  // declare counter for number of restrictions
1824  int counter = 0;
1825  // iterate over set of edges
1826  for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1827  // update counter if edge has already a restricted lane of type "vclass"
1828  if ((*it)->hasRestrictedLane(vclass)) {
1829  counter++;
1830  }
1831  }
1832  // if all lanes own a Sidewalk, stop function
1833  if (counter == (int)setOfEdges.size()) {
1834  FXMessageBox::information(getApp(), MBOX_OK,
1835  ("Add vclass for" + toString(vclass) + " to selected lanes").c_str(), "%s",
1836  ("All lanes own already another lane in the same edge with a restriction for " + toString(vclass)).c_str());
1837  return 0;
1838  } else {
1839  WRITE_DEBUG("Opening FXMessageBox 'restrict lanes'");
1840  // Ask confirmation to user
1841  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1842  ("Add vclass for " + toString(vclass) + " to selected lanes").c_str(), "%s",
1843  (toString(setOfEdges.size() - counter) + " restrictions for " + toString(vclass) + " will be added. continue?").c_str());
1844  if (answer != 1) { //1:yes, 2:no, 4:esc
1845  // write warning if netedit is running in testing mode
1846  if (answer == 2) {
1847  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'No'");
1848  } else if (answer == 4) {
1849  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'ESC'");
1850  }
1851  return 0;
1852  } else {
1853  // write warning if netedit is running in testing mode
1854  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'Yes'");
1855  }
1856  }
1857  // begin undo operation
1858  myUndoList->p_begin("Add restrictions for " + toString(vclass));
1859  // iterate over set of edges
1860  for (const auto& edge : setOfEdges) {
1861  // add restricted lane (guess target)
1862  myNet->addRestrictedLane(vclass, edge, -1, myUndoList);
1863  }
1864  // end undo operation
1865  myUndoList->p_end();
1866  } else {
1867  // If only have a single lane, start undo/redo operation
1868  myUndoList->p_begin("Add vclass for " + toString(vclass));
1869  // Add restricted lane
1870  if (vclass == SVC_PEDESTRIAN) {
1871  // always add pedestrian lanes on the right
1872  myNet->addRestrictedLane(vclass, lane->getParentEdge(), 0, myUndoList);
1873  } else if (lane->getParentEdge()->getLanes().size() == 1) {
1874  // guess insertion position if there is only 1 lane
1875  myNet->addRestrictedLane(vclass, lane->getParentEdge(), -1, myUndoList);
1876  } else {
1877  myNet->addRestrictedLane(vclass, lane->getParentEdge(), lane->getIndex(), myUndoList);
1878  }
1879  // end undo/redo operation
1880  myUndoList->p_end();
1881  }
1882  }
1883  return 1;
1884 }
1885 
1886 
1887 bool
1889  GNELane* lane = getLaneAtPopupPosition();
1890  if (lane != nullptr) {
1891  // Get selected edges
1892  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
1893  // get selected lanes
1894  std::vector<GNELane*> lanes = myNet->retrieveLanes(true);
1895  // Declare set of edges
1896  std::set<GNEEdge*> setOfEdges;
1897  // Fill set of edges with vector of edges
1898  for (auto i : edges) {
1899  setOfEdges.insert(i);
1900  }
1901  // iterate over selected lanes
1902  for (auto it : lanes) {
1903  // Insert pointer to edge into set of edges (To avoid duplicates)
1904  setOfEdges.insert(myNet->retrieveEdge(it->getParentEdge()->getID()));
1905  }
1906  // If we handeln a set of edges
1907  if (setOfEdges.size() > 0) {
1908  // declare counter for number of restrictions
1909  int counter = 0;
1910  // iterate over set of edges
1911  for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1912  // update counter if edge has already a restricted lane of type "vclass"
1913  if ((*it)->hasRestrictedLane(vclass)) {
1914  counter++;
1915  }
1916  }
1917  // if all lanes don't own a Sidewalk, stop function
1918  if (counter == 0) {
1919  FXMessageBox::information(getApp(), MBOX_OK,
1920  ("Remove vclass for " + toString(vclass) + " to selected lanes").c_str(), "%s",
1921  ("Selected lanes and edges haven't a restriction for " + toString(vclass)).c_str());
1922  return 0;
1923  } else {
1924  WRITE_DEBUG("Opening FXMessageBox 'restrict lanes'");
1925  // Ask confirmation to user
1926  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1927  ("Remove vclass for " + toString(vclass) + " to selected lanes").c_str(), "%s",
1928  (toString(counter) + " restrictions for " + toString(vclass) + " will be removed. continue?").c_str());
1929  if (answer != 1) { //1:yes, 2:no, 4:esc
1930  // write warning if netedit is running in testing mode
1931  if (answer == 2) {
1932  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'No'");
1933  } else if (answer == 4) {
1934  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'ESC'");
1935  }
1936  return 0;
1937  } else {
1938  // write warning if netedit is running in testing mode
1939  WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'Yes'");
1940  }
1941  }
1942  // begin undo operation
1943  myUndoList->p_begin("Remove restrictions for " + toString(vclass));
1944  // iterate over set of edges
1945  for (const auto& edge : setOfEdges) {
1946  // add Sidewalk
1947  myNet->removeRestrictedLane(vclass, edge, myUndoList);
1948  }
1949  // end undo operation
1950  myUndoList->p_end();
1951  } else {
1952  // If only have a single lane, start undo/redo operation
1953  myUndoList->p_begin("Remove vclass for " + toString(vclass));
1954  // Remove Sidewalk
1956  // end undo/redo operation
1957  myUndoList->p_end();
1958  }
1959  }
1960  return 1;
1961 }
1962 
1963 
1964 void
1965 GNEViewNet::processClick(void* eventData) {
1966  FXEvent* evt = (FXEvent*)eventData;
1967  // process click
1968  destroyPopup();
1969  setFocus();
1970  myChanger->onLeftBtnPress(eventData);
1971  grab();
1972  // Check there are double click
1973  if (evt->click_count == 2) {
1974  handle(this, FXSEL(SEL_DOUBLECLICKED, 0), eventData);
1975  }
1976 }
1977 
1978 
1979 void
1981  // declare a flag for cursor move
1982  bool cursorMove = false;
1983  // check if in current mode/supermode cursor move can be shown
1988  cursorMove = true;
1989  }
1994  cursorMove = true;
1995  }
1996  }
1997  // update cursor if control key is pressed
1998  if (myKeyPressed.controlKeyPressed() && cursorMove) {
1999  setDefaultCursor(GUICursorSubSys::getCursor(SUMOCURSOR_MOVE));
2001  } else {
2004  }
2005 }
2006 
2007 
2008 long
2009 GNEViewNet::onCmdEditJunctionShape(FXObject*, FXSelector, void*) {
2010  // Obtain junction under mouse
2012  if (junction) {
2013  if (!OptionsCont::getOptions().getBool("lefthand")) {
2014  // for lefthand networks, the shape is already computed in GNELoadThread::run()
2015  // computing it here does not work because the network needs to be
2016  // mirrored before and after
2017  junction->getNBNode()->computeNodeShape(-1);
2018  } else if (junction->getNBNode()->getShape().size() == 0) {
2019  // recompute the whole network
2021  }
2022  PositionVector nodeShape = junction->getNBNode()->getShape();
2023  nodeShape.closePolygon();
2024  myEditShapes.startEditCustomShape(junction, nodeShape, true);
2025  }
2026  // destroy pop-up and set focus in view net
2027  destroyPopup();
2028  setFocus();
2029  return 1;
2030 }
2031 
2032 
2033 long
2034 GNEViewNet::onCmdResetJunctionShape(FXObject*, FXSelector, void*) {
2035  // Obtain junction under mouse
2037  if (junction) {
2038  // are, otherwise recompute them
2039  if (junction->isAttributeCarrierSelected()) {
2040  myUndoList->p_begin("reset custom junction shapes");
2041  std::vector<GNEJunction*> junctions = myNet->retrieveJunctions(true);
2042  for (auto it : junctions) {
2043  it->setAttribute(SUMO_ATTR_SHAPE, "", myUndoList);
2044  }
2045  myUndoList->p_end();
2046  } else {
2047  myUndoList->p_begin("reset custom junction shape");
2048  junction->setAttribute(SUMO_ATTR_SHAPE, "", myUndoList);
2049  myUndoList->p_end();
2050  }
2051  }
2052  // destroy pop-up and set focus in view net
2053  destroyPopup();
2054  setFocus();
2055  return 1;
2056 }
2057 
2058 
2059 long
2060 GNEViewNet::onCmdReplaceJunction(FXObject*, FXSelector, void*) {
2062  if (junction != nullptr) {
2064  update();
2065  }
2066  // destroy pop-up and set focus in view net
2067  destroyPopup();
2068  setFocus();
2069  return 1;
2070 }
2071 
2072 
2073 long
2074 GNEViewNet::onCmdSplitJunction(FXObject*, FXSelector, void*) {
2076  if (junction != nullptr) {
2077  myNet->splitJunction(junction, false, myUndoList);
2078  update();
2079  }
2080  // destroy pop-up and set focus in view net
2081  destroyPopup();
2082  setFocus();
2083  return 1;
2084 }
2085 
2086 
2087 long
2088 GNEViewNet::onCmdSplitJunctionReconnect(FXObject*, FXSelector, void*) {
2090  if (junction != nullptr) {
2091  myNet->splitJunction(junction, true, myUndoList);
2092  update();
2093  }
2094  // destroy pop-up and set focus in view net
2095  destroyPopup();
2096  setFocus();
2097  return 1;
2098 }
2099 
2100 
2101 long
2102 GNEViewNet::onCmdClearConnections(FXObject*, FXSelector, void*) {
2104  if (junction != nullptr) {
2105  // check if we're handling a selection
2106  if (junction->isAttributeCarrierSelected()) {
2107  std::vector<GNEJunction*> selectedJunction = myNet->retrieveJunctions(true);
2108  myUndoList->p_begin("clear connections of selected junctions");
2109  for (auto i : selectedJunction) {
2111  }
2112  myUndoList->p_end();
2113  } else {
2115  }
2116  update();
2117  }
2118  // destroy pop-up and set focus in view net
2119  destroyPopup();
2120  setFocus();
2121  return 1;
2122 }
2123 
2124 
2125 long
2126 GNEViewNet::onCmdResetConnections(FXObject*, FXSelector, void*) {
2128  if (junction != nullptr) {
2129  // check if we're handling a selection
2130  if (junction->isAttributeCarrierSelected()) {
2131  std::vector<GNEJunction*> selectedJunction = myNet->retrieveJunctions(true);
2132  myUndoList->p_begin("reset connections of selected junctions");
2133  for (auto i : selectedJunction) {
2135  }
2136  myUndoList->p_end();
2137  } else {
2139  }
2140  update();
2141  }
2142  // destroy pop-up and set focus in view net
2143  destroyPopup();
2144  setFocus();
2145  return 1;
2146 }
2147 
2148 
2149 long
2150 GNEViewNet::onCmdEditConnectionShape(FXObject*, FXSelector, void*) {
2151  // Obtain connection under mouse
2153  if (connection) {
2154  myEditShapes.startEditCustomShape(connection, connection->getConnectionShape(), false);
2155  }
2156  // destroy pop-up and update view Net
2157  destroyPopup();
2158  setFocus();
2159  return 1;
2160 }
2161 
2162 
2163 long
2164 GNEViewNet::onCmdEditCrossingShape(FXObject*, FXSelector, void*) {
2165  // Obtain crossing under mouse
2167  if (crossing) {
2168  // due crossings haven two shapes, check what has to be edited
2169  PositionVector shape = crossing->getNBCrossing()->customShape.size() > 0 ? crossing->getNBCrossing()->customShape : crossing->getNBCrossing()->shape;
2170  myEditShapes.startEditCustomShape(crossing, shape, false);
2171  }
2172  // destroy pop-up and update view Net
2173  destroyPopup();
2174  setFocus();
2175  return 1;
2176 }
2177 
2178 
2179 long
2180 GNEViewNet::onCmdToogleShowDemandElements(FXObject*, FXSelector sel, void*) {
2181  // update view to show demand elements
2182  update();
2183  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2184  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS)) {
2186  }
2187  return 1;
2188 }
2189 
2190 
2191 long
2192 GNEViewNet::onCmdToogleSelectEdges(FXObject*, FXSelector sel, void*) {
2193  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2194  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES)) {
2196  }
2197  return 1;
2198 }
2199 
2200 
2201 long
2202 GNEViewNet::onCmdToogleShowConnections(FXObject*, FXSelector sel, void*) {
2203  // if show was enabled, init GNEConnections
2204  if (myNetworkViewOptions.menuCheckShowConnections->getCheck() == TRUE) {
2206  }
2207  // change flag "showLane2Lane" in myVisualizationSettings
2209  // Hide/show connections require recompute
2210  getNet()->requireRecompute();
2211  // Update viewnNet to show/hide conections
2212  update();
2213  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2214  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS)) {
2216  }
2217  return 1;
2218 }
2219 
2220 
2221 long
2222 GNEViewNet::onCmdToogleHideConnections(FXObject*, FXSelector sel, void*) {
2223  // Update viewnNet to show/hide conections
2224  update();
2225  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2226  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS)) {
2228  }
2229  return 1;
2230 }
2231 
2232 
2233 long
2234 GNEViewNet::onCmdToogleExtendSelection(FXObject*, FXSelector sel, void*) {
2235  // Only update view
2236  update();
2237  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2238  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION)) {
2240  }
2241  return 1;
2242 }
2243 
2244 
2245 long
2246 GNEViewNet::onCmdToogleChangeAllPhases(FXObject*, FXSelector sel, void*) {
2247  // Only update view
2248  update();
2249  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2250  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES)) {
2252  }
2253  return 1;
2254 }
2255 
2256 
2257 long
2258 GNEViewNet::onCmdToogleShowGrid(FXObject*, FXSelector sel, void*) {
2259  // show or hidde grid depending of myNetworkViewOptions.menuCheckShowGrid
2260  if (myCommonViewOptions.menuCheckShowGrid->getCheck()) {
2262  } else {
2264  }
2265  // update view to show grid
2266  update();
2267  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2268  if (sel == FXSEL(SEL_COMMAND, MID_GNE_COMMONVIEWOPTIONS_SHOWGRID)) {
2270  }
2271  return 1;
2272 }
2273 
2274 
2275 long
2276 GNEViewNet::onCmdToogleWarnAboutMerge(FXObject*, FXSelector sel, void*) {
2277  // Only update view
2278  update();
2279  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2280  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_ASKFORMERGE)) {
2282  }
2283  return 1;
2284 }
2285 
2286 
2287 long
2288 GNEViewNet::onCmdToogleShowJunctionBubbles(FXObject*, FXSelector sel, void*) {
2289  // Only update view
2290  update();
2291  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2292  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES)) {
2294  }
2295  return 1;
2296 }
2297 
2298 
2299 long
2300 GNEViewNet::onCmdToogleMoveElevation(FXObject*, FXSelector sel, void*) {
2301  // Only update view
2302  update();
2303  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2304  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION)) {
2306  }
2307  return 1;
2308 }
2309 
2310 
2311 long
2312 GNEViewNet::onCmdToogleChainEdges(FXObject*, FXSelector sel, void*) {
2313  // Only update view
2314  update();
2315  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2316  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES)) {
2318  }
2319  return 1;
2320 }
2321 
2322 
2323 long
2324 GNEViewNet::onCmdToogleAutoOppositeEdge(FXObject*, FXSelector sel, void*) {
2325  // Only update view
2326  update();
2327  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2328  if (sel == FXSEL(SEL_COMMAND, MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES)) {
2330  }
2331  return 1;
2332 }
2333 
2334 
2335 long
2336 GNEViewNet::onCmdToogleHideNonInspecteDemandElements(FXObject*, FXSelector sel, void*) {
2337  // Only update view
2338  update();
2339  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2340  if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED)) {
2342  }
2343  return 1;
2344 }
2345 
2346 
2347 long
2348 GNEViewNet::onCmdToogleHideShapes(FXObject*, FXSelector sel, void*) {
2349  // Only update view
2350  update();
2351  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2352  if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES)) {
2354  }
2355  return 1;
2356 }
2357 
2358 
2359 long
2360 GNEViewNet::onCmdToogleShowAllPersonPlans(FXObject*, FXSelector sel, void*) {
2361  // Only update view
2362  update();
2363  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2364  if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS)) {
2366  }
2367  return 1;
2368 }
2369 
2370 
2371 long
2372 GNEViewNet::onCmdToogleLockPerson(FXObject*, FXSelector sel, void*) {
2373  // lock or unlock current inspected person depending of menuCheckLockPerson value
2374  if (myDemandViewOptions.menuCheckLockPerson->getCheck()) {
2375  // obtan locked person or person plan
2376  const GNEDemandElement* personOrPersonPlan = dynamic_cast<const GNEDemandElement*>(getDottedAC());
2377  if (personOrPersonPlan) {
2378  // lock person depending if casted demand element is either a person or a person plan
2379  if (personOrPersonPlan->getTagProperty().isPerson()) {
2380  myDemandViewOptions.lockPerson(personOrPersonPlan);
2381  // change menuCheckLockPerson text
2382  myDemandViewOptions.menuCheckLockPerson->setText(("unlock " + personOrPersonPlan->getID()).c_str());
2383  } else {
2384  myDemandViewOptions.lockPerson(personOrPersonPlan->getParentDemandElements().front());
2385  // change menuCheckLockPerson text
2386  myDemandViewOptions.menuCheckLockPerson->setText(("unlock " + personOrPersonPlan->getParentDemandElements().front()->getID()).c_str());
2387  }
2388  }
2389  } else {
2390  // unlock current person
2392  // change menuCheckLockPerson text
2393  myDemandViewOptions.menuCheckLockPerson->setText("lock person");
2394  }
2395  // update view
2396  update();
2397  // set focus in menu check again, if this function was called clicking over menu check instead using alt+<key number>
2398  if (sel == FXSEL(SEL_COMMAND, MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON)) {
2400  }
2401  return 1;
2402 }
2403 
2404 
2405 long
2406 GNEViewNet::onCmdAddSelected(FXObject*, FXSelector, void*) {
2407  // make GL current (To allow take objects in popup position)
2408  if (makeCurrent()) {
2410  GNEAttributeCarrier* ACToselect = dynamic_cast <GNEAttributeCarrier*>(GUIGlObjectStorage::gIDStorage.getObjectBlocking(id));
2412  // make sure that AC is selected before selecting
2413  if (ACToselect && !ACToselect->isAttributeCarrierSelected()) {
2414  ACToselect->selectAttributeCarrier();
2415  }
2416  // make non current
2417  makeNonCurrent();
2418  }
2419  return 1;
2420 }
2421 
2422 
2423 long
2424 GNEViewNet::onCmdRemoveSelected(FXObject*, FXSelector, void*) {
2425  // make GL current (To allow take objects in popup position)
2426  if (makeCurrent()) {
2428  GNEAttributeCarrier* ACToselect = dynamic_cast <GNEAttributeCarrier*>(GUIGlObjectStorage::gIDStorage.getObjectBlocking(id));
2430  // make sure that AC is selected before unselecting
2431  if (ACToselect && ACToselect->isAttributeCarrierSelected()) {
2432  ACToselect->unselectAttributeCarrier();
2433  }
2434  // make non current
2435  makeNonCurrent();
2436  }
2437  return 1;
2438 }
2439 
2440 // ===========================================================================
2441 // private
2442 // ===========================================================================
2443 
2444 void
2446  // first build supermode buttons
2448 
2449  // build menu checks for Common checkable buttons
2451 
2452  // build menu checks for Network checkable buttons
2454 
2455  // build menu checks for Demand checkable buttons
2457 
2458  // build menu checks of view options Common
2460 
2461  // build menu checks of view options Network
2463 
2464  // build menu checks of view options Demand
2466 }
2467 
2468 
2469 void
2471  // hide grid
2473  // hide all checkbox of view options Common
2475  // hide all checkbox of view options Network
2477  // hide all checkbox of view options Demand
2479  // disable all common edit modes
2481  // disable all network edit modes
2483  // hide all frames
2485  // In network mode, always show option "show demand elements"
2487  // enable selected controls
2488  switch (myEditModes.networkEditMode) {
2489  // common modes
2490  case GNE_NMODE_INSPECT:
2495  // show view options
2498  // show toolbar grip of view options
2500  break;
2501  case GNE_NMODE_DELETE:
2507  // show view options
2509  // show toolbar grip of view options
2511  break;
2512  case GNE_NMODE_SELECT:
2517  // show view options
2521  // show toolbar grip of view options
2523  break;
2524  // specific modes
2525  case GNE_NMODE_CREATE_EDGE:
2529  // show view options
2531  // show toolbar grip of view options
2533  break;
2534  case GNE_NMODE_MOVE:
2539  // show view options
2541  // show toolbar grip of view options
2543  break;
2544  case GNE_NMODE_CONNECT:
2549  // show view options
2551  // show toolbar grip of view options
2553  break;
2554  case GNE_NMODE_TLS:
2559  // show view options
2561  // show toolbar grip of view options
2563  break;
2564  case GNE_NMODE_ADDITIONAL:
2569  // show view options
2571  // show toolbar grip of view options
2573  break;
2574  case GNE_NMODE_CROSSING:
2579  // show view options
2580  myCommonViewOptions.menuCheckShowGrid->setCheck(false);
2581  // show toolbar grip of view options
2583  break;
2584  case GNE_NMODE_TAZ:
2589  // show view options
2590  myCommonViewOptions.menuCheckShowGrid->setCheck(false);
2591  // show toolbar grip of view options
2593  break;
2594  case GNE_NMODE_POLYGON:
2599  // show view options
2601  // show toolbar grip of view options
2603  break;
2604  case GNE_NMODE_PROHIBITION:
2609  // hide toolbar grip of view options
2611  break;
2612  default:
2613  break;
2614  }
2615  // update common Network buttons
2617  // Update Network buttons
2619  // recalc toolbar
2621  // force repaint because different modes draw different things
2622  onPaint(nullptr, 0, nullptr);
2623  // finally update view
2624  update();
2625 }
2626 
2627 
2628 void
2630  // hide grid
2632  // hide all checkbox of view options Network
2634  // hide all checkbox of view options Demand
2636  // disable all common edit modes
2638  // disable all Demand edit modes
2640  // hide all frames
2642  // enable selected controls
2643  switch (myEditModes.demandEditMode) {
2644  // common modes
2645  case GNE_DMODE_INSPECT:
2650  // show view options
2655  // show toolbar grip of view options
2657  break;
2658  case GNE_DMODE_DELETE:
2663  // show view options
2667  // show toolbar grip of view options
2669  break;
2670  case GNE_DMODE_SELECT:
2675  // show view options
2679  // show toolbar grip of view options
2681  break;
2682  case GNE_DMODE_MOVE:
2684  // show view options
2689  // show toolbar grip of view options
2691  break;
2692  // specific modes
2693  case GNE_DMODE_ROUTE:
2698  // show view options
2702  // show toolbar grip of view options
2704  break;
2705  case GNE_DMODE_VEHICLE:
2710  // show view options
2714  // show toolbar grip of view options
2716  break;
2722  // show view options
2728  break;
2729  case GNE_DMODE_STOP:
2734  // show view options
2738  // show toolbar grip of view options
2740  break;
2741  case GNE_DMODE_PERSONTYPES:
2746  // show view options
2750  // show toolbar grip of view options
2752  break;
2753  case GNE_DMODE_PERSON:
2758  // show view options
2762  // show toolbar grip of view options
2764  break;
2765  case GNE_DMODE_PERSONPLAN:
2770  // show view options
2774  // show toolbar grip of view options
2776  break;
2777  default:
2778  break;
2779  }
2780  // update common Network buttons
2782  // Update Demand buttons
2784  // recalc toolbar
2786  // force repaint because different modes draw different things
2787  onPaint(nullptr, 0, nullptr);
2788  // finally update view
2789  update();
2790 }
2791 
2792 
2793 void
2795  std::vector<GNEJunction*> junctions = myNet->retrieveJunctions(true);
2796  if (junctions.size() > 0) {
2797  std::string plural = junctions.size() == 1 ? ("") : ("s");
2798  myUndoList->p_begin("delete selected " + toString(SUMO_TAG_JUNCTION) + plural);
2799  for (auto i : junctions) {
2801  }
2802  myUndoList->p_end();
2803  }
2804 }
2805 
2806 
2807 void
2809  std::vector<GNELane*> lanes = myNet->retrieveLanes(true);
2810  if (lanes.size() > 0) {
2811  std::string plural = lanes.size() == 1 ? ("") : ("s");
2812  myUndoList->p_begin("delete selected " + toString(SUMO_TAG_LANE) + plural);
2813  for (auto i : lanes) {
2814  // when deleting multiple lanes, recompute connections
2815  myNet->deleteLane(i, myUndoList, true);
2816  }
2817  myUndoList->p_end();
2818  }
2819 }
2820 
2821 
2822 void
2824  std::vector<GNEEdge*> edges = myNet->retrieveEdges(true);
2825  if (edges.size() > 0) {
2826  std::string plural = edges.size() == 1 ? ("") : ("s");
2827  myUndoList->p_begin("delete selected " + toString(SUMO_TAG_EDGE) + plural);
2828  for (auto i : edges) {
2829  // when deleting multiple edges, recompute connections
2830  myNet->deleteEdge(i, myUndoList, true);
2831  }
2832  myUndoList->p_end();
2833  }
2834 }
2835 
2836 
2837 void
2839  std::vector<GNEAdditional*> additionals = myNet->retrieveAdditionals(true);
2840  if (additionals.size() > 0) {
2841  std::string plural = additionals.size() == 1 ? ("") : ("s");
2842  myUndoList->p_begin("delete selected additional" + plural);
2843  for (auto i : additionals) {
2844  // due there are additionals that are removed when their parent is removed, we need to check if yet exists before removing
2845  if (myNet->retrieveAdditional(i->getTagProperty().getTag(), i->getID(), false) != nullptr) {
2847  }
2848  }
2849  myUndoList->p_end();
2850  }
2851 }
2852 
2853 
2854 void
2856  std::vector<GNEDemandElement*> demandElements = myNet->retrieveDemandElements(true);
2857  if (demandElements.size() > 0) {
2858  std::string plural = demandElements.size() == 1 ? ("") : ("s");
2859  myUndoList->p_begin("delete selected demand elements" + plural);
2860  for (auto i : demandElements) {
2861  // due there are demand elements that are removed when their parent is removed, we need to check if yet exists before removing
2862  if (myNet->retrieveDemandElement(i->getTagProperty().getTag(), i->getID(), false) != nullptr) {
2864  }
2865  }
2866  myUndoList->p_end();
2867  }
2868 }
2869 
2870 
2871 void
2873  // obtain selected crossings
2874  std::vector<GNEJunction*> junctions = myNet->retrieveJunctions();
2875  std::vector<GNECrossing*> crossings;
2876  for (auto i : junctions) {
2877  for (auto j : i->getGNECrossings()) {
2878  if (j->isAttributeCarrierSelected()) {
2879  crossings.push_back(j);
2880  }
2881  }
2882  }
2883  // remove selected crossings
2884  if (crossings.size() > 0) {
2885  std::string plural = crossings.size() == 1 ? ("") : ("s");
2886  myUndoList->p_begin("delete selected " + toString(SUMO_TAG_CROSSING) + "s");
2887  for (auto i : crossings) {
2888  if (myNet->retrieveCrossing(i->getID(), false)) {
2890  }
2891  }
2892  myUndoList->p_end();
2893  }
2894 }
2895 
2896 
2897 void
2899  // obtain selected connections
2900  std::vector<GNEEdge*> edges = myNet->retrieveEdges();
2901  std::vector<GNEConnection*> connections;
2902  for (auto i : edges) {
2903  for (auto j : i->getGNEConnections()) {
2904  if (j->isAttributeCarrierSelected()) {
2905  connections.push_back(j);
2906  }
2907  }
2908  }
2909  // remove selected connections
2910  if (connections.size() > 0) {
2911  std::string plural = connections.size() == 1 ? ("") : ("s");
2912  myUndoList->p_begin("delete selected " + toString(SUMO_TAG_CONNECTION) + plural);
2913  for (auto i : connections) {
2915  }
2916  myUndoList->p_end();
2917  }
2918 }
2919 
2920 
2921 void
2923  // obtain selected shapes
2924  std::vector<GNEShape*> selectedShapes = myNet->retrieveShapes(true);
2925  // remove it
2926  if (selectedShapes.size() > 0) {
2927  std::string plural = selectedShapes.size() == 1 ? ("") : ("s");
2928  myUndoList->p_begin("delete selected shape" + plural);
2929  for (auto i : selectedShapes) {
2931  }
2932  myUndoList->p_end();
2933  }
2934 }
2935 
2936 
2937 bool
2939  const Position& newPos = moved->getNBNode()->getPosition();
2940  GNEJunction* mergeTarget = nullptr;
2941  // try to find another junction to merge with
2942  if (makeCurrent()) {
2943  Boundary selection;
2944  selection.add(newPos);
2945  selection.grow(0.1);
2946  const std::vector<GUIGlID> ids = getObjectsInBoundary(selection, false);
2947  GUIGlObject* object = nullptr;
2948  for (auto it_ids : ids) {
2949  if (it_ids == 0) {
2950  continue;
2951  }
2953  if (!object) {
2954  throw ProcessError("Unkown object in selection (id=" + toString(it_ids) + ").");
2955  }
2956  if ((object->getType() == GLO_JUNCTION) && (it_ids != moved->getGlID())) {
2957  mergeTarget = dynamic_cast<GNEJunction*>(object);
2958  }
2960  }
2961  }
2962  if (mergeTarget) {
2963  // optionally ask for confirmation
2965  WRITE_DEBUG("Opening FXMessageBox 'merge junctions'");
2966  // open question box
2967  FXuint answer = FXMessageBox::question(this, MBOX_YES_NO,
2968  "Confirm Junction Merger", "%s",
2969  ("Do you wish to merge junctions '" + moved->getMicrosimID() +
2970  "' and '" + mergeTarget->getMicrosimID() + "'?\n" +
2971  "('" + moved->getMicrosimID() +
2972  "' will be eliminated and its roads added to '" +
2973  mergeTarget->getMicrosimID() + "')").c_str());
2974  if (answer != 1) { //1:yes, 2:no, 4:esc
2975  // write warning if netedit is running in testing mode
2976  if (answer == 2) {
2977  WRITE_DEBUG("Closed FXMessageBox 'merge junctions' with 'No'");
2978  } else if (answer == 4) {
2979  WRITE_DEBUG("Closed FXMessageBox 'merge junctions' with 'ESC'");
2980  }
2981  return false;
2982  } else {
2983  // write warning if netedit is running in testing mode
2984  WRITE_DEBUG("Closed FXMessageBox 'merge junctions' with 'Yes'");
2985  }
2986  }
2987  // restore previous position of junction moved
2988  moved->moveGeometry(oldPos, Position(0, 0));
2989  // finish geometry moving
2990  moved->endGeometryMoving();
2991  // merge moved and targed junctions
2992  myNet->mergeJunctions(moved, mergeTarget, myUndoList);
2993  return true;
2994  } else {
2995  return false;
2996  }
2997 }
2998 
2999 
3000 void
3002  switch (myEditModes.networkEditMode) {
3003  case GNE_NMODE_INSPECT:
3004  myViewParent->getInspectorFrame()->update();
3005  break;
3006  default:
3007  break;
3008  }
3009  // update view
3010  update();
3011 }
3012 
3013 // ---------------------------------------------------------------------------
3014 // Private methods
3015 // ---------------------------------------------------------------------------
3016 
3017 void
3020  // draw first point
3022  // Push draw matrix
3023  glPushMatrix();
3024  // obtain first clicked point
3025  const Position& firstLanePoint = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().front().first->getLaneShape().positionAtOffset(
3027  // must draw on top of other connections
3028  glTranslated(firstLanePoint.x(), firstLanePoint.y(), GLO_JUNCTION + 0.3);
3030  // draw first point
3032  GLHelper::drawText("S", Position(), .1, 1.3, RGBColor::CYAN);
3033  // pop draw matrix
3034  glPopMatrix();
3035  }
3036  // draw connections between lanes
3038  // iterate over all current selected lanes
3039  for (int i = 0; i < (int)myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().size() - 1; i++) {
3040  // declare position vector for shape
3041  PositionVector shape;
3042  // declare vectors for shape rotation and lengths
3043  std::vector<double> shapeRotations, shapeLengths;
3044  // obtain GNELanes
3047  // Push draw matrix
3048  glPushMatrix();
3049  // must draw on top of other connections
3050  glTranslated(0, 0, GLO_JUNCTION + 0.2);
3051  // obtain connection shape
3052  shape = from->getParentEdge()->getNBEdge()->getConnection(from->getIndex(), to->getParentEdge()->getNBEdge(), to->getIndex()).shape;
3053  // set special color
3055  // Obtain lengths and shape rotations
3056  int segments = (int) shape.size() - 1;
3057  if (segments >= 0) {
3058  shapeRotations.reserve(segments);
3059  shapeLengths.reserve(segments);
3060  for (int j = 0; j < segments; j++) {
3061  shapeLengths.push_back(GNEGeometry::calculateLength(shape[j], shape[j + 1]));
3062  shapeRotations.push_back(GNEGeometry::calculateRotation(shape[j], shape[j + 1]));
3063  }
3064  }
3065  // draw a list of lines
3066  GLHelper::drawBoxLines(shape, shapeRotations, shapeLengths, 0.2);
3067  // pop draw matrix
3068  glPopMatrix();
3069  }
3070  // draw last point
3071  glPushMatrix();
3072  // obtain last clicked point
3073  const Position& lastLanePoint = myViewParent->getAdditionalFrame()->getConsecutiveLaneSelector()->getSelectedLanes().back().first->getLaneShape().positionAtOffset(
3075  // must draw on top of other connections
3076  glTranslated(lastLanePoint.x(), lastLanePoint.y(), GLO_JUNCTION + 0.3);
3078  // draw last point
3079  GLHelper::drawFilledCircle((double) 1.3, 8);
3080  GLHelper::drawText("E", Position(), .1, 1.3, RGBColor::CYAN);
3081  // pop draw matrix
3082  glPopMatrix();
3083  }
3084 
3085  }
3086 }
3087 
3088 
3089 void
3091  PositionVector temporalShape;
3092  bool deleteLastCreatedPoint = false;
3093  // obtain temporal shape and delete last created point flag
3099  deleteLastCreatedPoint = myViewParent->getTAZFrame()->getDrawingShapeModul()->getDeleteLastCreatedPoint();
3100  }
3101  // check if we're in drawing mode
3102  if (temporalShape.size() > 0) {
3103  // draw blue line with the current drawed shape
3104  glPushMatrix();
3105  glLineWidth(2);
3106  glTranslated(0, 0, GLO_MAX);
3108  GLHelper::drawLine(temporalShape);
3109  glPopMatrix();
3110  // draw red line from the last point of shape to the current mouse position
3111  glPushMatrix();
3112  glLineWidth(2);
3113  glTranslated(0, 0, GLO_MAX);
3114  // draw last line depending if shift key (delete last created point) is pressed
3115  if (deleteLastCreatedPoint) {
3117  } else {
3119  }
3121  glPopMatrix();
3122  }
3123 }
3124 
3125 
3126 void
3128  // decide what to do based on mode
3129  switch (myEditModes.networkEditMode) {
3130  case GNE_NMODE_INSPECT: {
3131  // process left click in Inspector Frame
3133  // process click
3134  processClick(eventData);
3135  break;
3136  }
3137  case GNE_NMODE_DELETE: {
3138  // check that we have clicked over an non-demand element
3140  // change the selected attribute carrier if myNetworkViewOptions.mySelectEdges is enabled and clicked element is a getLaneFront()
3143  }
3144  // check if we are deleting a selection or an single attribute carrier
3146  // before delete al selected attribute carriers, check if we clicked over a geometry point
3151  } else {
3153  }
3154  } else {
3156  }
3157  } else {
3158  // process click
3159  processClick(eventData);
3160  }
3161  break;
3162  }
3163  case GNE_NMODE_SELECT:
3164  // check if a rect for selecting is being created
3165  if (myKeyPressed.shiftKeyPressed()) {
3166  // begin rectangle selection
3168  } else {
3169  // first check that under cursor there is an attribute carrier, isn't a demand element and is selectable
3171  // change the selected attribute carrier if myNetworkViewOptions.mySelectEdges is enabled and clicked element is a getLaneFront()
3174  }
3175  // Check if this GLobject type is locked
3177  // toogle netElement selection
3180  } else {
3182  }
3183  }
3184  }
3185  // process click
3186  processClick(eventData);
3187  }
3188  break;
3189  case GNE_NMODE_CREATE_EDGE: {
3190  // make sure that Control key isn't pressed
3192  // process left click in create edge frame Frame
3195  (myNetworkViewOptions.menuCheckAutoOppositeEdge->getCheck() == TRUE),
3196  (myNetworkViewOptions.menuCheckChainEdges->getCheck() == TRUE));
3197  }
3198  // process click
3199  processClick(eventData);
3200  break;
3201  }
3202  case GNE_NMODE_MOVE: {
3203  // allways swap lane to edges in movement mode
3206  }
3207  // check that AC under cursor isn't a demand element
3209  // check if we're moving a set of selected items
3211  // move selected ACs
3213  // update view
3214  update();
3216  // process click if there isn't movable elements (to move camera using drag an drop)
3217  processClick(eventData);
3218  }
3219  } else {
3220  // process click if there isn't movable elements (to move camera using drag an drop)
3221  processClick(eventData);
3222  }
3223  break;
3224  }
3225  case GNE_NMODE_CONNECT: {
3227  // Handle laneclick (shift key may pass connections, Control key allow conflicts)
3229  update();
3230  }
3231  // process click
3232  processClick(eventData);
3233  break;
3234  }
3235  case GNE_NMODE_TLS: {
3237  // edit TLS in TLSEditor frame
3239  update();
3240  }
3241  // process click
3242  processClick(eventData);
3243  break;
3244  }
3245  case GNE_NMODE_ADDITIONAL: {
3246  // avoid create additionals if control key is pressed
3249  // check if we need to start select lanes
3251  // select getLaneFront() to create an additional with consecutive lanes
3253  } else if (myObjectsUnderCursor.getLaneFront()) {
3255  }
3257  // update view to show the new additional
3258  update();
3259  }
3260  }
3261  // process click
3262  processClick(eventData);
3263  break;
3264  }
3265  case GNE_NMODE_CROSSING: {
3266  // swap lanes to edges in crossingsMode
3269  }
3270  // call function addCrossing from crossing frame
3272  // process click
3273  processClick(eventData);
3274  break;
3275  }
3276  case GNE_NMODE_TAZ: {
3277  // avoid create TAZs if control key is pressed
3279  // swap laness to edges in TAZ Mode
3282  }
3283  // check if we want to create a rect for selecting edges
3285  // begin rectangle selection
3287  } else {
3288  // check if process click was scuesfully
3290  // view net must be always update
3291  update();
3292  }
3293  // process click
3294  processClick(eventData);
3295  }
3296  } else {
3297  // process click
3298  processClick(eventData);
3299  }
3300  break;
3301  }
3302  case GNE_NMODE_POLYGON: {
3303  // avoid create shapes if control key is pressed
3307  // view net must be always update
3308  update();
3309  // process click depending of the result of "process click"
3311  // process click
3312  processClick(eventData);
3313  }
3314  }
3315  } else {
3316  // process click
3317  processClick(eventData);
3318  }
3319  break;
3320  }
3321  case GNE_NMODE_PROHIBITION: {
3323  // shift key may pass connections, Control key allow conflicts.
3325  update();
3326  }
3327  // process click
3328  processClick(eventData);
3329  break;
3330  }
3331  default: {
3332  // process click
3333  processClick(eventData);
3334  }
3335  }
3336 }
3337 
3338 
3339 void
3341  // check moved items
3345  // check if we're creating a rectangle selection or we want only to select a lane
3347  // check if we're selecting all type of elements o we only want a set of edges for TAZ
3350  } else if (myEditModes.networkEditMode == GNE_NMODE_TAZ) {
3351  // process edge selection
3353  }
3354  } else if (myKeyPressed.shiftKeyPressed()) {
3355  // obtain objects under cursor
3356  if (makeCurrent()) {
3357  // update objects under cursor again
3359  makeNonCurrent();
3360  }
3361  // check if there is a lane in objects under cursor
3363  // if we clicked over an lane with shift key pressed, select or unselect it
3366  } else {
3368  }
3369  }
3370  }
3371  // finish selection
3373  } else {
3374  // finish moving of single elements
3376  }
3377 }
3378 
3379 
3380 void
3382  // change "delete last created point" depending if during movement shift key is pressed
3385  }
3386  // check what type of additional is moved
3388  // move entire selection
3391  // update selection corner of selecting area
3393  } else {
3394  // move single elements
3396  }
3397 }
3398 
3399 
3400 void
3402  // decide what to do based on mode
3403  switch (myEditModes.demandEditMode) {
3404  case GNE_DMODE_INSPECT: {
3405  // process left click in Inspector Frame
3407  // process click
3408  processClick(eventData);
3409  break;
3410  }
3411  case GNE_DMODE_DELETE: {
3412  // check that we have clicked over an demand element
3414  // check if we are deleting a selection or an single attribute carrier
3417  } else {
3419  }
3420  } else {
3421  // process click
3422  processClick(eventData);
3423  }
3424  break;
3425  }
3426  case GNE_DMODE_SELECT:
3427  // check if a rect for selecting is being created
3428  if (myKeyPressed.shiftKeyPressed()) {
3429  // begin rectangle selection
3431  } else {
3432  // check if a rect for selecting is being created
3433  if (myKeyPressed.shiftKeyPressed()) {
3434  // begin rectangle selection
3436  } else {
3437  // first check that under cursor there is an attribute carrier, is demand element and is selectable
3439  // Check if this GLobject type is locked
3441  // toogle netElement selection
3444  } else {
3446  }
3447  }
3448  }
3449  // process click
3450  processClick(eventData);
3451  }
3452  }
3453  break;
3454  case GNE_DMODE_MOVE: {
3455  // check that AC under cursor is a demand element
3458  // check if we're moving a set of selected items
3460  // move selected ACs
3462  // update view
3463  update();
3465  // process click if there isn't movable elements (to move camera using drag an drop)
3466  processClick(eventData);
3467  }
3468  } else {
3469  // process click if there isn't movable elements (to move camera using drag an drop)
3470  processClick(eventData);
3471  }
3472  break;
3473  }
3474  case GNE_DMODE_ROUTE: {
3475  // check if we clicked over a lane and Control key isn't pressed
3477  // Handle edge click
3479  }
3480  // process click
3481  processClick(eventData);
3482  break;
3483  }
3484  case GNE_DMODE_VEHICLE: {
3485  // make sure that Control key isn't pressed
3487  // Handle click
3489  }
3490  // process click
3491  processClick(eventData);
3492  break;
3493  }
3494  case GNE_DMODE_STOP: {
3495  // make sure that Control key isn't pressed
3497  // Handle click
3499  }
3500  // process click
3501  processClick(eventData);
3502  break;
3503  }
3504  case GNE_DMODE_PERSON: {
3505  // make sure that Control key isn't pressed
3507  // Handle click
3509  }
3510  // process click
3511  processClick(eventData);
3512  break;
3513  }
3514  case GNE_DMODE_PERSONPLAN: {
3515  // make sure that Control key isn't pressed
3517  // Handle click
3519  }
3520  // process click
3521  processClick(eventData);
3522  break;
3523  }
3524  default: {
3525  // process click
3526  processClick(eventData);
3527  }
3528  }
3529 }
3530 
3531 
3532 void
3534  // check moved items
3538  // check if we're creating a rectangle selection or we want only to select a lane
3541  }
3542  // finish selection
3544  } else {
3545  // finish moving of single elements
3547  }
3548 }
3549 
3550 
3551 void
3554  // update selection corner of selecting area
3556  } else {
3557  // move single elements
3559  }
3560 }
3561 
3562 /****************************************************************************/
GNEViewParent::getVehicleTypeFrame
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
Definition: GNEViewParent.cpp:258
GNEViewNet::buildEditModeControls
void buildEditModeControls()
create edit mode buttons and elements
Definition: GNEViewNet.cpp:2445
GNERouteFrame::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNERouteFrame.cpp:859
GNEViewParent::getStopFrame
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
Definition: GNEViewParent.cpp:264
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:180
GNEEdge::getSplitPos
Position getSplitPos(const Position &clickPos)
Definition: GNEEdge.cpp:637
GNEViewNetHelper::CommonCheckableButtons::updateCommonCheckableButtons
void updateCommonCheckableButtons()
update Common checkable buttons
Definition: GNEViewNetHelper.cpp:1879
MID_LOCATEPOI
Locate poi - button.
Definition: GUIAppEnum.h:338
GUICompleteSchemeStorage.h
MID_GNE_LANE_DUPLICATE
duplicate a lane
Definition: GUIAppEnum.h:924
GNEViewParent::getSelectorFrame
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
Definition: GNEViewParent.cpp:186
GNEAttributeCarrier::TagProperties::isPerson
bool isPerson() const
return true if tag correspond to a person element
Definition: GNEAttributeCarrier.cpp:756
MID_GNE_EDGE_EDIT_ENDPOINT
change default geometry endpoints
Definition: GUIAppEnum.h:834
GNEViewNetHelper::MoveMultipleElementValues::isMovingSelection
bool isMovingSelection() const
check if currently there is element being moved
Definition: GNEViewNetHelper.cpp:956
MID_GNE_LANE_RESET_CUSTOMSHAPE
remove greenVerge
Definition: GUIAppEnum.h:926
GUIPerspectiveChanger::getYPos
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
GNEViewNet::getCrossingAtPopupPosition
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
Definition: GNEViewNet.cpp:1086
MID_LOCATETLS
Locate TLS - button.
Definition: GUIAppEnum.h:334
GNEPersonFrame::show
void show()
show Frame
Definition: GNEPersonFrame.cpp:174
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:31
GUIVisualizationSettings::name
std::string name
The name of this setting.
Definition: GUIVisualizationSettings.h:399
MID_GNE_EDGE_RESET_ENDPOINT
reset default geometry endpoints
Definition: GUIAppEnum.h:836
GLO_CONNECTION
a connection
Definition: GUIGlObjectTypes.h:54
GUISUMOAbstractView::makeCurrent
FXbool makeCurrent()
A reimplementation due to some internal reasons.
Definition: GUISUMOAbstractView.cpp:841
GNEConnectorFrame::getConnectionModifications
ConnectionModifications * getConnectionModifications() const
get pointer to ConnectionModifications modul
Definition: GNEConnectorFrame.cpp:425
SUMO_ATTR_ANGLE
Definition: SUMOXMLDefinitions.h:794
MID_HOTKEY_F4_SUPERMODE_DEMAND
hot key <F4> set demand mode in NETEDIT
Definition: GUIAppEnum.h:171
MID_GNE_LANE_REMOVE_GREENVERGE
remove greenVerge
Definition: GUIAppEnum.h:950
GNEAdditionalFrame::SelectorParentLanes::getSelectedLanes
const std::vector< std::pair< GNELane *, double > > & getSelectedLanes() const
get current selected lanes
Definition: GNEAdditionalFrame.cpp:275
GNEGeometry::calculateLength
static double calculateLength(const Position &first, const Position &second)
return length between two points (used in geometric calculations)
Definition: GNEGeometry.cpp:555
GUIVisualizationSettings::drawForPositionSelection
bool drawForPositionSelection
whether drawing is performed for the purpose of selecting objects with a single click
Definition: GUIVisualizationSettings.h:644
GLO_MAX
empty max
Definition: GUIGlObjectTypes.h:165
SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:156
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:133
GNEViewNet::mySelectingArea
GNEViewNetHelper::SelectingArea mySelectingArea
variable used to save variables related with selecting areas
Definition: GNEViewNet.h:431
MID_LOCATEROUTE
Locate route - button.
Definition: GUIAppEnum.h:328
GNEViewNetHelper::ObjectsUnderCursor::getPolyFront
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:328
GNENet::retrieveAdditional
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
Definition: GNENet.cpp:2183
GNEProhibitionFrame::handleProhibitionClick
void handleProhibitionClick(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
handle prohibitions and set the relative colouring
Definition: GNEProhibitionFrame.cpp:190
GNEViewNetHelper::CommonViewOptions::menuCheckShowGrid
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
Definition: GNEViewNetHelper.h:346
GNEViewNet::myTestingMode
GNEViewNetHelper::TestingMode myTestingMode
variable used to save variables related with testing mode
Definition: GNEViewNet.h:369
GNEViewNet::onCmdResetLaneCustomShape
long onCmdResetLaneCustomShape(FXObject *, FXSelector, void *)
reset custom shapes of selected lanes
Definition: GNEViewNet.cpp:1658
GNEEdge::smoothElevation
void smoothElevation(GNEUndoList *undoList)
smooth elevation with regard to adjoining edges
Definition: GNEEdge.cpp:2011
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:55
GNENetElement::unselectAttributeCarrier
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Definition: GNENetElement.cpp:99
GNEViewNet::onCmdToogleShowAllPersonPlans
long onCmdToogleShowAllPersonPlans(FXObject *, FXSelector, void *)
toogle show all person plans in super mode demand
Definition: GNEViewNet.cpp:2360
GNETAZFrame::getTAZCurrentModul
TAZCurrent * getTAZCurrentModul() const
get Current TAZ modul
Definition: GNETAZFrame.cpp:1452
GNEViewNetHelper::DemandCheckableButtons::disableDemandCheckableButtons
void disableDemandCheckableButtons()
hide all options menu checks
Definition: GNEViewNetHelper.cpp:2069
GNEViewNet::showJunctionAsBubbles
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
Definition: GNEViewNet.cpp:547
GNE_DMODE_VEHICLETYPES
Mode for editing vehicle types.
Definition: GNEViewNetHelper.h:98
GNEDeleteFrame::removeSelectedAttributeCarriers
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
Definition: GNEDeleteFrame.cpp:116
GNEViewNet::onCmdClearConnections
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
Definition: GNEViewNet.cpp:2102
MIN2
T MIN2(T a, T b)
Definition: StdDefs.h:73
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNEAdditionalFrame::SelectorParentLanes::getSelectedLaneColor
const RGBColor & getSelectedLaneColor() const
get selected lane color
Definition: GNEAdditionalFrame.cpp:269
GNEFrameModuls::EdgePathCreator::finishEdgePathCreation
void finishEdgePathCreation()
finish edge path creation
Definition: GNEFrameModuls.cpp:759
GNEViewNet::onCmdToogleMoveElevation
long onCmdToogleMoveElevation(FXObject *, FXSelector, void *)
toogle move elevation
Definition: GNEViewNet.cpp:2300
GNEConnectorFrame.h
GNEPersonPlanFrame::getPersonPlanCreator
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
Definition: GNEPersonPlanFrame.cpp:507
GUICursorSubSys.h
GNEConnectorFrame::ConnectionModifications::onCmdSaveModifications
long onCmdSaveModifications(FXObject *, FXSelector, void *)
Called when the user presses the OK-Button saves any connection modifications.
Definition: GNEConnectorFrame.cpp:128
GNEViewNet::myCurrentFrame
GNEFrame * myCurrentFrame
the current frame
Definition: GNEViewNet.h:443
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:317
GNEViewNet::hotkeyFocusFrame
void hotkeyFocusFrame()
handle focus frame keypress
Definition: GNEViewNet.cpp:997
GNEViewNetHelper::KeyPressed::shiftKeyPressed
bool shiftKeyPressed() const
check if SHIFT key was pressed during click
Definition: GNEViewNetHelper.cpp:376
GNERouteFrame::hotkeyEnter
void hotkeyEnter()
function called when user press ENTER key
Definition: GNERouteFrame.cpp:796
GUISUMOAbstractView::onRightBtnPress
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
Definition: GUISUMOAbstractView.cpp:967
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1289
MID_LOCATEEDGE
Locate edge - button.
Definition: GUIAppEnum.h:324
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
GNEFrameModuls::DrawingShape::setDeleteLastCreatedPoint
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
Definition: GNEFrameModuls.cpp:1684
GNECreateEdgeFrame.h
GNENet::deleteEdge
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
Definition: GNENet.cpp:430
MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON
lock person
Definition: GUIAppEnum.h:633
GNEViewNetHelper::MoveMultipleElementValues::moveSelection
void moveSelection()
move selection
Definition: GNEViewNetHelper.cpp:896
GNEViewNet::onCmdToogleShowConnections
long onCmdToogleShowConnections(FXObject *, FXSelector, void *)
toogle show connections
Definition: GNEViewNet.cpp:2202
GNEViewNet::hotkeyBackSpace
void hotkeyBackSpace()
handle backspace keypress
Definition: GNEViewNet.cpp:980
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
GNE_DMODE_PERSONPLAN
Mode for editing person plan.
Definition: GNEViewNetHelper.h:106
MID_GNE_POLYGON_OPEN
open closed polygon
Definition: GUIAppEnum.h:904
GNERouteFrame::hotkeyEsc
void hotkeyEsc()
function called when user press ESC key
Definition: GNERouteFrame.cpp:838
GNEEdge::straightenElevation
void straightenElevation(GNEUndoList *undoList)
interpolate z values linear between junctions
Definition: GNEEdge.cpp:1916
GNEPoly::openPolygon
void openPolygon(bool allowUndo=true)
open polygon
Definition: GNEPoly.cpp:496
GNEViewNet::processClick
void processClick(void *eventData)
Auxiliar function used by onLeftBtnPress(...)
Definition: GNEViewNet.cpp:1965
GNEViewNet::buildColorRainbow
void buildColorRainbow(const GUIVisualizationSettings &s, GUIColorScheme &scheme, int active, GUIGlObjectType objectType, bool hide=false, double hideThreshold=0.)
recalibrate color scheme according to the current value range
Definition: GNEViewNet.cpp:476
GNEViewParent::getCreateEdgeFrame
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
Definition: GNEViewParent.cpp:240
GNEViewNet::getEdgeAtPopupPosition
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
Definition: GNEViewNet.cpp:1106
SUMO_ATTR_LENGTH
Definition: SUMOXMLDefinitions.h:393
GNENet::deleteShape
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
Definition: GNENet.cpp:619
MID_GNE_LANE_TRANSFORM_BIKE
transform lane to bikelane
Definition: GUIAppEnum.h:930
MID_GNE_EDGE_REVERSE
reverse an edge
Definition: GUIAppEnum.h:850
GNEViewNet::myDemandCheckableButtons
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
Definition: GNEViewNet.h:395
MID_GNE_LANE_TRANSFORM_BUS
transform lane to busLane
Definition: GUIAppEnum.h:932
GNEViewNetHelper::DemandViewOptions::menuCheckShowAllPersonPlans
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
Definition: GNEViewNetHelper.h:469
GNEFrameAttributesModuls::AttributesEditor::getEditedACs
const std::vector< GNEAttributeCarrier * > & getEditedACs() const
get current edited ACs
Definition: GNEFrameAttributesModuls.cpp:1644
GNEViewNetHelper::ObjectsUnderCursor::getPOIFront
GNEPOI * getPOIFront() const
get front POI (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:318
Boundary::ymin
double ymin() const
Returns minimum y-coordinate.
Definition: Boundary.cpp:130
GNEViewNet::onCmdToogleWarnAboutMerge
long onCmdToogleWarnAboutMerge(FXObject *, FXSelector, void *)
toogle warn for merge
Definition: GNEViewNet.cpp:2276
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
GNEViewNet::getLaneAtPopupPosition
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
Definition: GNEViewNet.cpp:1130
GNESelectorFrame::show
void show()
show Frame
Definition: GNESelectorFrame.cpp:112
MFXCheckableButton::setChecked
void setChecked(bool val)
check or uncheck this MFXCheckableButton
Definition: MFXCheckableButton.cpp:57
GNEViewNetHelper::NetworkCheckableButtons::connectionButton
MFXCheckableButton * connectionButton
chekable button for edit mode connection
Definition: GNEViewNetHelper.h:771
GNEViewNet::onCmdSmoothEdges
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
Definition: GNEViewNet.cpp:1402
GNEViewNetHelper::NetworkCheckableButtons::createEdgeButton
MFXCheckableButton * createEdgeButton
chekable button for edit mode create edge
Definition: GNEViewNetHelper.h:768
GNEViewNetHelper::DemandViewOptions::lockPerson
void lockPerson(const GNEDemandElement *person)
lock person
Definition: GNEViewNetHelper.cpp:1799
GNEPersonPlanFrame::PersonPlanCreator::abortPersonPlanCreation
void abortPersonPlanCreation()
abort person plan creation
Definition: GNEPersonPlanFrame.cpp:334
GNEViewNetHelper::DemandViewOptions::getLockedPerson
const GNEDemandElement * getLockedPerson() const
get locked person
Definition: GNEViewNetHelper.cpp:1811
GNEViewParent::getPolygonFrame
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
Definition: GNEViewParent.cpp:228
GNEFrameModuls::DrawingShape::stopDrawing
void stopDrawing()
stop drawing and check if shape can be created
Definition: GNEFrameModuls.cpp:1626
GNEViewNetHelper::NetworkViewOptions::menuCheckShowDemandElements
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
Definition: GNEViewNetHelper.h:387
GNENet::resetJunctionConnections
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
Definition: GNENet.cpp:2083
NBEdge::getConnection
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
Definition: NBEdge.cpp:1114
GNEViewParent::getProhibitionFrame
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
Definition: GNEViewParent.cpp:234
GNEUndoList::p_end
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
Definition: GNEUndoList.cpp:79
GNEViewNet::getPOIAtPopupPosition
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
Definition: GNEViewNet.cpp:1175
GUIVisualizationSettings::drawForRectangleSelection
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
Definition: GUIVisualizationSettings.h:647
GNELane::getParentEdge
GNEEdge * getParentEdge() const
Returns underlying parent edge.
Definition: GNELane.cpp:1371
OptionsCont.h
GLHelper::drawBoxLines
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
Definition: GLHelper.cpp:182
MID_GNE_POLYGON_SET_FIRST_POINT
Set a vertex of polygon as first verte.
Definition: GUIAppEnum.h:906
GUIMainWindow::setStatusBarText
virtual void setStatusBarText(const std::string &)
Definition: GUIMainWindow.h:76
SUMO_TAG_VIEWSETTINGS
Definition: SUMOXMLDefinitions.h:240
GNEPOI
Definition: GNEPOI.h:44
GNEViewNetHelper::KeyPressed
class used to group all variables related with key pressed after certain events
Definition: GNEViewNetHelper.h:261
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:77
GNETAZFrame::processClick
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
Definition: GNETAZFrame.cpp:1360
GNETLSEditorFrame::onCmdOK
long onCmdOK(FXObject *, FXSelector, void *)
Definition: GNETLSEditorFrame.cpp:256
GNEViewNet::drawTemporalDrawShape
void drawTemporalDrawShape() const
draw temporal polygon shape in Polygon Mode
Definition: GNEViewNet.cpp:3090
GNEViewNet::onCmdToogleSelectEdges
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle select edges
Definition: GNEViewNet.cpp:2192
GUIGlObject::getPopUpMenu
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)=0
Returns an own popup-menu.
GUISUMOAbstractView::m2p
double m2p(double meter) const
meter-to-pixels conversion method
Definition: GUISUMOAbstractView.cpp:771
GNE_DMODE_ROUTE
Mode for editing routes.
Definition: GNEViewNetHelper.h:94
MID_GNE_EDGE_RESET_LENGTH
reset custom lengths
Definition: GUIAppEnum.h:854
GNEViewNetHelper::KeyPressed::controlKeyPressed
bool controlKeyPressed() const
check if CONTROL key was pressed during click
Definition: GNEViewNetHelper.cpp:386
GUIVisualizationSettings::showGrid
bool showGrid
Information whether a grid shall be shown.
Definition: GUIVisualizationSettings.h:420
GNEViewNetHelper::DemandViewOptions::hideDemandViewOptionsMenuChecks
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
Definition: GNEViewNetHelper.cpp:1712
NBNode::Crossing::shape
PositionVector shape
The crossing's shape.
Definition: NBNode.h:139
GUIDanielPerspectiveChanger.h
GNEAdditionalFrame::addAdditional
bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add additional element
Definition: GNEAdditionalFrame.cpp:651
SUMO_ATTR_CUSTOMSHAPE
whether a given shape is user-defined
Definition: SUMOXMLDefinitions.h:702
GUISUMOAbstractView::getGUIGlObjectsUnderCursor
std::vector< GUIGlObject * > getGUIGlObjectsUnderCursor()
returns the GUIGlObject under the cursor using GL_SELECT (including overlapped objects)
Definition: GUISUMOAbstractView.cpp:351
RGBColor::YELLOW
static const RGBColor YELLOW
Definition: RGBColor.h:192
GNEViewNet::onCmdDeleteGeometryPoint
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
Definition: GNEViewNet.cpp:1499
GUIGLObjectPopupMenu.h
GNEViewNet::removeRestrictedLane
bool removeRestrictedLane(SUMOVehicleClass vclass)
remove restricted lane
Definition: GNEViewNet.cpp:1888
GUISUMOAbstractView::getObjectUnderCursor
GUIGlID getObjectUnderCursor()
returns the id of the front object under the cursor using GL_SELECT
Definition: GUISUMOAbstractView.cpp:329
GNEPersonTypeFrame.h
GNEViewNet::myNetworkViewOptions
GNEViewNetHelper::NetworkViewOptions myNetworkViewOptions
variable used to save variables related with view options in Network Supermode
Definition: GNEViewNet.h:405
GNEViewNetHelper::CommonCheckableButtons::disableCommonCheckableButtons
void disableCommonCheckableButtons()
hide all options menu checks
Definition: GNEViewNetHelper.cpp:1870
GNEViewNetHelper::EditShapes::editedShapePoly
GNEPoly * editedShapePoly
polygon used for edit shapes
Definition: GNEViewNetHelper.h:859
GNEViewNetHelper::DemandViewOptions
struct used to group all variables related to view options in supermode Demand
Definition: GNEViewNetHelper.h:430
GNEViewNet::onCmdAddSelected
long onCmdAddSelected(FXObject *, FXSelector, void *)
select AC under cursor
Definition: GNEViewNet.cpp:2406
GNEViewNetHelper::NetworkCheckableButtons::trafficLightButton
MFXCheckableButton * trafficLightButton
chekable button for edit mode traffic light
Definition: GNEViewNetHelper.h:774
GNENet::reverseEdge
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
Definition: GNENet.cpp:887
OptionsCont::getString
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:201
GNEPoly
Definition: GNEPoly.h:45
GNENet::deleteAdditional
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
Definition: GNENet.cpp:628
GNEViewNet::onCmdSmoothEdgesElevation
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
Definition: GNEViewNet.cpp:1444
GNEViewNetHelper::DemandCheckableButtons::vehicleTypeButton
MFXCheckableButton * vehicleTypeButton
chekable button for edit mode create vehicle type
Definition: GNEViewNetHelper.h:824
GNEViewNetHelper::DemandCheckableButtons::routeButton
MFXCheckableButton * routeButton
chekable button for edit mode create routes
Definition: GNEViewNetHelper.h:818
GNEPersonPlanFrame.h
GNETAZFrame::TAZCurrent::setTAZ
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
Definition: GNETAZFrame.cpp:157
RGBColor::CYAN
static const RGBColor CYAN
Definition: RGBColor.h:193
GNEViewNetHelper::ObjectsUnderCursor::updateObjectUnderCursor
void updateObjectUnderCursor(const std::vector< GUIGlObject * > &GUIGlObjects, GNEPoly *editedPolyShape)
update objects under cursor (Called only in onLeftBtnPress(...) function)
Definition: GNEViewNetHelper.cpp:58
SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:49
GNEViewNet::setStatusBarText
void setStatusBarText(const std::string &text)
set staturBar text
Definition: GNEViewNet.cpp:523
GNEViewNet::updateCursor
void updateCursor()
update cursor after every click/key press/release
Definition: GNEViewNet.cpp:1980
GNEApplicationWindow::ToolbarsGrip::modes
FXMenuBar * modes
The application menu bar (for select, inspect...)
Definition: GNEApplicationWindow.h:91
GNE_DMODE_INSPECT
mode for inspecting demand elements
Definition: GNEViewNetHelper.h:86
GNEViewNetHelper::EditModes::setNetworkEditMode
void setNetworkEditMode(NetworkEditMode networkMode, bool force=false)
set Network edit mode
Definition: GNEViewNetHelper.cpp:1351
NBEdgeCont.h
GUICursorSubSys::getCursor
static FXCursor * getCursor(GUICursor which)
returns a cursor previously defined in the enum GUICursor
Definition: GUICursorSubSys.cpp:75
GNENet::splitEdgesBidi
void splitEdgesBidi(GNEEdge *edge, GNEEdge *oppositeEdge, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
Definition: GNENet.cpp:875
MID_GNE_LANE_ADD_BUS
add busLane
Definition: GUIAppEnum.h:940
Boundary::xmax
double xmax() const
Returns maximum x-coordinate.
Definition: Boundary.cpp:124
GNEJunction::moveGeometry
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
Definition: GNEJunction.cpp:614
MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS
show all person plans
Definition: GUIAppEnum.h:631
GNEAttributeCarrier::selectAttributeCarrier
virtual void selectAttributeCarrier(bool changeFlag=true)=0
GNENet::retrieveDemandElement
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
Definition: GNENet.cpp:2316
GNEViewParent::getConnectorFrame
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
Definition: GNEViewParent.cpp:192
OptionsCont::getBool
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Definition: OptionsCont.cpp:222
GNEDeleteFrame::DeleteOptions::deleteOnlyGeometryPoints
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
Definition: GNEDeleteFrame.cpp:71
GNEViewNetHelper::DemandCheckableButtons::personTypeButton
MFXCheckableButton * personTypeButton
chekable button for edit mode create person type
Definition: GNEViewNetHelper.h:830
GNEViewParent::getTAZFrame
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
Definition: GNEViewParent.cpp:216
GNEViewNetHelper::DemandCheckableButtons::personButton
MFXCheckableButton * personButton
chekable button for edit mode create persons
Definition: GNEViewNetHelper.h:833
GNEApplicationWindow::ToolbarsGrip::modeOptions
FXMenuBar * modeOptions
The application menu bar for mode options (show connections, select edges...)
Definition: GNEApplicationWindow.h:94
SVC_BICYCLE
vehicle is a bicycle
Definition: SUMOVehicleClass.h:179
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
GNE_DMODE_PERSONTYPES
Mode for editing person types.
Definition: GNEViewNetHelper.h:102
GNEViewNetHelper::CommonViewOptions::hideCommonViewOptionsMenuChecks
void hideCommonViewOptionsMenuChecks()
hide all options menu checks
Definition: GNEViewNetHelper.cpp:1452
GNEViewNetHelper::CommonCheckableButtons::moveButton
MFXCheckableButton * moveButton
chekable button for edit mode move
Definition: GNEViewNetHelper.h:739
SUMO_TAG_POI
begin/end of the description of a Point of interest
Definition: SUMOXMLDefinitions.h:53
GNEViewNet
Definition: GNEViewNet.h:42
GNEPersonTypeFrame::show
void show()
show Frame
Definition: GNEPersonTypeFrame.cpp:371
GUIPerspectiveChanger::getRotation
virtual double getRotation() const =0
Returns the rotation of the canvas stored in this changer.
GNEViewNet::onCmdSplitJunction
long onCmdSplitJunction(FXObject *, FXSelector, void *)
split junction into multiple junctions
Definition: GNEViewNet.cpp:2074
ICON_LOCATEEDGE
Definition: GUIIcons.h:76
SUMO_const_laneWidth
const double SUMO_const_laneWidth
Definition: StdDefs.h:49
GNEViewParent::getDeleteFrame
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
Definition: GNEViewParent.cpp:222
GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:268
GNECreateEdgeFrame::abortEdgeCreation
void abortEdgeCreation()
abort current edge creation
Definition: GNECreateEdgeFrame.cpp:128
GNEPersonPlanFrame::PersonPlanCreator::removeLastAddedElement
void removeLastAddedElement()
remove last added element
Definition: GNEPersonPlanFrame.cpp:350
GNENet::restrictLane
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
Definition: GNENet.cpp:690
MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
Definition: GUIAppEnum.h:392
GNEViewNet::onCmdEditJunctionShape
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
Definition: GNEViewNet.cpp:2009
MID_GNE_EDGE_SMOOTH
smooth geometry
Definition: GUIAppEnum.h:840
GNEViewNet::onCmdSetFirstGeometryPoint
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
Definition: GNEViewNet.cpp:1544
GNEViewNet::~GNEViewNet
~GNEViewNet()
destructor
Definition: GNEViewNet.cpp:213
MID_LOCATEPERSON
Locate person - button.
Definition: GUIAppEnum.h:332
GNETAZFrame::TAZCurrent::getTAZ
GNETAZ * getTAZ() const
get current TAZ
Definition: GNETAZFrame.cpp:214
MID_LOCATESTOP
Locate stop - button.
Definition: GUIAppEnum.h:330
GLHelper.h
GNEViewNetHelper::NetworkCheckableButtons::updateNetworkCheckableButtons
void updateNetworkCheckableButtons()
update network checkable buttons
Definition: GNEViewNetHelper.cpp:1982
GNETAZFrame::getTAZSaveChangesModul
TAZSaveChanges * getTAZSaveChangesModul() const
get TAZ Save Changes modul
Definition: GNETAZFrame.cpp:1464
GNEViewNet::drawLaneCandidates
void drawLaneCandidates() const
draw functions
Definition: GNEViewNet.cpp:3018
GNE_NMODE_CREATE_EDGE
mode for creating new edges
Definition: GNEViewNetHelper.h:64
GUISUMOAbstractView::getObjectAtPosition
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
Definition: GUISUMOAbstractView.cpp:357
GNEViewNetHelper::TestingMode::drawTestingElements
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
Definition: GNEViewNetHelper.cpp:1233
MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS
show connections
Definition: GUIAppEnum.h:609
GNEViewNetHelper::EditModes::demandEditMode
DemandEditMode demandEditMode
the current Demand edit mode
Definition: GNEViewNetHelper.h:311
GNEPolygonFrame.h
GNE_NMODE_TLS
mode for editing tls
Definition: GNEViewNetHelper.h:68
MID_HOTKEY_D_DELETEMODE
hotkey for mode deleting things
Definition: GUIAppEnum.h:49
SUMO_TAG_VIEWPORT
Definition: SUMOXMLDefinitions.h:259
GLO_CROSSING
a tl-logic
Definition: GUIGlObjectTypes.h:52
GNEEdge::smooth
void smooth(GNEUndoList *undoList)
make geometry smooth
Definition: GNEEdge.cpp:1999
MID_HOTKEY_C_CONNECTMODE_PERSONPLANMODE
hotkey for mode connecting lanes
Definition: GUIAppEnum.h:47
GNEEdge::editEndpoint
void editEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end, or remove current existent endpoint
Definition: GNEEdge.cpp:651
MID_GNE_POLYGON_DELETE_GEOMETRY_POINT
delete geometry point
Definition: GUIAppEnum.h:908
ICON_LOCATETLS
Definition: GUIIcons.h:81
MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES
show junctions as bubbles
Definition: GUIAppEnum.h:619
GNEViewNetHelper::NetworkViewOptions::menuCheckShowJunctionBubble
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
Definition: GNEViewNetHelper.h:408
GNEViewNet::update
void update() const
Mark the entire GNEViewNet to be repainted later.
Definition: GNEViewNet.cpp:299
MID_GNE_JUNCTION_SPLIT_RECONNECT
turn junction into multiple junctions and reconnect them heuristically
Definition: GUIAppEnum.h:870
PositionVector
A list of positions.
Definition: PositionVector.h:45
MID_GNE_JUNCTION_EDIT_SHAPE
edit junction shape
Definition: GUIAppEnum.h:872
GUIGLObjectPopupMenu
The popup menu of a globject.
Definition: GUIGLObjectPopupMenu.h:47
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GNEViewNetHelper::SelectingArea::selectingUsingRectangle
bool selectingUsingRectangle
whether we have started rectangle-selection
Definition: GNEViewNetHelper.h:660
GNEViewNet::processLeftButtonReleaseDemand
void processLeftButtonReleaseDemand()
process left button release function in Supermode Demand
Definition: GNEViewNet.cpp:3533
GNEViewNet::onCmdSplitEdgeBidi
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
Definition: GNEViewNet.cpp:1302
OutputDevice::close
void close()
Closes the device and removes it from the dictionary.
Definition: OutputDevice.cpp:207
GNEViewNetHelper::NetworkCheckableButtons::shapeButton
MFXCheckableButton * shapeButton
chekable button for edit mode shape
Definition: GNEViewNetHelper.h:786
GNEViewNet::getAdditionalAtPopupPosition
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
Definition: GNEViewNet.cpp:1147
GNEFrameModuls::DrawingShape::getDeleteLastCreatedPoint
bool getDeleteLastCreatedPoint()
get flag delete last created point
Definition: GNEFrameModuls.cpp:1690
MID_GNE_JUNCTION_RESET_CONNECTIONS
reset junction's connections
Definition: GUIAppEnum.h:864
GNEViewNet::onCmdEditConnectionShape
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
Definition: GNEViewNet.cpp:2150
GNEViewNet::myCommonViewOptions
GNEViewNetHelper::CommonViewOptions myCommonViewOptions
variable used to save variables related with common view options
Definition: GNEViewNet.h:402
MID_HOTKEY_Z_TAZMODE
hotkey for mode editing TAZ
Definition: GUIAppEnum.h:69
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:621
GNEViewNet::changeAllPhases
bool changeAllPhases() const
change all phases
Definition: GNEViewNet.cpp:541
GNE_NMODE_POLYGON
Mode for editing Polygons.
Definition: GNEViewNetHelper.h:76
GNEViewNet::onRightBtnPress
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
Definition: GNEViewNet.cpp:750
GNEAdditionalFrame::SelectorParentLanes::isShown
bool isShown() const
return true if modul is shown
Definition: GNEAdditionalFrame.cpp:263
GNEAdditionalFrame::SelectorParentLanes::stopConsecutiveLaneSelector
bool stopConsecutiveLaneSelector()
stop selection of consecutive lanes
Definition: GNEAdditionalFrame.cpp:121
GNEVehicleFrame::addVehicle
bool addVehicle(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Definition: GNEVehicleFrame.cpp:138
GUISUMOAbstractView::snapToActiveGrid
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.
Definition: GUISUMOAbstractView.cpp:196
GNEViewNet::onCmdToogleExtendSelection
long onCmdToogleExtendSelection(FXObject *, FXSelector, void *)
toogle extend selection
Definition: GNEViewNet.cpp:2234
MID_GNE_JUNCTION_REPLACE
turn junction into geometry node
Definition: GUIAppEnum.h:866
MID_GNE_JUNCTION_RESET_SHAPE
reset junction shape
Definition: GUIAppEnum.h:874
GNEViewParent
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:71
GNEViewNet::onCmdLaneOperation
long onCmdLaneOperation(FXObject *, FXSelector sel, void *)
add/remove/restrict lane
Definition: GNEViewNet.cpp:1681
MID_GNE_POLYGON_CLOSE
close opened polygon
Definition: GUIAppEnum.h:902
MID_ADDSELECT
Add to selected items - menu entry.
Definition: GUIAppEnum.h:408
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:523
GNEViewNet::hotkeyEnter
void hotkeyEnter()
handle enter keypress
Definition: GNEViewNet.cpp:926
GNENet::deleteCrossing
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
Definition: GNENet.cpp:602
MID_GNE_JUNCTION_CLEAR_CONNECTIONS
clear junction's connections
Definition: GUIAppEnum.h:862
GNEViewNetHelper::SelectingArea::moveRectangleSelection
void moveRectangleSelection()
move rectangle selection
Definition: GNEViewNetHelper.cpp:1022
GNEViewNet::onMouseMove
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
Definition: GNEViewNet.cpp:780
GNEViewNet::setColorScheme
bool setColorScheme(const std::string &name)
set color scheme
Definition: GNEViewNet.cpp:349
GUIGlObjectStorage.h
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
MID_HOTKEY_S_SELECTMODE
hotkey for mode selecting objects
Definition: GUIAppEnum.h:59
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:253
GNEViewNetHelper::NetworkViewOptions::menuCheckExtendSelection
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
Definition: GNEViewNetHelper.h:399
GNEEdge::getVertexIndex
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge
Definition: GNEEdge.cpp:301
GNERouteFrame.h
GNEViewNet::myKeyPressed
GNEViewNetHelper::KeyPressed myKeyPressed
variable used to save key status after certain events
Definition: GNEViewNet.h:376
GNENet::deleteLane
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
Definition: GNENet.cpp:549
GUIAppEnum.h
MID_GNE_EDGE_SPLIT_BIDI
split an edge
Definition: GUIAppEnum.h:848
GNECreateEdgeFrame::processClick
void processClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderGrippedCursor, const bool oppositeEdge, const bool chainEdge)
handle processClick and set the relative colouring
Definition: GNECreateEdgeFrame.cpp:66
MID_GNE_LANE_REMOVE_SIDEWALK
remove sidewalk
Definition: GUIAppEnum.h:944
GNEViewNet::onKeyPress
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
Definition: GNEViewNet.cpp:798
GNEPersonPlanFrame::PersonPlanCreator::finishPersonPlanCreation
void finishPersonPlanCreation()
finish person plan creation
Definition: GNEPersonPlanFrame.cpp:342
GNEJunction.h
MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION
extend selection
Definition: GUIAppEnum.h:613
GNE_NMODE_DELETE
mode for deleting network elements
Definition: GNEViewNetHelper.h:58
GUISUMOAbstractView::onRightBtnRelease
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
Definition: GUISUMOAbstractView.cpp:976
ICON_LOCATEADD
Definition: GUIIcons.h:82
GNEPolygonFrame::show
void show()
show Frame
Definition: GNEPolygonFrame.cpp:246
GUIVisualizationSettings::lefthand
bool lefthand
whether drawing is performed in left-hand networks
Definition: GUIVisualizationSettings.h:659
GUIGlObjectType
GUIGlObjectType
Definition: GUIGlObjectTypes.h:39
GNELane::getIndex
int getIndex() const
returns the index of the lane
Definition: GNELane.cpp:774
GNEViewNetHelper::TestingMode
struct used to group all variables related with testing
Definition: GNEViewNetHelper.h:680
MAX2
T MAX2(T a, T b)
Definition: StdDefs.h:79
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNENet::splitEdge
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
Definition: GNENet.cpp:770
GNECrossing::getNBCrossing
NBNode::Crossing * getNBCrossing() const
get referente to NBode::Crossing
Definition: GNECrossing.cpp:104
GUICompleteSchemeStorage::getNames
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
Definition: GUICompleteSchemeStorage.cpp:99
MID_GNE_EDGE_STRAIGHTEN
remove inner geometry
Definition: GUIAppEnum.h:838
GNEDeleteFrame.h
GNEViewNet::buildViewToolBars
void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
Definition: GNEViewNet.cpp:221
GNEViewNet::onRightBtnRelease
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
Definition: GNEViewNet.cpp:765
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:1014
GLHelper::drawFilledCircle
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
Definition: GLHelper.cpp:348
NBNode::getPosition
const Position & getPosition() const
Definition: NBNode.h:247
MID_GNE_CROSSING_EDIT_SHAPE
edit junction shape
Definition: GUIAppEnum.h:891
GUISUMOAbstractView::myAmInitialised
bool myAmInitialised
Internal information whether doInit() was called.
Definition: GUISUMOAbstractView.h:477
GNERouteFrame::show
void show()
show delete frame
Definition: GNERouteFrame.cpp:750
GNEJunction::getNBNode
NBNode * getNBNode() const
Return net build node.
Definition: GNEJunction.cpp:398
MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES
hide shapes
Definition: GUIAppEnum.h:629
PositionVector::nearest_offset_to_point2D
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
Definition: PositionVector.cpp:817
GNEViewNetHelper::DemandViewOptions::unlockPerson
void unlockPerson()
unlock person
Definition: GNEViewNetHelper.cpp:1805
GNEViewNet::onCmdToogleShowDemandElements
long onCmdToogleShowDemandElements(FXObject *, FXSelector, void *)
Definition: GNEViewNet.cpp:2180
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:255
GLHelper::drawText
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
Definition: GLHelper.cpp:673
RGBColor
Definition: RGBColor.h:39
GUIPerspectiveChanger::onRightBtnRelease
virtual bool onRightBtnRelease(void *data)
called when user releases right button
Definition: GUIPerspectiveChanger.cpp:59
GNEFrameModuls::OverlappedInspection::overlappedInspectionShown
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
Definition: GNEFrameModuls.cpp:1867
GNEPoly::closePolygon
void closePolygon(bool allowUndo=true)
close polygon
Definition: GNEPoly.cpp:518
GNETLSEditorFrame::editTLS
void editTLS(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
edits the traffic light for the given clicked junction
Definition: GNETLSEditorFrame.cpp:137
GNEProhibitionFrame.h
GNE_NMODE_ADDITIONAL
Mode for editing additionals.
Definition: GNEViewNetHelper.h:70
GNEViewNetHelper::DemandViewOptions::buildDemandViewOptionsMenuChecks
void buildDemandViewOptionsMenuChecks()
build menu checks
Definition: GNEViewNetHelper.cpp:1676
GNENet::retrieveLanes
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
Definition: GNENet.cpp:1213
GUIVisualizationSettings::save
void save(OutputDevice &dev) const
Writes the settings into an output device.
Definition: GUIVisualizationSettings.cpp:1197
GNEFrame::focusUpperElement
void focusUpperElement()
focus upper element of frame
Definition: GNEFrame.cpp:101
RGBColor::MAGENTA
static const RGBColor MAGENTA
Definition: RGBColor.h:194
GNEViewNet::getEditShapes
const GNEViewNetHelper::EditShapes & getEditShapes() const
get Edit Shape modul
Definition: GNEViewNet.cpp:470
GNEViewNetHelper::NetworkViewOptions::menuCheckShowConnections
FXMenuCheck * menuCheckShowConnections
menu check to show connections
Definition: GNEViewNetHelper.h:393
GNEViewNet::onCmdSetMode
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
Definition: GNEViewNet.cpp:1204
GNEDeleteFrame::getDeleteOptions
DeleteOptions * getDeleteOptions() const
get delete options
Definition: GNEDeleteFrame.cpp:356
GNE_DMODE_SELECT
mode for selecting demand elements
Definition: GNEViewNetHelper.h:90
GUISUMOAbstractView::onLeftBtnRelease
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
Definition: GUISUMOAbstractView.cpp:943
GNEProhibitionFrame::onCmdCancel
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any prohibition modifications.
Definition: GNEProhibitionFrame.cpp:209
GNEViewNetHelper::NetworkCheckableButtons::disableNetworkCheckableButtons
void disableNetworkCheckableButtons()
hide all options menu checks
Definition: GNEViewNetHelper.cpp:1969
GNEViewNet::myObjectsUnderCursor
GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderCursor
variable use to save all pointers to objects under cursor after a click
Definition: GNEViewNet.h:379
GNECrossing
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:44
GNE_NMODE_TAZ
Mode for editing TAZ.
Definition: GNEViewNetHelper.h:74
GNETAZ.h
GNEViewNet::processMoveMouseDemand
void processMoveMouseDemand()
process move mouse function in Supermode Demand
Definition: GNEViewNet.cpp:3552
GNEViewNet::onCmdSplitJunctionReconnect
long onCmdSplitJunctionReconnect(FXObject *, FXSelector, void *)
split junction into multiple junctions and reconnect them
Definition: GNEViewNet.cpp:2088
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1273
GNEHierarchicalParentElements::getParentDemandElements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
Definition: GNEHierarchicalParentElements.cpp:114
GNEViewNetHelper::EditModes::setSupermode
void setSupermode(Supermode supermode)
set Network edit mode
Definition: GNEViewNetHelper.cpp:1307
ICON_LOCATEJUNCTION
Definition: GUIIcons.h:75
GNEViewNetHelper::MoveSingleElementValues::finishMoveSingleElement
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
Definition: GNEViewNetHelper.cpp:541
GNEViewNetHelper::SelectingArea::drawRectangleSelection
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
Definition: GNEViewNetHelper.cpp:1095
Boundary::xmin
double xmin() const
Returns minimum x-coordinate.
Definition: Boundary.cpp:118
GNEViewNetHelper::SelectingArea::beginRectangleSelection
void beginRectangleSelection()
begin rectangle selection
Definition: GNEViewNetHelper.cpp:1014
GNEAdditionalFrame::SelectorParentLanes::abortConsecutiveLaneSelector
void abortConsecutiveLaneSelector()
abort selection of consecutive lanes
Definition: GNEAdditionalFrame.cpp:175
GNEViewParent::getPersonPlanFrame
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
Definition: GNEViewParent.cpp:282
GNEViewNetHelper::DemandViewOptions::menuCheckHideNonInspectedDemandElements
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
Definition: GNEViewNetHelper.h:466
GNEVehicleFrame.h
GNECrossingFrame::createCrossingHotkey
void createCrossingHotkey()
create crossing (used when user press ENTER key in Crossing mode)
Definition: GNECrossingFrame.cpp:574
GNEViewNet::onCmdResetConnections
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
Definition: GNEViewNet.cpp:2126
GNENet::computeAndUpdate
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
Definition: GNENet.cpp:3094
GNENet::getEdgeCont
NBEdgeCont & getEdgeCont()
returns the NBEdgeCont of the underlying netbuilder
Definition: GNENet.cpp:2153
GNE_DMODE_PERSON
Mode for editing person.
Definition: GNEViewNetHelper.h:104
GNELane::getLaneShape
const PositionVector & getLaneShape() const
Definition: GNELane.cpp:86
GNEViewNetHelper::EditModes::buildSuperModeButtons
void buildSuperModeButtons()
build checkable buttons
Definition: GNEViewNetHelper.cpp:1289
GNEViewNetHelper::NetworkCheckableButtons::crossingButton
MFXCheckableButton * crossingButton
chekable button for edit mode crossing
Definition: GNEViewNetHelper.h:780
GUIDanielPerspectiveChanger
Definition: GUIDanielPerspectiveChanger.h:50
RGBColor::ORANGE
static const RGBColor ORANGE
Definition: RGBColor.h:195
GNEViewNet::setSelectionScaling
void setSelectionScaling(double selectionScale)
set selection scaling
Definition: GNEViewNet.cpp:535
GNEViewNetHelper::EditModes
struct used to group all variables related with Supermodes
Definition: GNEViewNetHelper.h:287
GNEEdge::getNBEdge
NBEdge * getNBEdge() const
returns the internal NBEdge
Definition: GNEEdge.cpp:631
GNEViewNetHelper::CommonCheckableButtons::buildCommonCheckableButtons
void buildCommonCheckableButtons()
build checkable buttons
Definition: GNEViewNetHelper.cpp:1829
GUIPropertyScheme::clear
void clear()
Definition: GUIPropertyScheme.h:104
GNEConnection::getConnectionShape
const PositionVector & getConnectionShape() const
Definition: GNEConnection.cpp:75
GNEViewNet::doPaintGL
int doPaintGL(int mode, const Boundary &bound)
do paintGL
Definition: GNEViewNet.cpp:603
GNEJunction::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Definition: GNEJunction.cpp:987
GNEViewNet::buildSelectionACPopupEntry
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
Definition: GNEViewNet.cpp:338
GUIGlObjectStorage::getNetObject
GUIGlObject * getNetObject() const
Returns the network object.
Definition: GUIGlObjectStorage.h:133
GNEViewNet::openObjectDialog
void openObjectDialog()
open object dialog
Definition: GNEViewNet.cpp:365
Position::distanceTo
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
Definition: Position.h:233
GNEViewNet::abortOperation
void abortOperation(bool clearSelection=true)
abort current edition operation
Definition: GNEViewNet.cpp:836
GUIPropertyScheme::isFixed
bool isFixed() const
Definition: GUIPropertyScheme.h:157
GNEConnectorFrame::handleLaneClick
void handleLaneClick(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
either sets the current lane or toggles the connection of the
Definition: GNEConnectorFrame.cpp:418
GNEDemandElement.h
GNEAttributeCarrier::TagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNEAttributeCarrier.cpp:715
GNEViewNet::getNetworkViewOptions
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
Definition: GNEViewNet.cpp:452
MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS
hide connections
Definition: GUIAppEnum.h:611
GNEViewNetHelper::CommonViewOptions
struct used to group all variables related to view options in all supermodes
Definition: GNEViewNetHelper.h:331
GNENet::splitJunction
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:1987
GNEPolygonFrame::AddShapeResult
AddShapeResult
enum with all possible values after try to create an shape using frame
Definition: GNEPolygonFrame.h:38
PositionVector::closePolygon
void closePolygon()
ensures that the last position equals the first
Definition: PositionVector.cpp:1231
GNEViewNet.h
GNEViewNet::myUndoList
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
Definition: GNEViewNet.h:446
GNEViewNetHelper::MoveMultipleElementValues::beginMoveSelection
void beginMoveSelection(GNEAttributeCarrier *originAC)
begin move selection
Definition: GNEViewNetHelper.cpp:773
GNEViewNetHelper::SelectingArea::processRectangleSelection
void processRectangleSelection()
process rectangle Selection
Definition: GNEViewNetHelper.cpp:1045
PositionVector::positionAtOffset
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Definition: PositionVector.cpp:248
ICON_LOCATEPOI
Definition: GUIIcons.h:83
GNEViewNet::getJunctionAtPopupPosition
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
Definition: GNEViewNet.cpp:1044
GNENet::retrieveDemandElements
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
Definition: GNENet.cpp:2328
GNEViewNet::autoSelectNodes
bool autoSelectNodes()
whether to autoselect nodes or to lanes
Definition: GNEViewNet.cpp:529
GNETAZFrame::TAZSaveChanges::onCmdSaveChanges
long onCmdSaveChanges(FXObject *, FXSelector, void *)
Definition: GNETAZFrame.cpp:444
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:149
GNEViewNet::getDottedAC
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
Definition: GNEViewNet.cpp:1026
GNENet::retrieveShapes
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
Definition: GNENet.cpp:1274
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
MID_GNE_LANE_REMOVE_BIKE
remove bikelane
Definition: GUIAppEnum.h:946
GNEViewNetHelper::DemandCheckableButtons::vehicleButton
MFXCheckableButton * vehicleButton
chekable button for edit mode create vehicles
Definition: GNEViewNetHelper.h:821
GNETAZFrame::TAZSaveChanges::isChangesPending
bool isChangesPending() const
return true if there is changes to save
Definition: GNETAZFrame.cpp:437
GNEViewNet::onLeftBtnRelease
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
Definition: GNEViewNet.cpp:730
GNELane::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Definition: GNELane.cpp:862
GNEViewNetHelper::MoveSingleElementValues::beginMoveSingleElementNetworkMode
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
Definition: GNEViewNetHelper.cpp:414
GNEViewNet::deleteSelectedShapes
void deleteSelectedShapes()
delete all currently selected shapes
Definition: GNEViewNet.cpp:2922
GNERouteFrame::hotkeyBackSpace
void hotkeyBackSpace()
function called when user press BACKSPACE key
Definition: GNERouteFrame.cpp:817
GNEViewNetHelper::CommonCheckableButtons::inspectButton
MFXCheckableButton * inspectButton
chekable button for edit mode inspect
Definition: GNEViewNetHelper.h:730
SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:47
MID_GNE_NETWORKVIEWOPTIONS_ASKFORMERGE
ask before merging junctions
Definition: GUIAppEnum.h:617
GNETLSEditorFrame.h
RGBColor::BLUE
static const RGBColor BLUE
Definition: RGBColor.h:191
GUIVisualizationSettings::scale
double scale
information about a lane's width (temporary, used for a single view)
Definition: GUIVisualizationSettings.h:632
GNEViewNet::deleteSelectedConnections
void deleteSelectedConnections()
delete all currently selected connections
Definition: GNEViewNet.cpp:2898
GNE_NMODE_SELECT
mode for selecting network elements
Definition: GNEViewNetHelper.h:60
GNE_SUPERMODE_NETWORK
Network mode (Edges, junctions, etc..)
Definition: GNEViewNetHelper.h:46
ProcessError
Definition: UtilExceptions.h:39
GNEViewNetHelper::EditModes::currentSupermode
Supermode currentSupermode
the current supermode
Definition: GNEViewNetHelper.h:305
GNEFrameModuls::DrawingShape::startDrawing
void startDrawing()
start drawing
Definition: GNEFrameModuls.cpp:1614
ICON_LOCATEPOLY
Definition: GUIIcons.h:84
GNEDeleteFrame::removeAttributeCarrier
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
Definition: GNEDeleteFrame.cpp:168
GNENet::addRestrictedLane
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, int index, GNEUndoList *undoList)
add restricted lane to edge
Definition: GNENet.cpp:720
MID_HOTKEY_W_PROHIBITIONMODE_PERSONTYPEMODE
hotkey for mode editing connection prohibitions AND person types
Definition: GUIAppEnum.h:67
GNEViewNetHelper::CommonCheckableButtons::selectButton
MFXCheckableButton * selectButton
chekable button for edit mode select
Definition: GNEViewNetHelper.h:736
GNEViewNet::getKeyPressed
const GNEViewNetHelper::KeyPressed & getKeyPressed() const
get Key Pressed modul
Definition: GNEViewNet.cpp:464
GNEViewNet::onCmdTransformPOI
long onCmdTransformPOI(FXObject *, FXSelector, void *)
Transform POI to POILane, and viceversa.
Definition: GNEViewNet.cpp:1559
GNEViewNet::deleteSelectedCrossings
void deleteSelectedCrossings()
delete all currently selected crossings
Definition: GNEViewNet.cpp:2872
GNEViewNetHelper::SelectingArea::startDrawing
bool startDrawing
whether we have started rectangle-selection
Definition: GNEViewNetHelper.h:663
GNEViewParent::getInspectorFrame
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
Definition: GNEViewParent.cpp:180
ICON_LOCATEROUTE
Definition: GUIIcons.h:78
GNENet::retrieveAttributeCarrier
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
Definition: GNENet.cpp:1334
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GLO_EDGE
an edge
Definition: GUIGlObjectTypes.h:46
GNEApplicationWindow.h
gSchemeStorage
GUICompleteSchemeStorage gSchemeStorage
Definition: GUICompleteSchemeStorage.cpp:38
GNE_NMODE_CONNECT
mode for connecting lanes
Definition: GNEViewNetHelper.h:66
Position::x
double x() const
Returns the x-position.
Definition: Position.h:56
Boundary::add
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:78
GNEEdge.h
GUIPerspectiveChanger::getZoom
virtual double getZoom() const =0
Returns the zoom factor computed stored in this changer.
FXDEFMAP
FXDEFMAP(GNEViewNet) GNEViewNetMap[]
GNEJunction::endGeometryMoving
void endGeometryMoving(bool extendToNeighbors=true)
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
Definition: GNEJunction.cpp:568
GNEViewNet::getUndoList
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:1020
GNENet::initGNEConnections
void initGNEConnections()
initialize GNEConnections
Definition: GNENet.cpp:3081
GNEViewParent::getAdditionalFrame
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
Definition: GNEViewParent.cpp:204
GUIVisualizationSettings::selectionScale
double selectionScale
the current selection scaling in NETEDIT (temporary)
Definition: GUIVisualizationSettings.h:641
GNEVehicleFrame::show
void show()
show Frame
Definition: GNEVehicleFrame.cpp:129
GNEViewNet::getDemandViewOptions
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
Definition: GNEViewNet.cpp:458
GNENetElement::isAttributeCarrierSelected
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
Definition: GNENetElement.cpp:114
GNEPoly::deleteGeometryPoint
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
Definition: GNEPoly.cpp:431
GNENet::duplicateLane
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
Definition: GNENet.cpp:674
GNEPersonPlanFrame::PersonPlanCreator::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNEPersonPlanFrame.cpp:306
SUMO_ATTR_Y
Definition: SUMOXMLDefinitions.h:399
GLHelper::drawLine
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
Definition: GLHelper.cpp:274
GNEViewNetHelper::MoveMultipleElementValues::finishMoveSelection
void finishMoveSelection()
finish moving selection
Definition: GNEViewNetHelper.cpp:925
GNEInspectorFrame::getOverlappedInspection
GNEFrameModuls::OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
Definition: GNEInspectorFrame.cpp:342
RGBColor::RED
static const RGBColor RED
named colors
Definition: RGBColor.h:189
GNETLSEditorFrame::show
void show()
show inspector frame
Definition: GNETLSEditorFrame.cpp:130
GNEViewNet::myObjectsUnderGrippedCursor
GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderGrippedCursor
variable use to save all pointers to objects under cursor after a click with grid enabled
Definition: GNEViewNet.h:382
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
GNEProhibitionFrame::show
void show()
show prohibition frame
Definition: GNEProhibitionFrame.cpp:197
GLO_LANE
a lane
Definition: GUIGlObjectTypes.h:48
MID_GNE_LANE_TRANSFORM_SIDEWALK
transform lane to sidewalk
Definition: GUIAppEnum.h:928
GNEViewNet::GNEViewNet
GNEViewNet()
FOX needs this.
Definition: GNEViewNet.cpp:552
GNEEdge::getOppositeEdge
GNEEdge * getOppositeEdge() const
get opposite edge
Definition: GNEEdge.cpp:499
GUISUMOAbstractView::myVisualizationSettings
GUIVisualizationSettings * myVisualizationSettings
visualization settings
Definition: GUISUMOAbstractView.h:471
GUISUMOAbstractView::drawDecals
void drawDecals()
Draws the stored decals.
Definition: GUISUMOAbstractView.cpp:1535
GNEViewNetHelper::ObjectsUnderCursor::getConnectionFront
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:298
GUIGlObjectStorage::getObjectBlocking
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
Definition: GUIGlObjectStorage.cpp:62
GNEDeleteFrame::show
void show()
show delete frame
Definition: GNEDeleteFrame.cpp:99
GNEViewNet::onCmdOpenAdditionalDialog
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
Definition: GNEViewNet.cpp:1716
GNEViewNet::onCmdToogleLockPerson
long onCmdToogleLockPerson(FXObject *, FXSelector, void *)
toogle lock person in super mode demand
Definition: GNEViewNet.cpp:2372
SUMOCURSOR_DEFAULT
default cursor
Definition: GUICursors.h:35
GNEFrameModuls::EdgePathCreator::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNEFrameModuls.cpp:699
GNETAZFrame.h
GUIGlObject
Definition: GUIGlObject.h:65
GNEViewNetHelper::NetworkViewOptions::menuCheckWarnAboutMerge
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
Definition: GNEViewNetHelper.h:405
GNEViewNet::restrictLane
bool restrictLane(SUMOVehicleClass vclass)
restrict lane
Definition: GNEViewNet.cpp:1728
GNEStopFrame::show
void show()
show Frame
Definition: GNEStopFrame.cpp:137
GUISUMOAbstractView::getPositionInformation
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Definition: GUISUMOAbstractView.cpp:190
MID_GNE_CONNECTION_EDIT_SHAPE
edit junction shape
Definition: GUIAppEnum.h:882
GNEPersonFrame.h
GNEViewNet::onCmdToogleHideConnections
long onCmdToogleHideConnections(FXObject *, FXSelector, void *)
toogle hide connections
Definition: GNEViewNet.cpp:2222
GNECrossing.h
GNEViewNet::deleteSelectedAdditionals
void deleteSelectedAdditionals()
delete all currently selected additionals
Definition: GNEViewNet.cpp:2838
MID_HOTKEY_T_TLSMODE_VTYPEMODE
hotkey for mode editing TLS AND Vehicle Types
Definition: GUIAppEnum.h:63
GNEEdge::getLanes
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
Definition: GNEEdge.cpp:874
GNENet::deleteConnection
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
Definition: GNENet.cpp:587
GNEViewNetHelper::NetworkViewOptions::buildNetworkViewOptionsMenuChecks
void buildNetworkViewOptionsMenuChecks()
build menu checks
Definition: GNEViewNetHelper.cpp:1475
GNEViewNet::getPolygonAtPopupPosition
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position
Definition: GNEViewNet.cpp:1161
GNEViewNet::onCmdSimplifyShape
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
Definition: GNEViewNet.cpp:1484
GNEViewNet::onCmdResetLength
long onCmdResetLength(FXObject *, FXSelector, void *)
reset custom edge lengths
Definition: GNEViewNet.cpp:1465
GNEViewNetHelper::DemandCheckableButtons::updateDemandCheckableButtons
void updateDemandCheckableButtons()
update Demand checkable buttons
Definition: GNEViewNetHelper.cpp:2081
MID_GNE_LANE_ADD_SIDEWALK
add sidewalk
Definition: GUIAppEnum.h:936
GUIDialog_ViewSettings.h
GNETLSEditorFrame::onCmdCancel
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
Definition: GNETLSEditorFrame.cpp:245
GNELane.h
MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION
move elevation instead of x,y
Definition: GUIAppEnum.h:621
GUISUMOAbstractView::onKeyRelease
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Definition: GUISUMOAbstractView.cpp:1085
GNEViewNet::updateDemandModeSpecificControls
void updateDemandModeSpecificControls()
updates Demand mode specific controls
Definition: GNEViewNet.cpp:2629
GUISUMOAbstractView::getPopupPosition
const Position & getPopupPosition() const
get position of current popup
Definition: GUISUMOAbstractView.cpp:879
GNEViewNetHelper::EditShapes::startEditCustomShape
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
Definition: GNEViewNetHelper.cpp:2103
GNENet::retrieveAdditionals
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
Definition: GNENet.cpp:2195
SUMOCURSOR_MOVE
move cursor
Definition: GUICursors.h:38
GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:258
GNEViewNetHelper::NetworkViewOptions::hideNetworkViewOptionsMenuChecks
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
Definition: GNEViewNetHelper.cpp:1559
GNEPersonFrame::getEdgePathCreator
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
Definition: GNEPersonFrame.cpp:225
NBEdgeCont::getAllEdges
EdgeVector getAllEdges() const
return all edges
Definition: NBEdgeCont.cpp:1599
GNEViewNet::doInit
void doInit()
called after some features are already initialized
Definition: GNEViewNet.cpp:217
GNEInspectorFrame::getAttributesEditor
GNEFrameAttributesModuls::AttributesEditor * getAttributesEditor() const
get AttributesEditor
Definition: GNEInspectorFrame.cpp:330
GNEViewNetHelper::EditShapes
struct used to group all variables related with edit shapes of NetElements
Definition: GNEViewNetHelper.h:844
ICON_LOCATEPERSON
Definition: GUIIcons.h:80
GNEViewNetHelper::KeyPressed::update
void update(void *eventData)
update status of KeyPressed
Definition: GNEViewNetHelper.cpp:370
GNEUndoList::p_abort
void p_abort()
reverts and discards ALL active command groups
Definition: GNEUndoList.cpp:93
GUIVisualizationSettings::colorSettings
GUIVisualizationColorSettings colorSettings
color settings
Definition: GUIVisualizationSettings.h:677
GNENet::replaceJunctionByGeometry
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
Definition: GNENet.cpp:1940
GUIVisualizationColorSettings::selectionColor
RGBColor selectionColor
basic selection color
Definition: GUIVisualizationSettings.h:129
GNENet::mergeJunctions
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
Definition: GNENet.cpp:935
GNEAttributeCarrier::isAttributeCarrierSelected
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
GUIVisualizationSettings::getCircleResolution
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions
Definition: GUIVisualizationSettings.cpp:1679
GNEViewNetHelper::ObjectsUnderCursor::getGlTypeFront
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:198
MID_GNE_LANE_TRANSFORM_GREENVERGE
transform lane to greenVerge
Definition: GUIAppEnum.h:934
GNE_DMODE_VEHICLE
Mode for editing vehicles.
Definition: GNEViewNetHelper.h:96
GNEViewNetHelper::DemandCheckableButtons::stopButton
MFXCheckableButton * stopButton
chekable button for edit mode create stops
Definition: GNEViewNetHelper.h:827
GNEViewNet::showLockIcon
bool showLockIcon() const
check if lock icon should be visible
Definition: GNEViewNet.cpp:1038
GNEViewNetHelper::EditShapes::saveEditedShape
void saveEditedShape()
save edited shape
Definition: GNEViewNetHelper.cpp:2138
GNEConnectorFrame::ConnectionModifications::onCmdCancelModifications
long onCmdCancelModifications(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
Definition: GNEConnectorFrame.cpp:114
MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES
select edges
Definition: GUIAppEnum.h:607
GNEViewParent.h
GNENet::retrieveJunctions
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
Definition: GNENet.cpp:1261
ICON_LOCATEVEHICLE
Definition: GUIIcons.h:77
GNEViewNet::myNetworkCheckableButtons
GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons
variable used to save checkable buttons for Supermode Network
Definition: GNEViewNet.h:392
GNEViewNet::onCmdSetSupermode
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
Definition: GNEViewNet.cpp:1188
GNE_NMODE_CROSSING
Mode for editing crossing.
Definition: GNEViewNetHelper.h:72
GNEViewNetHelper::NetworkViewOptions
struct used to group all variables related to view options in supermode Network
Definition: GNEViewNetHelper.h:360
GNEViewNet::onCmdToogleHideNonInspecteDemandElements
long onCmdToogleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toogle hide non inspected demand elements
Definition: GNEViewNet.cpp:2336
GUIGlObjectStorage::unblockObject
void unblockObject(GUIGlID id)
Marks an object as unblocked.
Definition: GUIGlObjectStorage.cpp:119
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:239
GNENet::retrieveCrossing
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
Definition: GNENet.cpp:1164
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GNEPoly.h
GNEAttributeCarrier::TagProperties::isPersonPlan
bool isPersonPlan() const
return true if tag correspond to a person plan
Definition: GNEAttributeCarrier.cpp:762
GNEViewNet::updateControls
void updateControls()
update control contents after undo/redo or recompute
Definition: GNEViewNet.cpp:3001
GNEViewNet::getTestingMode
const GNEViewNetHelper::TestingMode & getTestingMode() const
get testing mode
Definition: GNEViewNet.cpp:440
GNE_NMODE_PROHIBITION
Mode for editing connection prohibitions.
Definition: GNEViewNetHelper.h:78
GNENet::deleteJunction
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
Definition: GNENet.cpp:385
NBNode::getShape
const PositionVector & getShape() const
retrieve the junction shape
Definition: NBNode.cpp:2140
GNEViewNetHelper::DemandCheckableButtons::personPlanButton
MFXCheckableButton * personPlanButton
chekable button for edit mode create person plans
Definition: GNEViewNetHelper.h:836
GNEViewNet::onCmdStraightenEdges
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
Definition: GNEViewNet.cpp:1380
GNESelectorFrame.h
MID_GNE_POI_TRANSFORM
Transform POI to POILane, and viceversa.
Definition: GUIAppEnum.h:916
GNEViewNetHelper::SelectingArea::processEdgeRectangleSelection
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
Definition: GNEViewNetHelper.cpp:1061
GNEViewNet::getAttributeCarriersInBoundary
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
Definition: GNEViewNet.cpp:306
GNEViewNet::onLeftBtnPress
long onLeftBtnPress(FXObject *, FXSelector, void *)
Definition: GNEViewNet.cpp:700
MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED
hide non-inspected demand element
Definition: GUIAppEnum.h:627
OutputDevice::getDevice
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
Definition: OutputDevice.cpp:54
GUIPerspectiveChanger::onLeftBtnPress
virtual void onLeftBtnPress(void *data)
mouse functions
Definition: GUIPerspectiveChanger.cpp:43
GNEViewParent::getGNEAppWindows
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
Definition: GNEViewParent.cpp:314
MID_HOTKEY_V_VEHICLEMODE
hotkey for mode create vehicles
Definition: GUIAppEnum.h:65
GUIMainWindow
Definition: GUIMainWindow.h:46
GNEViewParent::hideAllFrames
void hideAllFrames()
hide all frames
Definition: GNEViewParent.cpp:168
Position::y
double y() const
Returns the y-position.
Definition: Position.h:61
SUMO_TAG_CROSSING
crossing between edges for pedestrians
Definition: SUMOXMLDefinitions.h:226
GNEViewNetHelper::NetworkViewOptions::menuCheckHideConnections
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
Definition: GNEViewNetHelper.h:396
MID_GNE_EDGE_SPLIT
split an edge
Definition: GUIAppEnum.h:846
GUIDialog_ViewSettings::setCurrentScheme
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
Definition: GUIDialog_ViewSettings.cpp:1791
MID_LOCATEJUNCTION
Locate junction - button.
Definition: GUIAppEnum.h:322
GNEVehicleTypeFrame::show
void show()
show Frame
Definition: GNEVehicleTypeFrame.cpp:396
GNENet::requireRecompute
void requireRecompute()
inform the net about the need for recomputation
Definition: GNENet.cpp:1569
GNEViewNet::deleteSelectedJunctions
void deleteSelectedJunctions()
delete all currently selected junctions
Definition: GNEViewNet.cpp:2794
GNEViewNetHelper::MoveSingleElementValues::moveSingleElement
void moveSingleElement()
move single element in Network AND Demand mode
Definition: GNEViewNetHelper.cpp:481
GNEPolygonFrame::processClick
AddShapeResult processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
Definition: GNEPolygonFrame.cpp:255
GNEAttributeCarrier::TagProperties::isPersonStop
bool isPersonStop() const
return true if tag correspond to a person stop element
Definition: GNEAttributeCarrier.cpp:786
NBNode::Crossing::customShape
PositionVector customShape
optional customShape for this crossing
Definition: NBNode.h:153
GUIVisualizationSettings::showLane2Lane
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
Definition: GUIVisualizationSettings.h:572
ICON_FLAG_PLUS
Definition: GUIIcons.h:126
GNENet::addReversedEdge
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
Definition: GNENet.cpp:900
GNEFrameModuls::DrawingShape::abortDrawing
void abortDrawing()
abort drawing
Definition: GNEFrameModuls.cpp:1644
GNEViewNet::processLeftButtonPressDemand
void processLeftButtonPressDemand(void *eventData)
process left button press function in Supermode Demand
Definition: GNEViewNet.cpp:3401
GNE_SUPERMODE_DEMAND
Demanding mode (Routes, Vehicles etc..)
Definition: GNEViewNetHelper.h:48
GNEViewParent::getRouteFrame
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
Definition: GNEViewParent.cpp:246
MID_GNE_EDGE_STRAIGHTEN_ELEVATION
interpolate z values linear between junctions
Definition: GUIAppEnum.h:842
GNENet::removeRestrictedLane
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, GNEUndoList *undoList)
remove restricted lane
Definition: GNENet.cpp:756
GNEViewNet::mergeJunctions
bool mergeJunctions(GNEJunction *moved, const Position &oldPos)
try to merge moved junction with another junction in that spot return true if merging did take place
Definition: GNEViewNet.cpp:2938
GUISUMOAbstractView::myApp
GUIMainWindow * myApp
The application.
Definition: GUISUMOAbstractView.h:447
GNEViewNet::onCmdToogleChangeAllPhases
long onCmdToogleChangeAllPhases(FXObject *, FXSelector, void *)
toogle change all phases
Definition: GNEViewNet.cpp:2246
GNEViewNet::myMoveMultipleElementValues
GNEViewNetHelper::MoveMultipleElementValues myMoveMultipleElementValues
variable used to save variables related with movement of multiple elements
Definition: GNEViewNet.h:417
GNEViewNet::onKeyRelease
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
Definition: GNEViewNet.cpp:816
GNEViewNet::getEdgeLaneParamKeys
std::vector< std::string > getEdgeLaneParamKeys(bool edgeKeys) const
return list of available edge parameters
Definition: GNEViewNet.cpp:570
GNETAZFrame::getDrawingShapeModul
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode modul
Definition: GNETAZFrame.cpp:1446
GNEStopFrame::addStop
bool addStop(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool shiftPressed)
add Stop element
Definition: GNEStopFrame.cpp:169
GNEViewParent::getPersonFrame
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
Definition: GNEViewParent.cpp:276
MID_GNE_EDGE_ADD_REVERSE
add reverse edge
Definition: GUIAppEnum.h:852
GNEPolygonFrame::getDrawingShapeModul
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode editor
Definition: GNEPolygonFrame.cpp:353
GNEViewNet::onCmdStraightenEdgesElevation
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
Definition: GNEViewNet.cpp:1423
GUISUMOAbstractView::myGrid
SUMORTree * myGrid
The visualization speed-up.
Definition: GUISUMOAbstractView.h:453
GNENet::clearJunctionConnections
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
Definition: GNENet.cpp:2071
GNENet::retrieveEdges
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
Definition: GNENet.cpp:1200
GUIGlObjectStorage::gIDStorage
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
Definition: GUIGlObjectStorage.h:140
GNEViewNet::deleteSelectedEdges
void deleteSelectedEdges()
delete all currently selected edges
Definition: GNEViewNet.cpp:2823
GNEViewNetHelper::NetworkViewOptions::selectEdges
bool selectEdges() const
check if select edges checkbox is enabled
Definition: GNEViewNetHelper.cpp:1627
GUISUMOAbstractView::paintGLGrid
void paintGLGrid()
paints a grid
Definition: GUISUMOAbstractView.cpp:540
GNEAdditionalFrame::getConsecutiveLaneSelector
GNEAdditionalFrame::SelectorParentLanes * getConsecutiveLaneSelector() const
getConsecutive Lane Selector
Definition: GNEAdditionalFrame.cpp:694
GNEViewNetHelper::NetworkCheckableButtons::additionalButton
MFXCheckableButton * additionalButton
chekable button for edit mode additional
Definition: GNEViewNetHelper.h:777
SUMO_TAG_CONNECTION
connectio between two lanes
Definition: SUMOXMLDefinitions.h:202
GNEViewNetHelper::NetworkViewOptions::menuCheckAutoOppositeEdge
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
Definition: GNEViewNetHelper.h:417
GNETAZFrame::processEdgeSelection
void processEdgeSelection(const std::vector< GNEEdge * > &edges)
process selection of edges in view net
Definition: GNETAZFrame.cpp:1414
GNEPoly::simplifyShape
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
Definition: GNEPoly.cpp:582
GNEFrameModuls::OverlappedInspection::checkSavedPosition
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
Definition: GNEFrameModuls.cpp:1879
MID_HOTKEY_F3_SUPERMODE_NETWORK
hot key <F3> set network mode in NETEDIT
Definition: GUIAppEnum.h:169
GNEViewParent::getTLSEditorFrame
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
Definition: GNEViewParent.cpp:198
GUIGlChildWindow::getColoringSchemesCombo
FXComboBox * getColoringSchemesCombo()
return combobox with the current coloring schemes (standard, fastest standard, real world....
Definition: GUIGlChildWindow.cpp:183
GNEAdditionalFrame::show
void show()
show Frame
Definition: GNEAdditionalFrame.cpp:642
GNESelectorFrame::clearCurrentSelection
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
Definition: GNESelectorFrame.cpp:130
GNEViewNet::onCmdToogleHideShapes
long onCmdToogleHideShapes(FXObject *, FXSelector, void *)
toogle hide shapes in super mode demand
Definition: GNEViewNet.cpp:2348
GNEViewNet::processLeftButtonReleaseNetwork
void processLeftButtonReleaseNetwork()
process left button release function in Supermode Network
Definition: GNEViewNet.cpp:3340
GNEAttributeCarrier::TagProperties::hasDialog
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
Definition: GNEAttributeCarrier.cpp:846
GNEVehicleTypeFrame.h
MID_LOCATEVEHICLE
Locate vehicle - button.
Definition: GUIAppEnum.h:326
GNEViewNet::myCommonCheckableButtons
GNEViewNetHelper::CommonCheckableButtons myCommonCheckableButtons
variable used to save checkable buttons for common supermodes
Definition: GNEViewNet.h:389
GNENet::addPOI
bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer, double angle, const std::string &imgFile, bool relativePath, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
Definition: GNENet.cpp:240
GNEViewNetHelper::NetworkCheckableButtons::TAZButton
MFXCheckableButton * TAZButton
chekable button for edit mode TAZ
Definition: GNEViewNetHelper.h:783
GNEPersonFrame::addPerson
bool addPerson(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Definition: GNEPersonFrame.cpp:191
GUISUMOAbstractView::myUseToolTips
bool myUseToolTips
use tool tips
Definition: GUISUMOAbstractView.h:474
GNENet::retrieveEdge
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:1069
GNEViewNet::getConnectionAtPopupPosition
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
Definition: GNEViewNet.cpp:1065
GNEViewNet::onCmdToogleShowGrid
long onCmdToogleShowGrid(FXObject *, FXSelector, void *)
toogle show grid
Definition: GNEViewNet.cpp:2258
GNEViewNet::setDottedAC
void setDottedAC(const GNEAttributeCarrier *AC)
set attributeCarrier under cursor
Definition: GNEViewNet.cpp:1032
GNERouteFrame::handleEdgeClick
void handleEdgeClick(GNEEdge *clickedEdge)
handle edge click
Definition: GNERouteFrame.cpp:765
GUISUMOAbstractView::onKeyPress
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
Definition: GUISUMOAbstractView.cpp:1074
GNEConnection
Definition: GNEConnection.h:38
MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES
automatically create opposite edge
Definition: GUIAppEnum.h:625
GUIPropertyScheme::addColor
int addColor(const T &color, const double threshold, const std::string &name="")
Definition: GUIPropertyScheme.h:80
GUISUMOAbstractView::getGUIGlObjectsUnderGrippedCursor
std::vector< GUIGlObject * > getGUIGlObjectsUnderGrippedCursor()
returns the GUIGlObject under the gripped cursor using GL_SELECT (including overlapped objects)
Definition: GUISUMOAbstractView.cpp:341
GNEViewNet::onCmdOpenPolygon
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
Definition: GNEViewNet.cpp:1529
GUISUMOAbstractView::myPopup
GUIGLObjectPopupMenu * myPopup
The current popup-menu.
Definition: GUISUMOAbstractView.h:465
GNEInspectorFrame::processDemandSupermodeClick
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
Definition: GNEInspectorFrame.cpp:166
GNEFrameModuls::DrawingShape::isDrawing
bool isDrawing() const
return true if currently a shape is drawed
Definition: GNEFrameModuls.cpp:1678
GNEViewNet::onCmdResetJunctionShape
long onCmdResetJunctionShape(FXObject *, FXSelector, void *)
reset junction shape
Definition: GNEViewNet.cpp:2034
GNEViewParent::getPersonTypeFrame
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
Definition: GNEViewParent.cpp:270
GUITextureSubSys::resetTextures
static void resetTextures()
Reset textures.
Definition: GUITextureSubSys.cpp:175
GNEViewNet::myDemandViewOptions
GNEViewNetHelper::DemandViewOptions myDemandViewOptions
variable used to save variables related with view options in Demand Supermode
Definition: GNEViewNet.h:408
MID_HOTKEY_P_POLYGONMODE_PERSONMODE
hotkey for mode creating polygons
Definition: GUIAppEnum.h:57
MID_GNE_LANE_ADD_GREENVERGE
add greenVerge
Definition: GUIAppEnum.h:942
GNECrossingFrame::addCrossing
void addCrossing(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add Crossing element
Definition: GNECrossingFrame.cpp:547
GNEViewNetHelper::ObjectsUnderCursor::getLaneFront
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:278
GNEAdditionalFrame::SelectorParentLanes::startConsecutiveLaneSelector
void startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition)
start selection of consecutive lanes
Definition: GNEAdditionalFrame.cpp:108
MID_GNE_EDGE_SMOOTH_ELEVATION
smooth elevation with regard to adjoining edges
Definition: GUIAppEnum.h:844
GNEViewNetHelper::NetworkViewOptions::menuCheckChainEdges
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
Definition: GNEViewNetHelper.h:414
SUMORTree::Search
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:118
GNEViewNet::onCmdReverseEdge
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
Definition: GNEViewNet.cpp:1317
GNEFrameModuls::EdgePathCreator::abortEdgePathCreation
void abortEdgePathCreation()
abort edge path creation
Definition: GNEFrameModuls.cpp:751
GNEViewNet::onCmdEditEdgeEndpoint
long onCmdEditEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
Definition: GNEViewNet.cpp:1359
GUISUMOAbstractView::myVisualizationChanger
GUIDialog_ViewSettings * myVisualizationChanger
Visualization changer.
Definition: GUISUMOAbstractView.h:486
GNEViewNet::onCmdResetEdgeEndpoint
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
Definition: GNEViewNet.cpp:1370
GNEViewNetHelper::NetworkCheckableButtons::prohibitionButton
MFXCheckableButton * prohibitionButton
checkable button for edit mode polygon
Definition: GNEViewNetHelper.h:789
GNEPolygonFrame::ADDSHAPE_UPDATEDTEMPORALSHAPE
Definition: GNEPolygonFrame.h:40
GNEViewNet::myMoveSingleElementValues
GNEViewNetHelper::MoveSingleElementValues myMoveSingleElementValues
Definition: GNEViewNet.h:414
GLO_JUNCTION
a junction
Definition: GUIGlObjectTypes.h:50
SVC_BUS
vehicle is a bus
Definition: SUMOVehicleClass.h:165
GNEAdditionalFrame.h
GNEApplicationWindow::getToolbarsGrip
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
Definition: GNEApplicationWindow.cpp:1728
MID_GNE_COMMONVIEWOPTIONS_SHOWGRID
show grid
Definition: GUIAppEnum.h:603
GNEViewNet::myEditShapes
GNEViewNetHelper::EditShapes myEditShapes
struct for grouping all variables related with edit shapes
Definition: GNEViewNet.h:434
MID_GNE_LANE_REMOVE_BUS
remove busLane
Definition: GUIAppEnum.h:948
GNEViewNet::getEditModes
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
Definition: GNEViewNet.cpp:434
GNEViewNetHelper::ObjectsUnderCursor::getAttributeCarrierFront
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:208
GNEViewNet::onCmdAddReversedEdge
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
Definition: GNEViewNet.cpp:1338
GNEViewNetHelper::NetworkViewOptions::menuCheckChangeAllPhases
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
Definition: GNEViewNetHelper.h:402
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:300
MID_GNE_JUNCTION_SPLIT
turn junction into multiple junctions
Definition: GUIAppEnum.h:868
GNEViewNet::onCmdRemoveSelected
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
unselect AC under cursor
Definition: GNEViewNet.cpp:2424
GNESelectorFrame::LockGLObjectTypes::IsObjectTypeLocked
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
Definition: GNESelectorFrame.cpp:579
GNE_DMODE_MOVE
mode for moving demand elements
Definition: GNEViewNetHelper.h:92
GNEPersonPlanFrame::addPersonPlan
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Definition: GNEPersonPlanFrame.cpp:473
RGBColor::GREEN
static const RGBColor GREEN
Definition: RGBColor.h:190
GNEGeometry::calculateRotation
static double calculateRotation(const Position &first, const Position &second)
return angle between two points (used in geometric calculations)
Definition: GNEGeometry.cpp:548
GNENetElement::selectAttributeCarrier
void selectAttributeCarrier(bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
Definition: GNENetElement.cpp:83
GUIPerspectiveChanger::getXPos
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
GNEViewNet::getCommonViewOptions
const GNEViewNetHelper::CommonViewOptions & getCommonViewOptions() const
get Common view options
Definition: GNEViewNet.cpp:446
MID_HOTKEY_I_INSPECTMODE
hotkey for mode inspecting object attributes
Definition: GUIAppEnum.h:53
GUISUMOAbstractView::getObjectsInBoundary
std::vector< GUIGlID > getObjectsInBoundary(Boundary bound, bool singlePosition)
returns the ids of all objects in the given boundary
Definition: GUISUMOAbstractView.cpp:472
GNEInspectorFrame.h
GNEPOI.h
MID_GNE_POLYGON_SIMPLIFY_SHAPE
simplify polygon geometry
Definition: GUIAppEnum.h:900
POI
C++ TraCI client API implementation.
SUMO_ATTR_ZOOM
Definition: SUMOXMLDefinitions.h:823
GNEViewNet::saveVisualizationSettings
void saveVisualizationSettings() const
Definition: GNEViewNet.cpp:406
GNEViewNet::onCmdDuplicateLane
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
Definition: GNEViewNet.cpp:1635
GNEUndoList
Definition: GNEUndoList.h:48
GNEViewNet::onCmdToogleShowJunctionBubbles
long onCmdToogleShowJunctionBubbles(FXObject *, FXSelector, void *)
toogle show junction bubbles
Definition: GNEViewNet.cpp:2288
GNEEdge::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Definition: GNEEdge.cpp:974
GNEViewNetHelper::EditModes::setDemandEditMode
void setDemandEditMode(DemandEditMode demandMode, bool force=false)
set Demand edit mode
Definition: GNEViewNetHelper.cpp:1395
GUIGlChildWindow
Definition: GUIGlChildWindow.h:40
ICON_FLAG_MINUS
Definition: GUIIcons.h:127
GNEViewNet::updateNetworkModeSpecificControls
void updateNetworkModeSpecificControls()
updates Network mode specific controls
Definition: GNEViewNet.cpp:2470
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
GNEEdge::resetEndpoint
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
Definition: GNEEdge.cpp:695
GNEViewNetHelper::DemandViewOptions::menuCheckHideShapes
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
Definition: GNEViewNetHelper.h:463
GNEViewNetHelper::NetworkCheckableButtons::buildNetworkCheckableButtons
void buildNetworkCheckableButtons()
build checkable buttons
Definition: GNEViewNetHelper.cpp:1904
GNEViewNet::onCmdToogleChainEdges
long onCmdToogleChainEdges(FXObject *, FXSelector, void *)
toogle chain edges
Definition: GNEViewNet.cpp:2312
GUISUMOAbstractView::destroyPopup
void destroyPopup()
destoys the popup
Definition: GUISUMOAbstractView.cpp:884
GNEJunction
Definition: GNEJunction.h:47
GNEViewNet::onCmdEditCrossingShape
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
Definition: GNEViewNet.cpp:2164
GNENet::deleteDemandElement
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
Definition: GNENet.cpp:645
GNEViewNet::deleteSelectedDemandElements
void deleteSelectedDemandElements()
delete all currently selected demand elements
Definition: GNEViewNet.cpp:2855
GNEViewNet::hotkeyDel
void hotkeyDel()
handle del keypress
Definition: GNEViewNet.cpp:899
GUISUMOAbstractView::myChanger
GUIPerspectiveChanger * myChanger
The perspective changer.
Definition: GUISUMOAbstractView.h:456
MID_LOCATEPOLY
Locate polygons - button.
Definition: GUIAppEnum.h:340
GUISUMOAbstractView::onMouseMove
virtual long onMouseMove(FXObject *, FXSelector, void *)
Definition: GUISUMOAbstractView.cpp:1013
GNECrossingFrame.h
GNEUndoList::p_begin
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
Definition: GNEUndoList.cpp:72
GNEViewNetHelper::DemandCheckableButtons::buildDemandCheckableButtons
void buildDemandCheckableButtons()
build checkable buttons
Definition: GNEViewNetHelper.cpp:2010
MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition: GUIAppEnum.h:605
SVC_IGNORING
vehicles ignoring classes
Definition: SUMOVehicleClass.h:135
GNEViewNet::myEditModes
GNEViewNetHelper::EditModes myEditModes
variable used to save variables related with edit moves modes
Definition: GNEViewNet.h:366
GNEViewNet::addRestrictedLane
bool addRestrictedLane(SUMOVehicleClass vclass)
add restricted lane
Definition: GNEViewNet.cpp:1803
GUISUMOAbstractView::myPopupPosition
Position myPopupPosition
The current popup-menu position.
Definition: GUISUMOAbstractView.h:468
GNEStopFrame.h
GNE_NMODE_INSPECT
mode for inspecting network elements
Definition: GNEViewNetHelper.h:56
GNEViewNet::deleteSelectedLanes
void deleteSelectedLanes()
delete all currently selected lanes
Definition: GNEViewNet.cpp:2808
GUICompleteSchemeStorage::contains
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
Definition: GUICompleteSchemeStorage.cpp:74
GNEViewNetHelper::EditShapes::stopEditCustomShape
void stopEditCustomShape()
edit edit shape
Definition: GNEViewNetHelper.cpp:2124
GUIVisualizationSettings::forceDrawForPositionSelection
bool forceDrawForPositionSelection
flag to force draw for position selection (see drawForPositionSelection)
Definition: GUIVisualizationSettings.h:650
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:107
GNEPoly::getVertexIndex
int getVertexIndex(Position pos, bool createIfNoExist, 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:410
SUMO_ATTR_SHAPE
edge: the shape in xml-definition
Definition: SUMOXMLDefinitions.h:690
MID_LOCATEADD
Locate addtional structure - button.
Definition: GUIAppEnum.h:336
GUIGlObject::getMicrosimID
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Definition: GUIGlObject.cpp:163
GNEViewNet::processMoveMouseNetwork
void processMoveMouseNetwork()
process move mouse function in Supermode Network
Definition: GNEViewNet.cpp:3381
MID_HOTKEY_E_EDGEMODE
hotkey for mode adding edges
Definition: GUIAppEnum.h:51
GNEViewNetHelper::CommonCheckableButtons::deleteButton
MFXCheckableButton * deleteButton
chekable button for edit mode delete
Definition: GNEViewNetHelper.h:733
GNEViewNetHelper::EditModes::networkEditMode
NetworkEditMode networkEditMode
the current Network edit mode
Definition: GNEViewNetHelper.h:308
GNEViewNet::myDottedAC
const GNEAttributeCarrier * myDottedAC
current AttributeCarrier that is drawn using with a dotted contour note: it's constant because is edi...
Definition: GNEViewNet.h:451
SUMO_ATTR_X
Definition: SUMOXMLDefinitions.h:398
GUICompleteSchemeStorage::get
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
Definition: GUICompleteSchemeStorage.cpp:62
MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE
hotkey for mode editing crossing AND routes
Definition: GUIAppEnum.h:61
WRITE_ERROR
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:283
GNEViewNet::onCmdToogleAutoOppositeEdge
long onCmdToogleAutoOppositeEdge(FXObject *, FXSelector, void *)
toogle autoOpposite edge
Definition: GNEViewNet.cpp:2324
GNEAdditionalFrame::SelectorParentLanes::isSelectingLanes
bool isSelectingLanes() const
return true if modul is selecting lane
Definition: GNEAdditionalFrame.cpp:257
GNEPersonPlanFrame::show
void show()
show Frame
Definition: GNEPersonPlanFrame.cpp:433
GUIGlChildWindow::getLocatorPopup
FXPopup * getLocatorPopup()
@ brief return a pointer to locator popup
Definition: GUIGlChildWindow.cpp:177
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES
change all phases
Definition: GUIAppEnum.h:615
MID_HOTKEY_M_MOVEMODE
hotkey for mode moving element
Definition: GUIAppEnum.h:55
GNE_DMODE_DELETE
mode for deleting demand elements
Definition: GNEViewNetHelper.h:88
MID_GNE_LANE_ADD_BIKE
add bikelane
Definition: GUIAppEnum.h:938
GNEViewNet::myViewParent
GNEViewParent * myViewParent
view parent
Definition: GNEViewNet.h:437
GUIDialog_ViewSettings::getCurrentScheme
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
Definition: GUIDialog_ViewSettings.cpp:1785
GNE_NMODE_MOVE
mode for moving network elements
Definition: GNEViewNetHelper.h:62
GNE_DMODE_STOP
Mode for editing stops.
Definition: GNEViewNetHelper.h:100
GNEAdditionalFrame::SelectorParentLanes::addSelectedLane
bool addSelectedLane(GNELane *lane, const Position &clickedPosition)
return true if lane can be selected as consecutive lane
Definition: GNEAdditionalFrame.cpp:197
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:284
GUIVisualizationSettings::disableLaneIcons
bool disableLaneIcons
whether drawing is performed in left-hand networks
Definition: GUIVisualizationSettings.h:665
MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES
create edges in chain mode
Definition: GUIAppEnum.h:623
GUITextureSubSys.h
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
GUIVisualizationSettings::forceDrawForRectangleSelection
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
Definition: GUIVisualizationSettings.h:653
GNEAdditional::openAdditionalDialog
virtual void openAdditionalDialog()
open Additional Dialog
Definition: GNEAdditional.cpp:245
GNEViewNetHelper::CommonViewOptions::buildCommonViewOptionsMenuChecks
void buildCommonViewOptionsMenuChecks()
build menu checks
Definition: GNEViewNetHelper.cpp:1439
GNEViewNetHelper::DemandViewOptions::menuCheckLockPerson
FXMenuCheck * menuCheckLockPerson
Lock Person.
Definition: GNEViewNetHelper.h:472
GUIPropertyScheme
Definition: GUIPropertyScheme.h:45
GNENet.h
GNEViewParent::getVehicleFrame
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
Definition: GNEViewParent.cpp:252
GNEViewNet::onCmdSplitEdge
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
Definition: GNEViewNet.cpp:1292
GNEViewNet::getViewParent
GNEViewParent * getViewParent() const
get the net object
Definition: GNEViewNet.cpp:1008
GNEViewNet::onCmdClosePolygon
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
Definition: GNEViewNet.cpp:1514
GNEFrameModuls::DrawingShape::getTemporalShape
const PositionVector & getTemporalShape() const
get Temporal shape
Definition: GNEFrameModuls.cpp:1672
GUISUMOAbstractView::onPaint
virtual long onPaint(FXObject *, FXSelector, void *)
Definition: GUISUMOAbstractView.cpp:866
GNESelectorFrame::getLockGLObjectTypes
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
Definition: GNESelectorFrame.cpp:459
MID_REMOVESELECT
Remove from selected items - Menu Etry.
Definition: GUIAppEnum.h:410
GNEViewNetHelper::NetworkViewOptions::menuCheckMoveElevation
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
Definition: GNEViewNetHelper.h:411
GNEAttributeCarrier::unselectAttributeCarrier
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
GNEInspectorFrame::processNetworkSupermodeClick
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
Definition: GNEInspectorFrame.cpp:126
GNEViewNetHelper::ObjectsUnderCursor::swapLane2Edge
void swapLane2Edge()
swap lane to edge
Definition: GNEViewNetHelper.cpp:171
SUMO_TAG_JUNCTION
begin/end of the description of a junction
Definition: SUMOXMLDefinitions.h:59
GNEViewNetHelper::SelectingArea::finishRectangleSelection
void finishRectangleSelection()
finish rectangle selection
Definition: GNEViewNetHelper.cpp:1037
GNEUndoList.h
GNEViewNetHelper::MoveSingleElementValues::beginMoveSingleElementDemandMode
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
Definition: GNEViewNetHelper.cpp:460
Boundary::ymax
double ymax() const
Returns maximum y-coordinate.
Definition: Boundary.cpp:136
NBNode::computeNodeShape
void computeNodeShape(double mismatchThreshold)
Compute the junction shape for this node.
Definition: NBNode.cpp:988
GNEFrameModuls::EdgePathCreator::removeLastInsertedElement
void removeLastInsertedElement()
remove last added element (either a BusStop or an edge)
Definition: GNEFrameModuls.cpp:767
GNEInspectorFrame::show
void show()
show inspector frame
Definition: GNEInspectorFrame.cpp:111
ICON_LOCATESTOP
Definition: GUIIcons.h:79
GNEVehicleFrame::getEdgePathCreator
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
Definition: GNEVehicleFrame.cpp:249
GNEViewNet::processLeftButtonPressNetwork
void processLeftButtonPressNetwork(void *eventData)
mouse process functions
Definition: GNEViewNet.cpp:3127
GNEPoly::changeFirstGeometryPoint
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
Definition: GNEPoly.cpp:540
GNEConnection.h
GNEViewNet::myNet
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
Definition: GNEViewNet.h:440
GNEViewNetHelper::NetworkViewOptions::menuCheckSelectEdges
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
Definition: GNEViewNetHelper.h:390
GNEViewNet::onCmdReplaceJunction
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
Definition: GNEViewNet.cpp:2060
GNEViewParent::getCrossingFrame
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
Definition: GNEViewParent.cpp:210
MID_HOTKEY_A_ADDITIONALMODE_STOPMODE
hotkey for mode editing additionals AND stops
Definition: GUIAppEnum.h:45