Eclipse SUMO - Simulation of Urban MObility
GNEViewParent.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-2022 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
52
54#include "GNEViewNet.h"
55#include "GNENet.h"
56#include "GNEViewParent.h"
57#include "GNEUndoList.h"
58
59
60// ===========================================================================
61// FOX callback mapping
62// ===========================================================================
63
64FXDEFMAP(GNEViewParent) GNEViewParentMap[] = {
66 FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GNEViewParent::onCmdLocate),
67 FXMAPFUNC(SEL_COMMAND, MID_LOCATEEDGE, GNEViewParent::onCmdLocate),
69 FXMAPFUNC(SEL_COMMAND, MID_LOCATEVEHICLE, GNEViewParent::onCmdLocate),
70 FXMAPFUNC(SEL_COMMAND, MID_LOCATEPERSON, GNEViewParent::onCmdLocate),
71 FXMAPFUNC(SEL_COMMAND, MID_LOCATEROUTE, GNEViewParent::onCmdLocate),
72 FXMAPFUNC(SEL_COMMAND, MID_LOCATESTOP, GNEViewParent::onCmdLocate),
73 FXMAPFUNC(SEL_COMMAND, MID_LOCATETLS, GNEViewParent::onCmdLocate),
74 FXMAPFUNC(SEL_COMMAND, MID_LOCATEADD, GNEViewParent::onCmdLocate),
75 FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOI, GNEViewParent::onCmdLocate),
76 FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOLY, GNEViewParent::onCmdLocate),
77 FXMAPFUNC(SEL_COMMAND, FXMDIChild::ID_MDI_MENUCLOSE, GNEViewParent::onCmdClose),
79};
80
81// Object implementation
82FXIMPLEMENT(GNEViewParent, GUIGlChildWindow, GNEViewParentMap, ARRAYNUMBER(GNEViewParentMap))
83
84
85// ===========================================================================
86// member method definitions
87// ===========================================================================
88
89GNEViewParent::GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu, const FXString& name, GNEApplicationWindow* parentWindow,
90 FXGLCanvas* share, GNENet* net, const bool newNet, GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) :
91 GUIGlChildWindow(p, parentWindow, mdimenu, name, parentWindow->getToolbarsGrip().navigation, ic, opts, x, y, w, h),
92 myGNEAppWindows(parentWindow) {
93 // Add child to parent
94 myParent->addGLChild(this);
95
96 // Create Vertical separator
97 new FXVerticalSeparator(myGripNavigationToolbar, GUIDesignVerticalSeparator);
98
99 // Create undo/redo buttons
100 myUndoButton = new MFXButtonTooltip(myGripNavigationToolbar, myGNEAppWindows->getStaticTooltipMenu(),
101 "\tUndo\tUndo the last change. (Ctrl+Z)", GUIIconSubSys::getIcon(GUIIcon::UNDO), parentWindow, MID_HOTKEY_CTRL_Z_UNDO, GUIDesignButtonToolbar);
102 myRedoButton = new MFXButtonTooltip(myGripNavigationToolbar, myGNEAppWindows->getStaticTooltipMenu(),
103 "\tRedo\tRedo the last change. (Ctrl+Y)", GUIIconSubSys::getIcon(GUIIcon::REDO), parentWindow, MID_HOTKEY_CTRL_Y_REDO, GUIDesignButtonToolbar);
104
105 // Create Vertical separator
106 new FXVerticalSeparator(myGripNavigationToolbar, GUIDesignVerticalSeparator);
107
108 // create compute path manager button
109 myComputePathManagerButton = new MFXButtonTooltip(myGripNavigationToolbar, myGNEAppWindows->getStaticTooltipMenu(),
110 "\tCompute path manager\tCompute path manager", GUIIconSubSys::getIcon(GUIIcon::COMPUTEPATHMANAGER), parentWindow, MID_GNE_TOOLBAREDIT_COMPUTEPATHMANAGER, GUIDesignButtonToolbar);
111
112 // Create Frame Splitter
113 myFramesSplitter = new FXSplitter(myChildWindowContentFrame, this, MID_GNE_VIEWPARENT_FRAMEAREAWIDTH, GUIDesignSplitter | SPLITTER_HORIZONTAL);
114
115 // Create frames Area (vertical frame)
116 myFramesArea = new FXVerticalFrame(myFramesSplitter, GUIDesignFrameArea);
117
118 // Create view area
119 myViewArea = new FXHorizontalFrame(myFramesSplitter, GUIDesignViewnArea);
120
121 // Add the view to a temporary parent so that we can add items to myViewArea in the desired order
122 FXComposite* tmp = new FXComposite(this);
123
124 // Create view net
125 GNEViewNet* viewNet = new GNEViewNet(tmp, myViewArea, *myParent, this, net, newNet, undoList, myParent->getGLVisual(), share);
126
127 // show toolbar grips
128 myGNEAppWindows->getToolbarsGrip().buildMenuToolbarsGrip();
129
130 // Set pointer myView with the created view net
131 myView = viewNet;
132
133 // build frames
134 myCommonFrames.buildCommonFrames(this, viewNet);
135 myNetworkFrames.buildNetworkFrames(this, viewNet);
136 myDemandFrames.buildDemandFrames(this, viewNet);
137 myDataFrames.buildDataFrames(this, viewNet);
138
139 // set default frames area width
140 myFramesArea->setWidth(GUIDesignFramesAreaDefaultWidth);
141
142 // Update frame areas after creation
143 onCmdUpdateFrameAreaWidth(nullptr, 0, nullptr);
144
145 // Hide all Frames Area
146 hideFramesArea();
147
148 // Build view toolBars
149 myView->buildViewToolBars(this);
150
151 // create windows
153}
154
155
157 // delete toolbar grips
159 // Remove child before remove
160 myParent->removeGLChild(this);
161}
162
163
164void
170}
171
172
179 } else if (myDemandFrames.isDemandFrameShown()) {
181 } else if (myDataFrames.isDataFrameShown()) {
183 } else {
184 return nullptr;
185 }
186}
187
188
192}
193
194
198}
199
200
204}
205
206
210}
211
212
216}
217
218
222}
223
224
228}
229
230
234}
235
236
240}
241
242
246}
247
248
252}
253
254
258}
259
260
264}
265
266
270}
271
272
276}
277
278
282}
283
284
288}
289
290
294}
295
296
300}
301
302
306}
307
308
312}
313
314
318}
319
320
324}
325
326
330}
331
332
333void
335 const bool frameShown = myCommonFrames.isCommonFrameShown() ||
339 // show and recalc framesArea if at least there is a frame shown
340 if (frameShown) {
341 myFramesArea->recalc();
342 myFramesArea->show();
343 }
344}
345
346
347void
349 const bool frameShown = myCommonFrames.isCommonFrameShown() ||
353 // hide and recalc frames Area if all frames are hidden is enabled
354 if (!frameShown) {
355 myFramesArea->hide();
356 myFramesArea->recalc();
357 }
358}
359
360
363 return myParent;
364}
365
366
369 return myGNEAppWindows;
370}
371
372
373void
375 if (chooserDialog == nullptr) {
376 throw ProcessError("ChooserDialog already deleted");
377 } else if (chooserDialog == myACChoosers.ACChooserJunction) {
379 } else if (chooserDialog == myACChoosers.ACChooserEdges) {
381 } else if (chooserDialog == myACChoosers.ACChooserWalkingAreas) {
383 } else if (chooserDialog == myACChoosers.ACChooserVehicles) {
385 } else if (chooserDialog == myACChoosers.ACChooserPersons) {
387 } else if (chooserDialog == myACChoosers.ACChooserRoutes) {
389 } else if (chooserDialog == myACChoosers.ACChooserStops) {
391 } else if (chooserDialog == myACChoosers.ACChooserTLS) {
392 myACChoosers.ACChooserTLS = nullptr;
393 } else if (chooserDialog == myACChoosers.ACChooserAdditional) {
395 } else if (chooserDialog == myACChoosers.ACChooserPOI) {
396 myACChoosers.ACChooserPOI = nullptr;
397 } else if (chooserDialog == myACChoosers.ACChooserPolygon) {
399 } else if (chooserDialog == myACChoosers.ACChooserProhibition) {
401 } else if (chooserDialog == myACChoosers.ACChooserWire) {
402 myACChoosers.ACChooserWire = nullptr;
403 } else {
404 throw ProcessError("Unregistered chooserDialog");
405 }
406}
407
408
409void
413}
414
415
416FXVerticalFrame*
418 return myFramesArea;
419}
420
421
422int
424 return myFramesArea->getWidth();
425}
426
427
428void
429GNEViewParent::setFrameAreaWidth(const int frameAreaWith) {
430 myFramesArea->setWidth(frameAreaWith);
432}
433
434
435long
436GNEViewParent::onCmdMakeSnapshot(FXObject*, FXSelector, void*) {
437 // get the new file name
438 FXFileDialog opendialog(this, TL("Save Snapshot"));
439 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::CAMERA));
440 opendialog.setSelectMode(SELECTFILE_ANY);
441 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"
442 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n"
443 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n"
444 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n"
445 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n"
446 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n"
447 "All Files (*)");
448 if (gCurrentFolder.length() != 0) {
449 opendialog.setDirectory(gCurrentFolder);
450 }
451 if (!opendialog.execute() || !MFXUtils::userPermitsOverwritingWhenFileExists(this, opendialog.getFilename())) {
452 return 1;
453 }
454 gCurrentFolder = opendialog.getDirectory();
455 std::string file = opendialog.getFilename().text();
456 if (file.find(".") == std::string::npos) {
457 file.append(".png");
458 WRITE_MESSAGE(TL("No file extension was specified - saving Snapshot as PNG."));
459 }
460 std::string error = myView->makeSnapshot(file);
461 if (error != "") {
462 // write warning if netedit is running in testing mode
463 WRITE_DEBUG("Opening FXMessageBox 'error saving snapshot'");
464 // open message box
465 FXMessageBox::error(this, MBOX_OK, TL("Saving failed."), "%s", error.c_str());
466 // write warning if netedit is running in testing mode
467 WRITE_DEBUG("Closed FXMessageBox 'error saving snapshot' with 'OK'");
468 } else {
469 WRITE_MESSAGE(TL("Snapshot successfully saved!"));
470 }
471 return 1;
472}
473
474
475long
476GNEViewParent::onCmdClose(FXObject*, FXSelector /* sel */, void*) {
477 myParent->handle(this, FXSEL(SEL_COMMAND, MID_HOTKEY_CTRL_W_CLOSESIMULATION), nullptr);
478 return 1;
479}
480
481
482long
483GNEViewParent::onCmdLocate(FXObject*, FXSelector sel, void*) {
484 GNEViewNet* viewNet = dynamic_cast<GNEViewNet*>(myView);
485 // check that viewNet exist
486 if (viewNet) {
487 // declare a vector in which save attribute carriers to locate
488 std::vector<GNEAttributeCarrier*> ACsToLocate;
489 int messageId = FXSELID(sel);
490 GNEDialogACChooser** chooserLoc = nullptr;
491 std::string locateTitle;
492 switch (messageId) {
494 chooserLoc = &myACChoosers.ACChooserJunction;
495 locateTitle = "Junction";
496 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getJunctions().size());
497 for (const auto& junction : viewNet->getNet()->getAttributeCarriers()->getJunctions()) {
498 ACsToLocate.push_back(junction.second);
499 }
500 break;
501 case MID_LOCATEEDGE:
502 chooserLoc = &myACChoosers.ACChooserEdges;
503 locateTitle = "Edge";
504 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getEdges().size());
505 for (const auto& edge : viewNet->getNet()->getAttributeCarriers()->getEdges()) {
506 ACsToLocate.push_back(edge.second);
507 }
508 break;
511 locateTitle = "WalkingArea";
512 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getWalkingAreas().size());
513 for (const auto& walkingArea : viewNet->getNet()->getAttributeCarriers()->getWalkingAreas()) {
514 ACsToLocate.push_back(walkingArea);
515 }
516 break;
517 case MID_LOCATEVEHICLE: {
518 chooserLoc = &myACChoosers.ACChooserVehicles;
519 locateTitle = "Vehicle";
520 const auto demandElements = viewNet->getNet()->getAttributeCarriers()->getDemandElements();
521 // reserve memory
522 ACsToLocate.reserve(demandElements.at(SUMO_TAG_VEHICLE).size() +
523 demandElements.at(SUMO_TAG_TRIP).size() +
524 demandElements.at(GNE_TAG_VEHICLE_WITHROUTE).size() +
525 demandElements.at(GNE_TAG_TRIP_JUNCTIONS).size() +
526 demandElements.at(SUMO_TAG_FLOW).size() +
527 demandElements.at(GNE_TAG_FLOW_ROUTE).size() +
528 demandElements.at(GNE_TAG_FLOW_WITHROUTE).size() +
529 demandElements.at(GNE_TAG_FLOW_JUNCTIONS).size());
530 // fill ACsToLocate with vehicles,...
531 for (const auto& vehicle : demandElements.at(SUMO_TAG_VEHICLE)) {
532 ACsToLocate.push_back(vehicle);
533 }
534 // ...trips,...
535 for (const auto& trip : demandElements.at(SUMO_TAG_TRIP)) {
536 ACsToLocate.push_back(trip);
537 }
538 // ...vehicles with embedded routes,...
539 for (const auto& trip : demandElements.at(GNE_TAG_VEHICLE_WITHROUTE)) {
540 ACsToLocate.push_back(trip);
541 }
542 // ...trips over junctions,...
543 for (const auto& trip : demandElements.at(GNE_TAG_TRIP_JUNCTIONS)) {
544 ACsToLocate.push_back(trip);
545 }
546 // ...flows,...
547 for (const auto& flow : demandElements.at(SUMO_TAG_FLOW)) {
548 ACsToLocate.push_back(flow);
549 }
550 // ...flows over routes,...
551 for (const auto& flowRoute : demandElements.at(GNE_TAG_FLOW_ROUTE)) {
552 ACsToLocate.push_back(flowRoute);
553 }
554 // ...flows with embedded routes...
555 for (const auto& flowRoute : demandElements.at(GNE_TAG_FLOW_WITHROUTE)) {
556 ACsToLocate.push_back(flowRoute);
557 }
558 // ... and flows over junctions.
559 for (const auto& flowRoute : demandElements.at(GNE_TAG_FLOW_JUNCTIONS)) {
560 ACsToLocate.push_back(flowRoute);
561 }
562 break;
563 }
564 case MID_LOCATEPERSON:
565 chooserLoc = &myACChoosers.ACChooserPersons;
566 locateTitle = "Person";
567 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_PERSON).size() +
569 // fill ACsToLocate with persons
570 for (const auto& person : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_PERSON)) {
571 ACsToLocate.push_back(person);
572 }
573 // fill ACsToLocate with personFlows
574 for (const auto& personFlow : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_PERSONFLOW)) {
575 ACsToLocate.push_back(personFlow);
576 }
577 break;
578 case MID_LOCATEROUTE:
579 chooserLoc = &myACChoosers.ACChooserRoutes;
580 locateTitle = "Route";
581 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE).size());
582 for (const auto& route : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE)) {
583 ACsToLocate.push_back(route);
584 }
585 break;
586 case MID_LOCATESTOP: {
587 chooserLoc = &myACChoosers.ACChooserStops;
588 locateTitle = "Stop";
589 // reserve memory
590 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_STOP_LANE).size() +
595 // fill ACsToLocate with stop over lanes
596 for (const auto& stopLane : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_STOP_LANE)) {
597 ACsToLocate.push_back(stopLane);
598 }
599 // fill ACsToLocate with stop over busstops
600 for (const auto& stopBusStop : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_STOP_BUSSTOP)) {
601 ACsToLocate.push_back(stopBusStop);
602 }
603 // fill ACsToLocate with stop over container stops
604 for (const auto& stopContainerStop : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_STOP_CONTAINERSTOP)) {
605 ACsToLocate.push_back(stopContainerStop);
606 }
607 // fill ACsToLocate with stop over charging stations
608 for (const auto& stopChargingStation : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_STOP_CHARGINGSTATION)) {
609 ACsToLocate.push_back(stopChargingStation);
610 }
611 // fill ACsToLocate with stop over parking areas
612 for (const auto& stopParkingArea : viewNet->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_STOP_PARKINGAREA)) {
613 ACsToLocate.push_back(stopParkingArea);
614 }
615 break;
616 }
617 case MID_LOCATETLS:
618 chooserLoc = &myACChoosers.ACChooserTLS;
619 locateTitle = "TLS";
620 // fill ACsToLocate with junctions that haven TLS
621 ACsToLocate.reserve(viewNet->getNet()->getAttributeCarriers()->getJunctions().size());
622 for (const auto& junction : viewNet->getNet()->getAttributeCarriers()->getJunctions()) {
623 if (junction.second->getNBNode()->getControllingTLS().size() > 0) {
624 ACsToLocate.push_back(junction.second);
625 }
626 }
627 break;
628 case MID_LOCATEADD:
629 chooserLoc = &myACChoosers.ACChooserAdditional;
630 locateTitle = "Additional";
631 for (const auto& additionalTag : viewNet->getNet()->getAttributeCarriers()->getAdditionals()) {
632 if (additionalTag.first == SUMO_TAG_POI
633 || additionalTag.first == GNE_TAG_POILANE
634 || additionalTag.first == GNE_TAG_POIGEO
635 || additionalTag.first == SUMO_TAG_POLY) {
636 continue;
637 }
638 for (const auto& additional : additionalTag.second) {
639 ACsToLocate.push_back(additional);
640 }
641 }
642 break;
643 case MID_LOCATEPOI:
644 chooserLoc = &myACChoosers.ACChooserPOI;
645 locateTitle = "POI";
646 // fill ACsToLocate with POIs
647 for (const auto& POI : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_POI)) {
648 ACsToLocate.push_back(POI);
649 }
650 for (const auto& POI : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(GNE_TAG_POILANE)) {
651 ACsToLocate.push_back(POI);
652 }
653 for (const auto& POI : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(GNE_TAG_POIGEO)) {
654 ACsToLocate.push_back(POI);
655 }
656 break;
657 case MID_LOCATEPOLY:
658 chooserLoc = &myACChoosers.ACChooserPolygon;
659 locateTitle = "Poly";
660 // fill ACsToLocate with polys and TAZs (because share namespae)
661 for (const auto& polygon : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_POLY)) {
662 ACsToLocate.push_back(polygon);
663 }
664 for (const auto& taz : viewNet->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_TAZ)) {
665 ACsToLocate.push_back(taz);
666 }
667 break;
668 default:
669 throw ProcessError("Unknown Message ID in onCmdLocate");
670 }
671 if (*chooserLoc) {
672 // restore focus in the existent chooser dialog
673 GNEDialogACChooser* chooser = *chooserLoc;
674 chooser->restore();
675 chooser->setFocus();
676 chooser->raise();
677 } else {
678 GNEDialogACChooser* chooser = new GNEDialogACChooser(this, messageId, GUIIconSubSys::getIcon(GUIIcon::LOCATEJUNCTION), locateTitle + " Chooser", ACsToLocate);
679 *chooserLoc = chooser;
680 }
681 // update locator popup
682 myLocatorPopup->popdown();
683 myLocatorButton->killFocus();
684 myLocatorPopup->update();
685 }
686 return 1;
687}
688
689
690long
691GNEViewParent::onKeyPress(FXObject* o, FXSelector sel, void* eventData) {
692 myView->onKeyPress(o, sel, eventData);
693 return 0;
694}
695
696
697long
698GNEViewParent::onKeyRelease(FXObject* o, FXSelector sel, void* eventData) {
699 myView->onKeyRelease(o, sel, eventData);
700 return 0;
701}
702
703
704long
705GNEViewParent::onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*) {
706 const int framesAreaWidth = myFramesArea->getWidth();
707 // set width of FramesArea in all frames
708 myCommonFrames.setCommonFramesWidth(framesAreaWidth);
709 myNetworkFrames.setNetworkFramesWidth(framesAreaWidth);
710 myDemandFrames.setDemandFramesWidth(framesAreaWidth);
711 myDataFrames.setDataFramesWidth(framesAreaWidth);
712 return 0;
713}
714
715// ---------------------------------------------------------------------------
716// GNEViewParent::CommonFrames - methods
717// ---------------------------------------------------------------------------
718
720 inspectorFrame(nullptr),
721 deleteFrame(nullptr),
722 selectorFrame(nullptr),
723 moveFrame(nullptr) {
724}
725
726
727void
729 inspectorFrame = new GNEInspectorFrame(viewParent, viewNet);
730 selectorFrame = new GNESelectorFrame(viewParent, viewNet);
731 moveFrame = new GNEMoveFrame(viewParent, viewNet);
732 deleteFrame = new GNEDeleteFrame(viewParent, viewNet);
733}
734
735
736void
738 inspectorFrame->hide();
739 deleteFrame->hide();
740 selectorFrame->hide();
741 moveFrame->hide();
742}
743
744
745void
747 // set width in all frames
748 inspectorFrame->setFrameWidth(frameWidth);
749 deleteFrame->setFrameWidth(frameWidth);
750 selectorFrame->setFrameWidth(frameWidth);
751 moveFrame->setFrameWidth(frameWidth);
752}
753
754
755bool
757 // check all frames
758 if (inspectorFrame->shown()) {
759 return true;
760 } else if (deleteFrame->shown()) {
761 return true;
762 } else if (selectorFrame->shown()) {
763 return true;
764 } else if (moveFrame->shown()) {
765 return true;
766 } else {
767 return false;
768 }
769}
770
771
774 // check all frames
775 if (inspectorFrame->shown()) {
776 return inspectorFrame;
777 } else if (deleteFrame->shown()) {
778 return deleteFrame;
779 } else if (selectorFrame->shown()) {
780 return selectorFrame;
781 } else if (moveFrame->shown()) {
782 return moveFrame;
783 } else {
784 return nullptr;
785 }
786}
787
788// ---------------------------------------------------------------------------
789// GNEViewParent::NetworkFrames - methods
790// ---------------------------------------------------------------------------
791
793 connectorFrame(nullptr),
794 TLSEditorFrame(nullptr),
795 additionalFrame(nullptr),
796 crossingFrame(nullptr),
797 TAZFrame(nullptr),
798 polygonFrame(nullptr),
799 prohibitionFrame(nullptr),
800 wireFrame(nullptr),
801 createEdgeFrame(nullptr) {
802}
803
804
805void
807 connectorFrame = new GNEConnectorFrame(viewParent, viewNet);
808 prohibitionFrame = new GNEProhibitionFrame(viewParent, viewNet);
809 wireFrame = new GNEWireFrame(viewParent, viewNet);
810 TLSEditorFrame = new GNETLSEditorFrame(viewParent, viewNet);
811 additionalFrame = new GNEAdditionalFrame(viewParent, viewNet);
812 crossingFrame = new GNECrossingFrame(viewParent, viewNet);
813 TAZFrame = new GNETAZFrame(viewParent, viewNet);
814 polygonFrame = new GNEShapeFrame(viewParent, viewNet);
815 createEdgeFrame = new GNECreateEdgeFrame(viewParent, viewNet);
816}
817
818
819void
821 connectorFrame->hide();
822 TLSEditorFrame->hide();
823 additionalFrame->hide();
824 crossingFrame->hide();
825 TAZFrame->hide();
826 polygonFrame->hide();
827 prohibitionFrame->hide();
828 wireFrame->hide();
829 createEdgeFrame->hide();
830}
831
832
833void
835 // set width in all frames
836 connectorFrame->setFrameWidth(frameWidth);
837 TLSEditorFrame->setFrameWidth(frameWidth);
838 additionalFrame->setFrameWidth(frameWidth);
839 crossingFrame->setFrameWidth(frameWidth);
840 TAZFrame->setFrameWidth(frameWidth);
841 polygonFrame->setFrameWidth(frameWidth);
842 prohibitionFrame->setFrameWidth(frameWidth);
843 wireFrame->setFrameWidth(frameWidth);
844 createEdgeFrame->setFrameWidth(frameWidth);
845}
846
847
848bool
850 // check all frames
851 if (connectorFrame->shown()) {
852 return true;
853 } else if (TLSEditorFrame->shown()) {
854 return true;
855 } else if (additionalFrame->shown()) {
856 return true;
857 } else if (crossingFrame->shown()) {
858 return true;
859 } else if (TAZFrame->shown()) {
860 return true;
861 } else if (polygonFrame->shown()) {
862 return true;
863 } else if (prohibitionFrame->shown()) {
864 return true;
865 } else if (wireFrame->shown()) {
866 return true;
867 } else if (createEdgeFrame->shown()) {
868 return true;
869 } else {
870 return false;
871 }
872}
873
874
877 // check all frames
878 if (connectorFrame->shown()) {
879 return connectorFrame;
880 } else if (TLSEditorFrame->shown()) {
881 return TLSEditorFrame;
882 } else if (additionalFrame->shown()) {
883 return additionalFrame;
884 } else if (crossingFrame->shown()) {
885 return crossingFrame;
886 } else if (TAZFrame->shown()) {
887 return TAZFrame;
888 } else if (polygonFrame->shown()) {
889 return polygonFrame;
890 } else if (prohibitionFrame->shown()) {
891 return prohibitionFrame;
892 } else if (wireFrame->shown()) {
893 return wireFrame;
894 } else if (createEdgeFrame->shown()) {
895 return createEdgeFrame;
896 } else {
897 return nullptr;
898 }
899}
900
901// ---------------------------------------------------------------------------
902// GNEViewParent::DemandFrames - methods
903// ---------------------------------------------------------------------------
904
906 routeFrame(nullptr),
907 vehicleFrame(nullptr),
908 vehicleTypeFrame(nullptr),
909 stopFrame(nullptr),
910 personFrame(nullptr),
911 personPlanFrame(nullptr),
912 containerFrame(nullptr),
913 containerPlanFrame(nullptr) {
914}
915
916
917void
919 routeFrame = new GNERouteFrame(viewParent, viewNet);
920 vehicleFrame = new GNEVehicleFrame(viewParent, viewNet);
921 vehicleTypeFrame = new GNETypeFrame(viewParent, viewNet);
922 stopFrame = new GNEStopFrame(viewParent, viewNet);
923 personFrame = new GNEPersonFrame(viewParent, viewNet);
924 personPlanFrame = new GNEPersonPlanFrame(viewParent, viewNet);
925 containerFrame = new GNEContainerFrame(viewParent, viewNet);
926 containerPlanFrame = new GNEContainerPlanFrame(viewParent, viewNet);
927}
928
929
930void
932 routeFrame->hide();
933 vehicleFrame->hide();
934 vehicleTypeFrame->hide();
935 stopFrame->hide();
936 personFrame->hide();
937 personPlanFrame->hide();
938 containerFrame->hide();
939 containerPlanFrame->hide();
940}
941
942
943void
945 // set width in all frames
946 routeFrame->setFrameWidth(frameWidth);
947 vehicleFrame->setFrameWidth(frameWidth);
948 vehicleTypeFrame->setFrameWidth(frameWidth);
949 stopFrame->setFrameWidth(frameWidth);
950 personFrame->setFrameWidth(frameWidth);
951 personPlanFrame->setFrameWidth(frameWidth);
952 containerFrame->setFrameWidth(frameWidth);
953 containerPlanFrame->setFrameWidth(frameWidth);
954}
955
956
957bool
959 // check all frames
960 if (routeFrame->shown()) {
961 return true;
962 } else if (vehicleFrame->shown()) {
963 return true;
964 } else if (vehicleTypeFrame->shown()) {
965 return true;
966 } else if (stopFrame->shown()) {
967 return true;
968 } else if (personFrame->shown()) {
969 return true;
970 } else if (personPlanFrame->shown()) {
971 return true;
972 } else if (containerFrame->shown()) {
973 return true;
974 } else if (containerPlanFrame->shown()) {
975 return true;
976 } else {
977 return false;
978 }
979}
980
981
984 // check all frames
985 if (routeFrame->shown()) {
986 return routeFrame;
987 } else if (vehicleFrame->shown()) {
988 return vehicleFrame;
989 } else if (vehicleTypeFrame->shown()) {
990 return vehicleTypeFrame;
991 } else if (stopFrame->shown()) {
992 return stopFrame;
993 } else if (personFrame->shown()) {
994 return personFrame;
995 } else if (personPlanFrame->shown()) {
996 return personPlanFrame;
997 } else if (containerFrame->shown()) {
998 return containerFrame;
999 } else if (containerPlanFrame->shown()) {
1000 return containerPlanFrame;
1001 } else {
1002 return nullptr;
1003 }
1004}
1005
1006// ---------------------------------------------------------------------------
1007// GNEViewParent::DataFrames - methods
1008// ---------------------------------------------------------------------------
1009
1011 edgeDataFrame(nullptr),
1012 edgeRelDataFrame(nullptr),
1013 TAZRelDataFrame(nullptr) {
1014}
1015
1016
1017void
1019 edgeDataFrame = new GNEEdgeDataFrame(viewParent, viewNet);
1020 edgeRelDataFrame = new GNEEdgeRelDataFrame(viewParent, viewNet);
1021 TAZRelDataFrame = new GNETAZRelDataFrame(viewParent, viewNet);
1022}
1023
1024
1025void
1027 edgeDataFrame->hide();
1028 edgeRelDataFrame->hide();
1029 TAZRelDataFrame->hide();
1030}
1031
1032
1033void
1035 // set width in all frames
1036 edgeDataFrame->setFrameWidth(frameWidth);
1037 edgeRelDataFrame->setFrameWidth(frameWidth);
1038 TAZRelDataFrame->setFrameWidth(frameWidth);
1039}
1040
1041
1042bool
1044 // check all frames
1045 if (edgeDataFrame->shown()) {
1046 return true;
1047 } else if (edgeRelDataFrame->shown()) {
1048 return true;
1049 } else if (TAZRelDataFrame->shown()) {
1050 return true;
1051 } else {
1052 return false;
1053 }
1054}
1055
1056
1057GNEFrame*
1059 // check all frames
1060 if (edgeDataFrame->shown()) {
1061 return edgeDataFrame;
1062 } else if (edgeRelDataFrame->shown()) {
1063 return edgeRelDataFrame;
1064 } else if (TAZRelDataFrame->shown()) {
1065 return TAZRelDataFrame;
1066 } else {
1067 return nullptr;
1068 }
1069}
1070
1071// ---------------------------------------------------------------------------
1072// GNEViewParent::ACChoosers - methods
1073// ---------------------------------------------------------------------------
1074
1076 ACChooserJunction(nullptr),
1077 ACChooserEdges(nullptr),
1078 ACChooserWalkingAreas(nullptr),
1079 ACChooserVehicles(nullptr),
1080 ACChooserPersons(nullptr),
1081 ACChooserRoutes(nullptr),
1082 ACChooserStops(nullptr),
1083 ACChooserTLS(nullptr),
1084 ACChooserAdditional(nullptr),
1085 ACChooserPOI(nullptr),
1086 ACChooserPolygon(nullptr),
1087 ACChooserProhibition(nullptr),
1088 ACChooserWire(nullptr) {
1089}
1090
1091
1093 // remove all dialogs if are active
1094 if (ACChooserJunction) {
1095 delete ACChooserJunction;
1096 }
1097 if (ACChooserEdges) {
1098 delete ACChooserEdges;
1099 }
1100 if (ACChooserWalkingAreas) {
1101 delete ACChooserWalkingAreas;
1102 }
1103 if (ACChooserRoutes) {
1104 delete ACChooserRoutes;
1105 }
1106 if (ACChooserStops) {
1107 delete ACChooserStops;
1108 }
1109 if (ACChooserVehicles) {
1110 delete ACChooserVehicles;
1111 }
1112 if (ACChooserPersons) {
1113 delete ACChooserPersons;
1114 }
1115 if (ACChooserTLS) {
1116 delete ACChooserTLS;
1117 }
1118 if (ACChooserAdditional) {
1119 delete ACChooserAdditional;
1120 }
1121 if (ACChooserPOI) {
1122 delete ACChooserPOI;
1123 }
1124 if (ACChooserPolygon) {
1125 delete ACChooserPolygon;
1126 }
1127 if (ACChooserProhibition) {
1128 delete ACChooserProhibition;
1129 }
1130 if (ACChooserWire) {
1131 delete ACChooserWire;
1132 }
1133}
1134
1135
1136/****************************************************************************/
FXDEFMAP(GNEViewParent) GNEViewParentMap[]
@ MID_MAKESNAPSHOT
Make snapshot - button.
Definition: GUIAppEnum.h:385
@ MID_LOCATEPERSON
Locate person - button.
Definition: GUIAppEnum.h:369
@ MID_HOTKEY_CTRL_Y_REDO
Undo.
Definition: GUIAppEnum.h:121
@ MID_LOCATEJUNCTION
Locate junction - button.
Definition: GUIAppEnum.h:357
@ MID_HOTKEY_CTRL_W_CLOSESIMULATION
Close simulation - ID.
Definition: GUIAppEnum.h:117
@ MID_LOCATEPOLY
Locate polygons - button.
Definition: GUIAppEnum.h:379
@ MID_LOCATEADD
Locate additional structure - button.
Definition: GUIAppEnum.h:375
@ MID_LOCATEPOI
Locate poi - button.
Definition: GUIAppEnum.h:377
@ MID_LOCATESTOP
Locate stop - button.
Definition: GUIAppEnum.h:367
@ MID_GNE_VIEWPARENT_FRAMEAREAWIDTH
Size of frame area updated.
Definition: GUIAppEnum.h:739
@ MID_LOCATEWALKINGAREA
Locate edge - button.
Definition: GUIAppEnum.h:361
@ MID_LOCATEEDGE
Locate edge - button.
Definition: GUIAppEnum.h:359
@ MID_LOCATEVEHICLE
Locate vehicle - button.
Definition: GUIAppEnum.h:363
@ MID_LOCATETLS
Locate TLS - button.
Definition: GUIAppEnum.h:373
@ MID_HOTKEY_CTRL_Z_UNDO
Redo.
Definition: GUIAppEnum.h:123
@ MID_LOCATEROUTE
Locate route - button.
Definition: GUIAppEnum.h:365
@ MID_GNE_TOOLBAREDIT_COMPUTEPATHMANAGER
compute path manager
Definition: GUIAppEnum.h:729
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
Definition: GUIDesigns.h:115
#define GUIDesignFrameArea
Definition: GUIDesigns.h:373
#define GUIDesignVerticalSeparator
vertical separator
Definition: GUIDesigns.h:455
#define GUIDesignSplitter
Definition: GUIDesigns.h:463
#define GUIDesignViewnArea
design for viewn area
Definition: GUIDesigns.h:376
#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:276
#define WRITE_MESSAGE(msg)
Definition: MsgHandler.h:267
#define TL(string)
Definition: MsgHandler.h:282
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions (used in NETEDIT)
@ SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
@ SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
@ 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 (used in NETEDIT)
@ GNE_TAG_FLOW_JUNCTIONS
a flow between junctions (used in NETEDIT)
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ GNE_TAG_POILANE
Point of interest over Lane.
@ SUMO_TAG_PERSON
@ SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
@ SUMO_TAG_PERSONFLOW
@ SUMO_TAG_TRIP
a single trip definition (used by router)
The main window of the 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:132
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
GNEPersonFrame * personFrame
frame for DEMAND_PERSON
GNEStopFrame * stopFrame
frame for DEMAND_STOP
GNERouteFrame * routeFrame
frame for DEMAND_ROUTE
GNEContainerFrame * containerFrame
frame for DEMAND_CONTAINER
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
bool isDemandFrameShown() const
return true if at least there is a demand frame shown
GNETypeFrame * vehicleTypeFrame
frame for DEMAND_VEHICLETYPE
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.
Definition: GNEViewParent.h:84
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
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
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_VEHICLETYPE
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.
virtual void create()
create GUIGlChildWindow
GUISUMOAbstractView * myView
The view.
FXPopup * myLocatorPopup
The locator menu.
MFXMenuButtonTooltip * myLocatorButton
The locator button.
GUIMainWindow * myParent
FOX needs this.
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.