Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEViewParent.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2023 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// A single child window which contains a view of the edited network (adapted
19// from GUISUMOViewParent)
20// While we don't actually need MDI for netedit it is easier to adapt existing
21// structures than to write everything from scratch.
22/****************************************************************************/
23
54
56#include "GNEViewNet.h"
57#include "GNENet.h"
58#include "GNEViewParent.h"
59#include "GNEUndoList.h"
60
61
62// ===========================================================================
63// FOX callback mapping
64// ===========================================================================
65
82
83// Object implementation
84FXIMPLEMENT(GNEViewParent, GUIGlChildWindow, GNEViewParentMap, ARRAYNUMBER(GNEViewParentMap))
85
86
87// ===========================================================================
88// member method definitions
89// ===========================================================================
90
91GNEViewParent::GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu, const FXString& name, GNEApplicationWindow* parentWindow,
92 FXGLCanvas* share, GNENet* net, GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) :
93 GUIGlChildWindow(p, parentWindow, mdimenu, name, parentWindow->getToolbarsGrip().navigation, ic, opts, x, y, w, h),
94 myGNEAppWindows(parentWindow) {
95 // Add child to parent
96 myGUIMainWindowParent->addGLChild(this);
97
98 // Create Vertical separator
99 new FXVerticalSeparator(myGripNavigationToolbar, GUIDesignVerticalSeparator);
100
101 // Create undo/redo buttons
102 myUndoButton = new MFXButtonTooltip(myGripNavigationToolbar, myGNEAppWindows->getStaticTooltipMenu(),
103 std::string("\t") + TL("Undo") + std::string("\t") + TL("Undo the last change. (Ctrl+Z)"),
105 myRedoButton = new MFXButtonTooltip(myGripNavigationToolbar, myGNEAppWindows->getStaticTooltipMenu(),
106 std::string("\t") + TL("Redo") + std::string("\t") + TL("Redo the last change. (Ctrl+Y)"),
108
109 // Create Vertical separator
110 new FXVerticalSeparator(myGripNavigationToolbar, GUIDesignVerticalSeparator);
111
112 // create compute path manager button
113 myComputePathManagerButton = new MFXButtonTooltip(myGripNavigationToolbar, myGNEAppWindows->getStaticTooltipMenu(),
114 std::string("\t") + TL("Compute path manager") + std::string("\t") + TL("Compute path manager."),
116
117 // Create Frame Splitter
118 myFramesSplitter = new FXSplitter(myChildWindowContentFrame, this, MID_GNE_VIEWPARENT_FRAMEAREAWIDTH, GUIDesignSplitter | SPLITTER_HORIZONTAL);
119
120 // Create frames Area (vertical frame)
121 myFramesArea = new FXVerticalFrame(myFramesSplitter, GUIDesignFrameArea);
122
123 // Create view area
124 myViewArea = new FXHorizontalFrame(myFramesSplitter, GUIDesignViewnArea);
125
126 // Add the view to a temporary parent so that we can add items to myViewArea in the desired order
127 FXComposite* tmp = new FXComposite(this);
128
129 // Create view net
130 GNEViewNet* viewNet = new GNEViewNet(tmp, myViewArea, *myGUIMainWindowParent, this, net, undoList, myGUIMainWindowParent->getGLVisual(), share);
131
132 // show toolbar grips
133 myGNEAppWindows->getToolbarsGrip().buildMenuToolbarsGrip();
134
135 // Set pointer myView with the created view net
136 myView = viewNet;
137
138 // build frames
139 myCommonFrames.buildCommonFrames(this, viewNet);
140 myNetworkFrames.buildNetworkFrames(this, viewNet);
141 myDemandFrames.buildDemandFrames(this, viewNet);
142 myDataFrames.buildDataFrames(this, viewNet);
143
144 // set default frames area width
145 myFramesArea->setWidth(GUIDesignFramesAreaDefaultWidth);
146
147 // Update frame areas after creation
148 onCmdUpdateFrameAreaWidth(nullptr, 0, nullptr);
149
150 // Hide all Frames Area
151 hideFramesArea();
152
153 // Build view toolBars
154 myView->buildViewToolBars(this);
155
156 // create windows
158}
159
160
162 // delete toolbar grips
164 // Remove child before remove
166}
167
168
169void
176
177
184 } else if (myDemandFrames.isDemandFrameShown()) {
186 } else if (myDataFrames.isDataFrameShown()) {
188 } else {
189 return nullptr;
190 }
191}
192
193
198
199
204
205
210
211
216
217
222
223
228
229
234
235
240
241
246
247
252
253
258
259
264
265
270
271
276
277
282
283
288
289
294
295
300
301
306
307
312
313
318
319
324
325
330
331
336
337
342
343
348
349
350void
352 const bool frameShown = myCommonFrames.isCommonFrameShown() ||
356 // show and recalc framesArea if at least there is a frame shown
357 if (frameShown) {
358 myFramesArea->recalc();
359 myFramesArea->show();
360 }
361}
362
363
364void
366 const bool frameShown = myCommonFrames.isCommonFrameShown() ||
370 // hide and recalc frames Area if all frames are hidden is enabled
371 if (!frameShown) {
372 myFramesArea->hide();
373 myFramesArea->recalc();
374 }
375}
376
377
382
383
388
389
390void
392 if (chooserDialog == nullptr) {
393 throw ProcessError("ChooserDialog already deleted");
394 } else if (chooserDialog == myACChoosers.ACChooserJunction) {
396 } else if (chooserDialog == myACChoosers.ACChooserEdges) {
398 } else if (chooserDialog == myACChoosers.ACChooserWalkingAreas) {
400 } else if (chooserDialog == myACChoosers.ACChooserVehicles) {
402 } else if (chooserDialog == myACChoosers.ACChooserPersons) {
404 } else if (chooserDialog == myACChoosers.ACChooserRoutes) {
406 } else if (chooserDialog == myACChoosers.ACChooserStops) {
408 } else if (chooserDialog == myACChoosers.ACChooserTLS) {
409 myACChoosers.ACChooserTLS = nullptr;
410 } else if (chooserDialog == myACChoosers.ACChooserAdditional) {
412 } else if (chooserDialog == myACChoosers.ACChooserPOI) {
413 myACChoosers.ACChooserPOI = nullptr;
414 } else if (chooserDialog == myACChoosers.ACChooserPolygon) {
416 } else if (chooserDialog == myACChoosers.ACChooserProhibition) {
418 } else if (chooserDialog == myACChoosers.ACChooserWire) {
419 myACChoosers.ACChooserWire = nullptr;
420 } else {
421 throw ProcessError("Unregistered chooserDialog");
422 }
423}
424
425
426void
431
432
433FXVerticalFrame*
437
438
439int
441 return myFramesArea->getWidth();
442}
443
444
445void
446GNEViewParent::setFrameAreaWidth(const int frameAreaWith) {
447 myFramesArea->setWidth(frameAreaWith);
449}
450
451
452long
453GNEViewParent::onCmdMakeSnapshot(FXObject*, FXSelector, void*) {
454 // get the new file name
455 FXFileDialog opendialog(this, TL("Save Snapshot"));
456 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::CAMERA));
457 opendialog.setSelectMode(SELECTFILE_ANY);
458 opendialog.setPatternList("All Image Files (*.gif, *.bmp, *.xpm, *.pcx, *.ico, *.rgb, *.xbm, *.tga, *.png, *.jpg, *.jpeg, *.tif, *.tiff, *.ps, *.eps, *.pdf, *.svg, *.tex, *.pgf)\n"
459 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n"
460 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n"
461 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n"
462 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n"
463 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n"
464 "All Files (*)");
465 if (gCurrentFolder.length() != 0) {
466 opendialog.setDirectory(gCurrentFolder);
467 }
468 if (!opendialog.execute() || !MFXUtils::userPermitsOverwritingWhenFileExists(this, opendialog.getFilename())) {
469 return 1;
470 }
471 gCurrentFolder = opendialog.getDirectory();
472 std::string file = opendialog.getFilename().text();
473 if (file.find(".") == std::string::npos) {
474 file.append(".png");
475 WRITE_MESSAGE(TL("No file extension was specified - saving Snapshot as PNG."));
476 }
477 std::string error = myView->makeSnapshot(file);
478 if (error != "") {
479 // write warning if netedit is running in testing mode
480 WRITE_DEBUG("Opening FXMessageBox 'error saving snapshot'");
481 // open message box
482 FXMessageBox::error(this, MBOX_OK, TL("Saving failed."), "%s", error.c_str());
483 // write warning if netedit is running in testing mode
484 WRITE_DEBUG("Closed FXMessageBox 'error saving snapshot' with 'OK'");
485 } else {
486 WRITE_MESSAGE(TL("Snapshot successfully saved!"));
487 }
488 return 1;
489}
490
491
492long
493GNEViewParent::onCmdClose(FXObject*, FXSelector /* sel */, void*) {
494 myGUIMainWindowParent->handle(this, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION), nullptr);
495 return 1;
496}
497
498
499long
500GNEViewParent::onCmdLocate(FXObject*, FXSelector sel, void*) {
501 GNEViewNet* viewNet = dynamic_cast<GNEViewNet*>(myView);
502 // check that viewNet exist
503 if (viewNet) {
504 // declare a vector in which save attribute carriers to locate
505 std::vector<GNEAttributeCarrier*> ACsToLocate;
506 int messageId = FXSELID(sel);
507 GNEDialogACChooser** chooserLoc = nullptr;
508 std::string locateTitle;
509 switch (messageId) {
511 chooserLoc = &myACChoosers.ACChooserJunction;
512 locateTitle = TL("Junction Chooser");
513 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getJunctions().size());
514 for (const auto& junction : viewNet->getNet()->getAttributeCarriers()->getJunctions()) {
515 ACsToLocate.push_back(junction.second);
516 }
517 break;
519 chooserLoc = &myACChoosers.ACChooserEdges;
520 locateTitle = TL("Edge Chooser");
521 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getEdges().size());
522 for (const auto& edge : viewNet->getNet()->getAttributeCarriers()->getEdges()) {
523 ACsToLocate.push_back(edge.second);
524 }
525 break;
528 locateTitle = TL("WalkingArea Chooser");
529 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getWalkingAreas().size());
530 for (const auto& walkingArea : viewNet->getNet()->getAttributeCarriers()->getWalkingAreas()) {
531 ACsToLocate.push_back(walkingArea);
532 }
533 break;
535 chooserLoc = &myACChoosers.ACChooserVehicles;
536 locateTitle = TL("Vehicle Chooser");
537 const auto demandElements = viewNet->getNet()->getAttributeCarriers()->getDemandElements();
538 // reserve memory
539 ACsToLocate.reserve(demandElements.at(SUMO_TAG_VEHICLE).size() +
540 demandElements.at(SUMO_TAG_TRIP).size() +
541 demandElements.at(GNE_TAG_VEHICLE_WITHROUTE).size() +
542 demandElements.at(GNE_TAG_TRIP_JUNCTIONS).size() +
543 demandElements.at(GNE_TAG_TRIP_TAZS).size() +
544 demandElements.at(SUMO_TAG_FLOW).size() +
545 demandElements.at(GNE_TAG_FLOW_ROUTE).size() +
546 demandElements.at(GNE_TAG_FLOW_WITHROUTE).size() +
547 demandElements.at(GNE_TAG_FLOW_JUNCTIONS).size() +
548 demandElements.at(GNE_TAG_FLOW_TAZS).size());
549 // fill ACsToLocate with vehicles,...
550 for (const auto& vehicle : demandElements.at(SUMO_TAG_VEHICLE)) {
551 ACsToLocate.push_back(vehicle);
552 }
553 // ...trips,...
554 for (const auto& trip : demandElements.at(SUMO_TAG_TRIP)) {
555 ACsToLocate.push_back(trip);
556 }
557 // ...vehicles with embedded routes,...
558 for (const auto& tripEmbedded : demandElements.at(GNE_TAG_VEHICLE_WITHROUTE)) {
559 ACsToLocate.push_back(tripEmbedded);
560 }
561 // ...trips over junctions,...
562 for (const auto& tripJunction : demandElements.at(GNE_TAG_TRIP_JUNCTIONS)) {
563 ACsToLocate.push_back(tripJunction);
564 }
565 // ...trips over TAZs,...
566 for (const auto& tripTAZ : demandElements.at(GNE_TAG_TRIP_TAZS)) {
567 ACsToLocate.push_back(tripTAZ);
568 }
569 // ...flows,...
570 for (const auto& flow : demandElements.at(SUMO_TAG_FLOW)) {
571 ACsToLocate.push_back(flow);
572 }
573 // ...flows over routes,...
574 for (const auto& flowRoute : demandElements.at(GNE_TAG_FLOW_ROUTE)) {
575 ACsToLocate.push_back(flowRoute);
576 }
577 // ...flows with embedded routes...
578 for (const auto& flowRouteEmbedded : demandElements.at(GNE_TAG_FLOW_WITHROUTE)) {
579 ACsToLocate.push_back(flowRouteEmbedded);
580 }
581 // ... and flows over junctions.
582 for (const auto& flowJunction : demandElements.at(GNE_TAG_FLOW_JUNCTIONS)) {
583 ACsToLocate.push_back(flowJunction);
584 }
585 // ... and flows over TAZs.
586 for (const auto& flowTAZ : demandElements.at(GNE_TAG_FLOW_TAZS)) {
587 ACsToLocate.push_back(flowTAZ);
588 }
589 break;
590 }
592 chooserLoc = &myACChoosers.ACChooserPersons;
593 locateTitle = TL("Person Chooser");
594 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_PERSON).size() +
596 // fill ACsToLocate with persons
597 for (const auto& person : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_PERSON)) {
598 ACsToLocate.push_back(person);
599 }
600 // fill ACsToLocate with personFlows
601 for (const auto& personFlow : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_PERSONFLOW)) {
602 ACsToLocate.push_back(personFlow);
603 }
604 break;
606 chooserLoc = &myACChoosers.ACChooserRoutes;
607 locateTitle = TL("Route Chooser");
608 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE).size());
609 for (const auto& route : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE)) {
610 ACsToLocate.push_back(route);
611 }
612 break;
614 chooserLoc = &myACChoosers.ACChooserStops;
615 locateTitle = TL("Stop Chooser");
616 // reserve memory
617 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_LANE).size() +
623 // fill ACsToLocate with stop over lanes
624 for (const auto& stopLane : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_LANE)) {
625 ACsToLocate.push_back(stopLane);
626 }
627 // fill ACsToLocate with stop over bus stops
628 for (const auto& stopBusStop : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_BUSSTOP)) {
629 ACsToLocate.push_back(stopBusStop);
630 }
631 // fill ACsToLocate with stop over train stops
632 for (const auto& stopTrainStop : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_TRAINSTOP)) {
633 ACsToLocate.push_back(stopTrainStop);
634 }
635 // fill ACsToLocate with stop over container stops
636 for (const auto& stopContainerStop : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_CONTAINERSTOP)) {
637 ACsToLocate.push_back(stopContainerStop);
638 }
639 // fill ACsToLocate with stop over charging stations
640 for (const auto& stopChargingStation : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_CHARGINGSTATION)) {
641 ACsToLocate.push_back(stopChargingStation);
642 }
643 // fill ACsToLocate with stop over parking areas
644 for (const auto& stopParkingArea : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(GNE_TAG_STOP_PARKINGAREA)) {
645 ACsToLocate.push_back(stopParkingArea);
646 }
647 break;
648 }
650 chooserLoc = &myACChoosers.ACChooserTLS;
651 locateTitle = TL("TLS Chooser");
652 // fill ACsToLocate with junctions that haven TLS
653 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getJunctions().size());
654 for (const auto& junction : viewNet->getNet()->getAttributeCarriers()->getJunctions()) {
655 if (junction.second->getNBNode()->getControllingTLS().size() > 0) {
656 ACsToLocate.push_back(junction.second);
657 }
658 }
659 break;
661 chooserLoc = &myACChoosers.ACChooserAdditional;
662 locateTitle = TL("Additional Chooser");
663 for (const auto& additionalTag : viewNet->getNet()->getAttributeCarriers()->getAdditionals()) {
664 if (additionalTag.first == SUMO_TAG_POI
665 || additionalTag.first == GNE_TAG_POILANE
666 || additionalTag.first == GNE_TAG_POIGEO
667 || additionalTag.first == SUMO_TAG_POLY) {
668 continue;
669 }
670 for (const auto& additional : additionalTag.second) {
671 ACsToLocate.push_back(additional);
672 }
673 }
674 break;
676 chooserLoc = &myACChoosers.ACChooserPOI;
677 locateTitle = TL("POI Chooser");
678 // fill ACsToLocate with POIs
679 for (const auto& POI : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_POI)) {
680 ACsToLocate.push_back(POI);
681 }
682 for (const auto& POI : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(GNE_TAG_POILANE)) {
683 ACsToLocate.push_back(POI);
684 }
685 for (const auto& POI : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(GNE_TAG_POIGEO)) {
686 ACsToLocate.push_back(POI);
687 }
688 break;
690 chooserLoc = &myACChoosers.ACChooserPolygon;
691 locateTitle = TL("Poly Chooser");
692 // fill ACsToLocate with polys and TAZs (because share namespae)
693 for (const auto& polygon : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_POLY)) {
694 ACsToLocate.push_back(polygon);
695 }
696 for (const auto& taz : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_TAZ)) {
697 ACsToLocate.push_back(taz);
698 }
699 break;
700 default:
701 throw ProcessError("Unknown Message ID in onCmdLocate");
702 }
703 if (*chooserLoc) {
704 // restore focus in the existent chooser dialog
705 GNEDialogACChooser* chooser = *chooserLoc;
706 chooser->restore();
707 chooser->setFocus();
708 chooser->raise();
709 } else {
710 GNEDialogACChooser* chooser = new GNEDialogACChooser(this, messageId, GUIIconSubSys::getIcon(GUIIcon::LOCATEJUNCTION), locateTitle, ACsToLocate);
711 *chooserLoc = chooser;
712 }
713 // update locator popup
714 myLocatorPopup->popdown();
715 myLocatorButton->killFocus();
716 myLocatorPopup->update();
717 }
718 return 1;
719}
720
721
722long
723GNEViewParent::onKeyPress(FXObject* o, FXSelector sel, void* eventData) {
724 myView->onKeyPress(o, sel, eventData);
725 return 0;
726}
727
728
729long
730GNEViewParent::onKeyRelease(FXObject* o, FXSelector sel, void* eventData) {
731 myView->onKeyRelease(o, sel, eventData);
732 return 0;
733}
734
735
736long
737GNEViewParent::onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*) {
738 const int framesAreaWidth = myFramesArea->getWidth();
739 // set width of FramesArea in all frames
740 myCommonFrames.setCommonFramesWidth(framesAreaWidth);
741 myNetworkFrames.setNetworkFramesWidth(framesAreaWidth);
742 myDemandFrames.setDemandFramesWidth(framesAreaWidth);
743 myDataFrames.setDataFramesWidth(framesAreaWidth);
744 return 0;
745}
746
747// ---------------------------------------------------------------------------
748// GNEViewParent::CommonFrames - methods
749// ---------------------------------------------------------------------------
750
752 inspectorFrame(nullptr),
753 deleteFrame(nullptr),
754 selectorFrame(nullptr),
755 moveFrame(nullptr) {
756}
757
758
759void
761 inspectorFrame = new GNEInspectorFrame(viewParent, viewNet);
762 selectorFrame = new GNESelectorFrame(viewParent, viewNet);
763 moveFrame = new GNEMoveFrame(viewParent, viewNet);
764 deleteFrame = new GNEDeleteFrame(viewParent, viewNet);
765}
766
767
768void
770 inspectorFrame->hide();
771 deleteFrame->hide();
772 selectorFrame->hide();
773 moveFrame->hide();
774}
775
776
777void
779 // set width in all frames
780 inspectorFrame->setFrameWidth(frameWidth);
781 deleteFrame->setFrameWidth(frameWidth);
782 selectorFrame->setFrameWidth(frameWidth);
783 moveFrame->setFrameWidth(frameWidth);
784}
785
786
787bool
789 // check all frames
790 if (inspectorFrame->shown()) {
791 return true;
792 } else if (deleteFrame->shown()) {
793 return true;
794 } else if (selectorFrame->shown()) {
795 return true;
796 } else if (moveFrame->shown()) {
797 return true;
798 } else {
799 return false;
800 }
801}
802
803
806 // check all frames
807 if (inspectorFrame->shown()) {
808 return inspectorFrame;
809 } else if (deleteFrame->shown()) {
810 return deleteFrame;
811 } else if (selectorFrame->shown()) {
812 return selectorFrame;
813 } else if (moveFrame->shown()) {
814 return moveFrame;
815 } else {
816 return nullptr;
817 }
818}
819
820// ---------------------------------------------------------------------------
821// GNEViewParent::NetworkFrames - methods
822// ---------------------------------------------------------------------------
823
825 connectorFrame(nullptr),
826 TLSEditorFrame(nullptr),
827 additionalFrame(nullptr),
828 crossingFrame(nullptr),
829 TAZFrame(nullptr),
830 polygonFrame(nullptr),
831 prohibitionFrame(nullptr),
832 wireFrame(nullptr),
833 createEdgeFrame(nullptr) {
834}
835
836
837void
839 connectorFrame = new GNEConnectorFrame(viewParent, viewNet);
840 prohibitionFrame = new GNEProhibitionFrame(viewParent, viewNet);
841 wireFrame = new GNEWireFrame(viewParent, viewNet);
842 TLSEditorFrame = new GNETLSEditorFrame(viewParent, viewNet);
843 additionalFrame = new GNEAdditionalFrame(viewParent, viewNet);
844 crossingFrame = new GNECrossingFrame(viewParent, viewNet);
845 TAZFrame = new GNETAZFrame(viewParent, viewNet);
846 polygonFrame = new GNEShapeFrame(viewParent, viewNet);
847 createEdgeFrame = new GNECreateEdgeFrame(viewParent, viewNet);
848}
849
850
851void
853 connectorFrame->hide();
854 TLSEditorFrame->hide();
855 additionalFrame->hide();
856 crossingFrame->hide();
857 TAZFrame->hide();
858 polygonFrame->hide();
859 prohibitionFrame->hide();
860 wireFrame->hide();
861 createEdgeFrame->hide();
862}
863
864
865void
867 // set width in all frames
868 connectorFrame->setFrameWidth(frameWidth);
869 TLSEditorFrame->setFrameWidth(frameWidth);
870 additionalFrame->setFrameWidth(frameWidth);
871 crossingFrame->setFrameWidth(frameWidth);
872 TAZFrame->setFrameWidth(frameWidth);
873 polygonFrame->setFrameWidth(frameWidth);
874 prohibitionFrame->setFrameWidth(frameWidth);
875 wireFrame->setFrameWidth(frameWidth);
876 createEdgeFrame->setFrameWidth(frameWidth);
877}
878
879
880bool
882 // check all frames
883 if (connectorFrame->shown()) {
884 return true;
885 } else if (TLSEditorFrame->shown()) {
886 return true;
887 } else if (additionalFrame->shown()) {
888 return true;
889 } else if (crossingFrame->shown()) {
890 return true;
891 } else if (TAZFrame->shown()) {
892 return true;
893 } else if (polygonFrame->shown()) {
894 return true;
895 } else if (prohibitionFrame->shown()) {
896 return true;
897 } else if (wireFrame->shown()) {
898 return true;
899 } else if (createEdgeFrame->shown()) {
900 return true;
901 } else {
902 return false;
903 }
904}
905
906
909 // check all frames
910 if (connectorFrame->shown()) {
911 return connectorFrame;
912 } else if (TLSEditorFrame->shown()) {
913 return TLSEditorFrame;
914 } else if (additionalFrame->shown()) {
915 return additionalFrame;
916 } else if (crossingFrame->shown()) {
917 return crossingFrame;
918 } else if (TAZFrame->shown()) {
919 return TAZFrame;
920 } else if (polygonFrame->shown()) {
921 return polygonFrame;
922 } else if (prohibitionFrame->shown()) {
923 return prohibitionFrame;
924 } else if (wireFrame->shown()) {
925 return wireFrame;
926 } else if (createEdgeFrame->shown()) {
927 return createEdgeFrame;
928 } else {
929 return nullptr;
930 }
931}
932
933// ---------------------------------------------------------------------------
934// GNEViewParent::DemandFrames - methods
935// ---------------------------------------------------------------------------
936
939
940
941void
943 routeFrame = new GNERouteFrame(viewParent, viewNet);
944 vehicleFrame = new GNEVehicleFrame(viewParent, viewNet);
945 typeFrame = new GNETypeFrame(viewParent, viewNet);
946 typeDistributionFrame = new GNETypeDistributionFrame(viewParent, viewNet);
947 stopFrame = new GNEStopFrame(viewParent, viewNet);
948 personFrame = new GNEPersonFrame(viewParent, viewNet);
949 personPlanFrame = new GNEPersonPlanFrame(viewParent, viewNet);
950 containerFrame = new GNEContainerFrame(viewParent, viewNet);
951 containerPlanFrame = new GNEContainerPlanFrame(viewParent, viewNet);
952}
953
954
955void
957 routeFrame->hide();
958 vehicleFrame->hide();
959 typeFrame->hide();
960 typeDistributionFrame->hide();
961 stopFrame->hide();
962 personFrame->hide();
963 personPlanFrame->hide();
964 containerFrame->hide();
965 containerPlanFrame->hide();
966}
967
968
969void
971 // set width in all frames
972 routeFrame->setFrameWidth(frameWidth);
973 vehicleFrame->setFrameWidth(frameWidth);
974 typeFrame->setFrameWidth(frameWidth);
975 typeDistributionFrame->setFrameWidth(frameWidth);
976 stopFrame->setFrameWidth(frameWidth);
977 personFrame->setFrameWidth(frameWidth);
978 personPlanFrame->setFrameWidth(frameWidth);
979 containerFrame->setFrameWidth(frameWidth);
980 containerPlanFrame->setFrameWidth(frameWidth);
981}
982
983
984bool
986 // check all frames
987 if (routeFrame->shown()) {
988 return true;
989 } else if (vehicleFrame->shown()) {
990 return true;
991 } else if (typeFrame->shown()) {
992 return true;
993 } else if (typeDistributionFrame->shown()) {
994 return true;
995 } else if (stopFrame->shown()) {
996 return true;
997 } else if (personFrame->shown()) {
998 return true;
999 } else if (personPlanFrame->shown()) {
1000 return true;
1001 } else if (containerFrame->shown()) {
1002 return true;
1003 } else if (containerPlanFrame->shown()) {
1004 return true;
1005 } else {
1006 return false;
1007 }
1008}
1009
1010
1011GNEFrame*
1013 // check all frames
1014 if (routeFrame->shown()) {
1015 return routeFrame;
1016 } else if (vehicleFrame->shown()) {
1017 return vehicleFrame;
1018 } else if (typeFrame->shown()) {
1019 return typeFrame;
1020 } else if (typeDistributionFrame->shown()) {
1021 return typeDistributionFrame;
1022 } else if (stopFrame->shown()) {
1023 return stopFrame;
1024 } else if (personFrame->shown()) {
1025 return personFrame;
1026 } else if (personPlanFrame->shown()) {
1027 return personPlanFrame;
1028 } else if (containerFrame->shown()) {
1029 return containerFrame;
1030 } else if (containerPlanFrame->shown()) {
1031 return containerPlanFrame;
1032 } else {
1033 return nullptr;
1034 }
1035}
1036
1037// ---------------------------------------------------------------------------
1038// GNEViewParent::DataFrames - methods
1039// ---------------------------------------------------------------------------
1040
1043
1044
1045void
1047 edgeDataFrame = new GNEEdgeDataFrame(viewParent, viewNet);
1048 edgeRelDataFrame = new GNEEdgeRelDataFrame(viewParent, viewNet);
1049 TAZRelDataFrame = new GNETAZRelDataFrame(viewParent, viewNet);
1050 meanDataFrame = new GNEMeanDataFrame(viewParent, viewNet);
1051}
1052
1053
1054void
1056 edgeDataFrame->hide();
1057 edgeRelDataFrame->hide();
1058 TAZRelDataFrame->hide();
1059 meanDataFrame->hide();
1060}
1061
1062
1063void
1065 // set width in all frames
1066 edgeDataFrame->setFrameWidth(frameWidth);
1067 edgeRelDataFrame->setFrameWidth(frameWidth);
1068 TAZRelDataFrame->setFrameWidth(frameWidth);
1069 meanDataFrame->setFrameWidth(frameWidth);
1070}
1071
1072
1073bool
1075 // check all frames
1076 if (edgeDataFrame->shown()) {
1077 return true;
1078 } else if (edgeRelDataFrame->shown()) {
1079 return true;
1080 } else if (TAZRelDataFrame->shown()) {
1081 return true;
1082 } else if (meanDataFrame->shown()) {
1083 return true;
1084 } else {
1085 return false;
1086 }
1087}
1088
1089
1090GNEFrame*
1092 // check all frames
1093 if (edgeDataFrame->shown()) {
1094 return edgeDataFrame;
1095 } else if (edgeRelDataFrame->shown()) {
1096 return edgeRelDataFrame;
1097 } else if (TAZRelDataFrame->shown()) {
1098 return TAZRelDataFrame;
1099 } else if (meanDataFrame->shown()) {
1100 return meanDataFrame;
1101 } else {
1102 return nullptr;
1103 }
1104}
1105
1106// ---------------------------------------------------------------------------
1107// GNEViewParent::ACChoosers - methods
1108// ---------------------------------------------------------------------------
1109
1111 ACChooserJunction(nullptr),
1112 ACChooserEdges(nullptr),
1113 ACChooserWalkingAreas(nullptr),
1114 ACChooserVehicles(nullptr),
1115 ACChooserPersons(nullptr),
1116 ACChooserRoutes(nullptr),
1117 ACChooserStops(nullptr),
1118 ACChooserTLS(nullptr),
1119 ACChooserAdditional(nullptr),
1120 ACChooserPOI(nullptr),
1121 ACChooserPolygon(nullptr),
1122 ACChooserProhibition(nullptr),
1123 ACChooserWire(nullptr) {
1124}
1125
1126
1128 // remove all dialogs if are active
1129 if (ACChooserJunction) {
1130 delete ACChooserJunction;
1131 }
1132 if (ACChooserEdges) {
1133 delete ACChooserEdges;
1134 }
1135 if (ACChooserWalkingAreas) {
1136 delete ACChooserWalkingAreas;
1137 }
1138 if (ACChooserRoutes) {
1139 delete ACChooserRoutes;
1140 }
1141 if (ACChooserStops) {
1142 delete ACChooserStops;
1143 }
1144 if (ACChooserVehicles) {
1145 delete ACChooserVehicles;
1146 }
1147 if (ACChooserPersons) {
1148 delete ACChooserPersons;
1149 }
1150 if (ACChooserTLS) {
1151 delete ACChooserTLS;
1152 }
1153 if (ACChooserAdditional) {
1154 delete ACChooserAdditional;
1155 }
1156 if (ACChooserPOI) {
1157 delete ACChooserPOI;
1158 }
1159 if (ACChooserPolygon) {
1160 delete ACChooserPolygon;
1161 }
1162 if (ACChooserProhibition) {
1163 delete ACChooserProhibition;
1164 }
1165 if (ACChooserWire) {
1166 delete ACChooserWire;
1167 }
1168}
1169
1170
1171/****************************************************************************/
FXDEFMAP(GNEViewParent) GNEViewParentMap[]
@ MID_MAKESNAPSHOT
Make snapshot - button.
Definition GUIAppEnum.h:384
@ MID_HOTKEY_SHIFT_S_LOCATESTOP
Locate stop - button.
Definition GUIAppEnum.h:185
@ MID_HOTKEY_CTRL_Y_REDO
Undo.
Definition GUIAppEnum.h:131
@ MID_HOTKEY_CTRL_W_CLOSESIMULATION
Close simulation - ID.
Definition GUIAppEnum.h:127
@ MID_HOTKEY_SHIFT_O_LOCATEPOI
Locate poi - button.
Definition GUIAppEnum.h:179
@ MID_HOTKEY_SHIFT_A_LOCATEADDITIONAL
Locate additional structure - button.
Definition GUIAppEnum.h:169
@ MID_HOTKEY_SHIFT_R_LOCATEROUTE
Locate route - button.
Definition GUIAppEnum.h:183
@ MID_HOTKEY_SHIFT_W_LOCATEWALKINGAREA
Locate edge - button.
Definition GUIAppEnum.h:191
@ MID_HOTKEY_SHIFT_V_LOCATEVEHICLE
Locate vehicle - button.
Definition GUIAppEnum.h:189
@ MID_HOTKEY_SHIFT_L_LOCATEPOLY
Locate polygons - button.
Definition GUIAppEnum.h:177
@ MID_HOTKEY_SHIFT_E_LOCATEEDGE
Locate edge - button.
Definition GUIAppEnum.h:173
@ MID_GNE_VIEWPARENT_FRAMEAREAWIDTH
Size of frame area updated.
Definition GUIAppEnum.h:777
@ MID_HOTKEY_SHIFT_P_LOCATEPERSON
Locate person - button.
Definition GUIAppEnum.h:181
@ MID_HOTKEY_SHIFT_J_LOCATEJUNCTION
Locate junction - button.
Definition GUIAppEnum.h:175
@ MID_HOTKEY_CTRL_Z_UNDO
Redo.
Definition GUIAppEnum.h:133
@ MID_HOTKEY_SHIFT_T_LOCATETLS
Locate TLS - button.
Definition GUIAppEnum.h:187
@ MID_GNE_TOOLBAREDIT_COMPUTEPATHMANAGER
compute path manager
Definition GUIAppEnum.h:767
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
Definition GUIDesigns.h:118
#define GUIDesignFrameArea
Definition GUIDesigns.h:364
#define GUIDesignVerticalSeparator
vertical separator
Definition GUIDesigns.h:455
#define GUIDesignSplitter
Definition GUIDesigns.h:463
#define GUIDesignViewnArea
design for view area
Definition GUIDesigns.h:367
#define GUIDesignFramesAreaDefaultWidth
define the default frames area width
Definition GUIDesigns.h:40
FXString gCurrentFolder
The folder used as last.
@ COMPUTEPATHMANAGER
@ LOCATEJUNCTION
#define WRITE_DEBUG(msg)
Definition MsgHandler.h:281
#define WRITE_MESSAGE(msg)
Definition MsgHandler.h:272
#define TL(string)
Definition MsgHandler.h:287
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions
@ GNE_TAG_TRIP_TAZS
a single trip definition that uses TAZs
@ GNE_TAG_STOP_PARKINGAREA
stop placed over a parking area
@ SUMO_TAG_TAZ
a traffic assignment zone
@ GNE_TAG_STOP_BUSSTOP
stop placed over a busStop
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route
@ GNE_TAG_FLOW_JUNCTIONS
a flow between junctions
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ GNE_TAG_FLOW_TAZS
a flow between TAZs
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route
@ GNE_TAG_POILANE
Point of interest over Lane.
@ SUMO_TAG_PERSON
@ GNE_TAG_STOP_LANE
stop placed over a lane
@ GNE_TAG_STOP_TRAINSTOP
stop placed over a trainStop
@ GNE_TAG_STOP_CHARGINGSTATION
stop placed over a charging station
@ SUMO_TAG_PERSONFLOW
@ SUMO_TAG_TRIP
a single trip definition (used by router)
The main window of Netedit.
GNEUndoList * getUndoList()
get pointer to undoList
GNEApplicationWindowHelper::ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::map< SumoXMLTag, std::set< GNEAdditional * > > & getAdditionals() const
get additionals
const std::map< std::string, GNEJunction * > & getJunctions() const
get junctions
const std::set< GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:120
long onUpdUndo(FXObject *, FXSelector, void *)
event after Undo
long onUpdRedo(FXObject *, FXSelector, void *)
event after Redo
GNENet * getNet() const
get the net object
GNEDialogACChooser * ACChooserWalkingAreas
pointer to ACChooser dialog used for locate walkingareas
GNEDialogACChooser * ACChooserStops
pointer to ACChooser dialog used for locate stops
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog used for locate edges
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
GNEDialogACChooser * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
GNEDialogACChooser * ACChooserWire
pointer to ACChooser dialog used for locate Wires
GNEDialogACChooser * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
GNEDialogACChooser * ACChooserPersons
pointer to ACChooser dialog used for locate persons
GNEDialogACChooser * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
GNEMoveFrame * moveFrame
frame for move elements
GNEFrame * getCurrentShownFrame() const
get current common frame show
bool isCommonFrameShown() const
return true if at least there is a common frame shown
GNEDeleteFrame * deleteFrame
frame for delete elements
void buildCommonFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build common frames
GNESelectorFrame * selectorFrame
frame for select elements
void hideCommonFrames()
hide common frames
GNEInspectorFrame * inspectorFrame
frame for inspect elements
void setCommonFramesWidth(int frameWidth)
set new width in all common frames
GNEEdgeDataFrame * edgeDataFrame
frame for DATA_EDGEDATA
void setDataFramesWidth(int frameWidth)
set new width in all data frames
GNEFrame * getCurrentShownFrame() const
get current data frame show
GNETAZRelDataFrame * TAZRelDataFrame
frame for DATA_TAZRELDATA
GNEEdgeRelDataFrame * edgeRelDataFrame
frame for DATA_EDGERELDATA
bool isDataFrameShown() const
return true if at least there is a data frame shown
void hideDataFrames()
hide data frames
void buildDataFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build data frames
GNEMeanDataFrame * meanDataFrame
frame for DATA_MEANDATA
GNEPersonFrame * personFrame
frame for DEMAND_PERSON
GNEStopFrame * stopFrame
frame for DEMAND_STOP
GNERouteFrame * routeFrame
frame for DEMAND_ROUTE
GNEContainerFrame * containerFrame
frame for DEMAND_CONTAINER
GNETypeDistributionFrame * typeDistributionFrame
frame for DEMAND_TYPEDISTRIBUTION
GNEContainerPlanFrame * containerPlanFrame
frame for DEMAND_CONTAINERPLAN
GNEVehicleFrame * vehicleFrame
frame for DEMAND_VEHICLE
GNEFrame * getCurrentShownFrame() const
get current demand frame show
void setDemandFramesWidth(int frameWidth)
set new width in all demand frames
void buildDemandFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build demand frames
GNEPersonPlanFrame * personPlanFrame
frame for DEMAND_PERSONPLAN
GNETypeFrame * typeFrame
frame for DEMAND_TYPE
bool isDemandFrameShown() const
return true if at least there is a demand frame shown
void hideDemandFrames()
hide demand frames
GNEAdditionalFrame * additionalFrame
frame for NETWORK_ADDITIONAL
bool isNetworkFrameShown() const
return true if at least there is a network frame shown
GNECrossingFrame * crossingFrame
frame for NETWORK_CROSSING
GNEConnectorFrame * connectorFrame
frame for NETWORK_CONNECT
GNECreateEdgeFrame * createEdgeFrame
frame for NETWORK_CREATEDGE
GNEProhibitionFrame * prohibitionFrame
frame for NETWORK_PROHIBITION
GNEShapeFrame * polygonFrame
frame for NETWORK_SHAPE
GNETAZFrame * TAZFrame
frame for NETWORK_TAZ
GNETLSEditorFrame * TLSEditorFrame
frame for NETWORK_TLS
GNEFrame * getCurrentShownFrame() const
get current network frame show
GNEWireFrame * wireFrame
frame for NETWORK_WIRE
void hideNetworkFrames()
hide network frames
void setNetworkFramesWidth(int frameWidth)
set new width in all network frames
void buildNetworkFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build network frames
A single child window which contains a view of the simulation area.
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
GNECrossingFrame * getCrossingFrame() const
get frame for NETWORK_CROSSING
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNEConnectorFrame * getConnectorFrame() const
get frame for NETWORK_CONNECT
GNEStopFrame * getStopFrame() const
get frame for DEMAND_STOP
void updateUndoRedoButtons()
update toolbar undo/redo buttons (called when user press Ctrl+Z/Y)
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
GNEProhibitionFrame * getProhibitionFrame() const
get frame for NETWORK_PROHIBITION
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for DEMAND_PERSONFRAME
DemandFrames myDemandFrames
struct for demand frames
MFXButtonTooltip * myUndoButton
toolbar undo button
GNEMeanDataFrame * getMeanDataFrame() const
get frame for DATA_TAZRELDATA
GNEShapeFrame * getShapeFrame() const
get frame for NETWORK_SHAPE
void setFrameAreaWidth(const int frameAreaWith)
set frame area width
GNETAZRelDataFrame * getTAZRelDataFrame() const
get frame for DATA_TAZRELDATA
GNEMoveFrame * getMoveFrame() const
get frame for move elements
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GNESelectorFrame * getSelectorFrame() const
get frame for select elements
GNEContainerPlanFrame * getContainerPlanFrame() const
get frame for DEMAND_CONTAINERFRAME
void hideFramesArea()
hide frames area if all GNEFrames are hidden
GNEEdgeDataFrame * getEdgeDataFrame() const
get frame for DATA_EDGEDATA
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
NetworkFrames myNetworkFrames
struct for network frames
GNETypeDistributionFrame * getTypeDistributionFrame() const
get frame for DEMAND_TYPEDISTRIBUTION
ACChoosers myACChoosers
struct for ACChoosers
GNEVehicleFrame * getVehicleFrame() const
get frame for DEMAND_VEHICLE
void showFramesArea()
show frames area if at least a GNEFrame is showed
void hideAllFrames()
hide all frames
GNETypeFrame * getTypeFrame() const
get frame for DEMAND_TYPE
FXVerticalFrame * myFramesArea
frame to hold GNEFrames
GNETAZFrame * getTAZFrame() const
get frame for NETWORK_TAZ
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for NETWORK_TLS
CommonFrames myCommonFrames
struct for common frames
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
DataFrames myDataFrames
struct for data frames
GNEContainerFrame * getContainerFrame() const
get frame for DEMAND_CONTAINER
GNEAdditionalFrame * getAdditionalFrame() const
get frame for NETWORK_ADDITIONAL
GNEWireFrame * getWireFrame() const
get frame for NETWORK_WIRE
FXVerticalFrame * getFramesArea() const
get frame area
GNEPersonFrame * getPersonFrame() const
get frame for DEMAND_PERSON
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
GNEApplicationWindow * myGNEAppWindows
pointer to GNEApplicationWindow
GNEEdgeRelDataFrame * getEdgeRelDataFrame() const
get frame for DATA_EDGERELDATA
MFXButtonTooltip * myRedoButton
toolbar redo button
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for NETWORK_CREATEEDGE
int getFrameAreaWidth() const
get frame area width
GNERouteFrame * getRouteFrame() const
get frame for DEMAND_ROUTE
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
~GNEViewParent()
Destructor.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
GUIMainWindow * myGUIMainWindowParent
FOX needs this.
virtual void create()
create GUIGlChildWindow
GUISUMOAbstractView * myView
The view.
FXPopup * myLocatorPopup
The locator menu.
MFXMenuButtonTooltip * myLocatorButton
The locator button.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void removeGLChild(GUIGlChildWindow *child)
removes the given child window from the list (GUIGlChildWindow)
std::string makeSnapshot(const std::string &destFile, const int w=-1, const int h=-1)
Takes a snapshots and writes it into the given file.
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
static FXbool userPermitsOverwritingWhenFileExists(FXWindow *const parent, const FXString &file)
Returns true if either the file given by its name does not exist or the user allows overwriting it.
Definition MFXUtils.cpp:39
C++ TraCI client API implementation.