 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
231 FXIMPLEMENT(
GNEApplicationWindow, FXMainWindow, GNEApplicationWindowMap, ARRAYNUMBER(GNEApplicationWindowMap))
276 superModes->create();
277 navigation->create();
279 modeOptions->create();
281 myToolBarShellSuperModes->create();
282 myToolBarShellNavigation->create();
283 myToolBarShellModes->create();
284 myToolBarShellModeOptions->create();
286 myGNEApp->myTopDock->recalc();
298 delete myToolBarShellSuperModes;
299 delete myToolBarShellNavigation;
300 delete myToolBarShellModes;
301 delete myToolBarShellModeOptions;
303 myGNEApp->myTopDock->recalc();
340 WRITE_ERROR(
"DEBUG: GNEApplicationWindow::dependentBuild called twice");
355 myGeoCoordinate =
new FXLabel(
myGeoFrame,
"N/A\t\tOriginal coordinate (before coordinate transformation in NETCONVERT)",
nullptr, LAYOUT_CENTER_Y);
385 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
386 FXMainWindow::create();
396 FXint textWidth = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 22;
400 show(PLACEMENT_DEFAULT);
402 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
447 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
449 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", 1);
451 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", 0);
491 FXFileDialog opendialog(
this,
"Open Netconvert Configuration");
493 opendialog.setSelectMode(SELECTFILE_EXISTING);
498 if (opendialog.execute()) {
500 std::string file = opendialog.getFilename().text();
517 FXFileDialog opendialog(
this,
"Open Network");
519 opendialog.setSelectMode(SELECTFILE_EXISTING);
520 opendialog.setPatternList(
"SUMO nets (*.net.xml)\nAll files (*)");
524 if (opendialog.execute()) {
526 std::string file = opendialog.getFilename().text();
546 FXFileDialog opendialog(
this,
"Import Foreign Network");
548 opendialog.setSelectMode(SELECTFILE_EXISTING);
549 FXString osmPattern(
"OSM net (*.osm.xml,*.osm)");
550 opendialog.setPatternText(0, osmPattern);
554 if (opendialog.execute()) {
556 std::string file = opendialog.getFilename().text();
560 if (osmPattern.contains(opendialog.getPattern())) {
563 oc.
set(
"osm-files", file);
564 oc.
set(
"geometry.remove",
"true");
565 oc.
set(
"ramps.guess",
"true");
566 oc.
set(
"junctions.join",
"true");
567 oc.
set(
"tls.guess-signals",
"true");
568 oc.
set(
"tls.discard-simple",
"true");
570 throw ProcessError(
"Attempted to import unknown file format '" + file +
"'.");
576 if (wizard->execute()) {
591 FXFileDialog opendialog(
this,
"Open Additionals file");
593 opendialog.setSelectMode(SELECTFILE_EXISTING);
594 opendialog.setPatternList(
"Additional files (*.xml)\nAll files (*)");
598 if (opendialog.execute()) {
603 std::string file = opendialog.getFilename().text();
632 FXFileDialog opendialog(
this,
"Open TLSPrograms file");
634 opendialog.setSelectMode(SELECTFILE_EXISTING);
635 opendialog.setPatternList(
"TLSProgram files (*.xml)\nAll files (*)");
639 if (opendialog.execute()) {
643 std::string file = opendialog.getFilename().text();
668 FXFileDialog opendialog(
this,
"Open demand element file");
670 opendialog.setSelectMode(SELECTFILE_EXISTING);
671 opendialog.setPatternList(
"Demand element files (*.xml)\nAll files (*)");
675 if (opendialog.execute()) {
680 std::string file = opendialog.getFilename().text();
710 myStatusbar->getStatusLine()->setText(
"Already loading!");
713 std::string file((
const char*)fileData);
762 sender->handle(
this,
myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
781 about->show(PLACEMENT_OWNER);
789 FXEvent*
event = (FXEvent*)ptr;
791 setDNDData(FROM_CLIPBOARD, event->target,
string);
835 if (ec->
myNet ==
nullptr) {
847 GNEViewParent* viewParent =
new GNEViewParent(
myMDIClient,
myMDIMenu,
"NETEDIT VIEW",
this,
nullptr,
myNet,
myUndoList,
nullptr, MDI_TRACKING, 10, 10, 300, 200);
849 viewParent->maximize();
870 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"), getApp()->reg().readRealEntry(
"viewport",
"y"), getApp()->reg().readRealEntry(
"viewport",
"z"));
875 getApp()->endWaitCursor();
880 std::vector<std::string> additionalFiles = oc.
getStringVector(
"additional-files");
884 for (
const auto& additionalFile : additionalFiles) {
885 WRITE_MESSAGE(
"Loading additionals and shapes from '" + additionalFile +
"'");
891 WRITE_ERROR(
"Loading of " + additionalFile +
" failed.");
902 std::vector<std::string> demandElementsFiles = oc.
getStringVector(
"route-files");
906 for (
const auto& demandElementsFile : demandElementsFiles) {
907 WRITE_MESSAGE(
"Loading demand elements from '" + demandElementsFile +
"'");
912 WRITE_ERROR(
"Loading of " + demandElementsFile +
" failed.");
921 if (oc.
isSet(
"additionals-output")) {
924 oc.
set(
"additional-files", oc.
getString(
"additionals-output"));
927 if (oc.
isSet(
"demandelements-output")) {
930 oc.
set(
"route-files", oc.
getString(
"demandelements-output"));
952 myRecentNets(GNEApp->getApp(),
"nets"),
959 FXMenuSeparator* sep1 =
new FXMenuSeparator(fileMenu);
960 sep1->setTarget(&myRecentConfigs);
961 sep1->setSelector(FXRecentFiles::ID_ANYFILES);
962 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_1);
963 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_2);
964 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_3);
965 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_4);
966 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_5);
967 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_6);
968 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_7);
969 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_8);
970 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_9);
971 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentConfigs, FXRecentFiles::ID_FILE_10);
972 new FXMenuCommand(fileMenu,
"Clear Recent Configurat&ions",
nullptr, &myRecentConfigs, FXRecentFiles::ID_CLEAR);
973 myRecentConfigs.setTarget(myGNEApp);
975 FXMenuSeparator* sep2 =
new FXMenuSeparator(fileMenu);
976 sep2->setTarget(&myRecentNets);
977 sep2->setSelector(FXRecentFiles::ID_ANYFILES);
978 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_1);
979 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_2);
980 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_3);
981 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_4);
982 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_5);
983 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_6);
984 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_7);
985 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_8);
986 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_9);
987 new FXMenuCommand(fileMenu,
"",
nullptr, &myRecentNets, FXRecentFiles::ID_FILE_10);
988 new FXMenuCommand(fileMenu,
"Cl&ear Recent Networks",
nullptr, &myRecentNets, FXRecentFiles::ID_CLEAR);
989 myRecentNets.setTarget(myGNEApp);
1004 new FXMenuCommand(fileMenu,
1005 "&New Network...\tCtrl+N\tCreate a new network.",
1007 new FXMenuCommand(fileMenu,
1008 "&Open Network...\tCtrl+O\tOpen a SUMO network.",
1010 new FXMenuCommand(fileMenu,
1011 "Open Netconvert Configura&tion...\tCtrl+Shift+O\tOpen a configuration file with NETCONVERT options.",
1013 new FXMenuCommand(fileMenu,
1014 "Import &Foreign Network...\t\tImport a foreign network such as OSM.",
1016 new FXMenuCommand(fileMenu,
1017 "&Reload\tCtrl+R\tReloads the network.",
1019 new FXMenuCommand(fileMenu,
1020 "&Save Network...\tCtrl+S\tSave the network.",
1022 new FXMenuCommand(fileMenu,
1023 "Save Net&work As...\tCtrl+Shift+S\tSave the network in another file.",
1025 new FXMenuCommand(fileMenu,
1026 "Save plain XM&L...\tCtrl+L\tSave plain xml representation the network.",
1028 new FXMenuCommand(fileMenu,
1029 "Save &joined junctions...\tCtrl+J\tSave log of joined junctions (allows reproduction of joins).",
1032 myGNEApp->myFileMenuAdditionals =
new FXMenuPane(myGNEApp);
1033 new FXMenuCommand(myGNEApp->myFileMenuAdditionals,
1034 "Load A&dditionals...\tCtrl+A\tLoad additionals and shapes.",
1036 saveAdditionals =
new FXMenuCommand(myGNEApp->myFileMenuAdditionals,
1037 "Save Additionals\tCtrl+Shift+A\tSave additionals and shapes.",
1039 saveAdditionals->disable();
1040 saveAdditionalsAs =
new FXMenuCommand(myGNEApp->myFileMenuAdditionals,
1041 "Save Additionals As...\t\tSave additional elements in another file.",
1043 saveAdditionalsAs->disable();
1046 myGNEApp->myFileMenuTLS =
new FXMenuPane(myGNEApp);
1047 new FXMenuCommand(myGNEApp->myFileMenuTLS,
1048 "load TLS Programs...\tCtrl+K\tload TLS Programs in all Traffic Lights of the net.",
1050 saveTLSPrograms =
new FXMenuCommand(myGNEApp->myFileMenuTLS,
1051 "Save TLS Programs \tCtrl+Shift+K\tSave TLS Programs of all Traffic Lights of the current net.",
1053 saveTLSPrograms->disable();
1054 new FXMenuCommand(myGNEApp->myFileMenuTLS,
1055 "Save TLS Programs As...\t\tSave TLS Programs of all Traffic Lights of the current net in another file.",
1059 myGNEApp->myFileMenuDemandElements =
new FXMenuPane(myGNEApp);
1060 new FXMenuCommand(myGNEApp->myFileMenuDemandElements,
1061 "Load demand elements...\tCtrl+D\tLoad demand elements.",
1063 saveDemandElements =
new FXMenuCommand(myGNEApp->myFileMenuDemandElements,
1064 "Save demand elements\tCtrl+Shift+D\tSave demand elements.",
1066 saveDemandElements->disable();
1067 saveDemandElementsAs =
new FXMenuCommand(myGNEApp->myFileMenuDemandElements,
1068 "Save demand elements as...\t\tSave demand elements in another file.",
1070 saveDemandElementsAs->disable();
1073 new FXMenuSeparator(fileMenu);
1074 new FXMenuCommand(fileMenu,
1075 "Close\tCtrl+W\tClose the net&work.",
1078 myGNEApp->myMenuBarFile.buildRecentFiles(fileMenu);
1079 new FXMenuSeparator(fileMenu);
1080 new FXMenuCommand(fileMenu,
"&Quit\tCtrl+Q\tQuit the Application.",
nullptr, myGNEApp,
MID_HOTKEY_CTRL_Q_CLOSE, 0);
1088 createEdgeMode(nullptr),
1090 deleteMode(nullptr),
1091 inspectMode(nullptr),
1092 selectMode(nullptr),
1093 connectMode(nullptr),
1094 prohibitionMode(nullptr),
1096 additionalMode(nullptr),
1097 crossingMode(nullptr),
1100 myEditMenuCommandsParent(editMenuCommandsParent) {
1106 createEdgeMode->show();
1109 inspectMode->show();
1111 connectMode->show();
1112 prohibitionMode->show();
1114 additionalMode->show();
1115 crossingMode->show();
1119 myHorizontalSeparator->show();
1125 createEdgeMode->hide();
1128 inspectMode->hide();
1130 connectMode->hide();
1131 prohibitionMode->hide();
1133 additionalMode->hide();
1134 crossingMode->hide();
1138 myHorizontalSeparator->hide();
1145 createEdgeMode =
new FXMenuCommand(editMenu,
1146 "&Edge mode\tE\tCreate junction and edges.",
1148 moveMode =
new FXMenuCommand(editMenu,
1149 "&Move mode\tM\tMove elements.",
1151 deleteMode =
new FXMenuCommand(editMenu,
1152 "&Delete mode\tD\tDelete elements.",
1154 inspectMode =
new FXMenuCommand(editMenu,
1155 "&Inspect mode\tI\tInspect elements and change their attributes.",
1157 selectMode =
new FXMenuCommand(editMenu,
1158 "&Select mode\tS\tSelect elements.",
1160 connectMode =
new FXMenuCommand(editMenu,
1161 "&Connection mode\tC\tEdit connections between lanes.",
1163 prohibitionMode =
new FXMenuCommand(editMenu,
1164 "Pro&hibition mode\tW\tEdit connection prohibitions.",
1166 TLSMode =
new FXMenuCommand(editMenu,
1167 "&Traffic light mode\tT\tEdit traffic lights over junctions.",
1169 additionalMode =
new FXMenuCommand(editMenu,
1170 "&Additional mode\tA\tCreate additional elements.",
1172 crossingMode =
new FXMenuCommand(editMenu,
1173 "C&rossing mode\tR\tCreate crossings between edges.",
1175 TAZMode =
new FXMenuCommand(editMenu,
1176 "TA&Z mode\tZ\tCreate Traffic Assignment Zones.",
1178 shapeMode =
new FXMenuCommand(editMenu,
1179 "&POI-Poly mode\tP\tCreate Points-Of-Interest and polygons.",
1182 myHorizontalSeparator =
new FXMenuSeparator(editMenu);
1191 vehicleMode(nullptr),
1192 vehicleTypeMode(nullptr),
1194 personTypeMode(nullptr),
1195 personMode(nullptr),
1196 personPlanMode(nullptr),
1197 myEditMenuCommandsParent(editMenuCommandsParent) {
1204 vehicleMode->show();
1205 vehicleTypeMode->show();
1207 personTypeMode->show();
1209 personPlanMode->show();
1211 myHorizontalSeparator->show();
1218 vehicleMode->hide();
1219 vehicleTypeMode->hide();
1221 personTypeMode->hide();
1223 personPlanMode->hide();
1225 myHorizontalSeparator->hide();
1232 routeMode =
new FXMenuCommand(editMenu,
1233 "Route mode\tR\tCreate Routes.",
1235 vehicleMode =
new FXMenuCommand(editMenu,
1236 "Vehicle mode\tV\tCreate vehicles.",
1238 vehicleTypeMode =
new FXMenuCommand(editMenu,
1239 "Vehicle type mode\tT\tCreate vehicle types.",
1241 stopMode =
new FXMenuCommand(editMenu,
1242 "Stop mode\tA\tCreate stops.",
1244 personTypeMode =
new FXMenuCommand(editMenu,
1245 "Person type mode\tW\tCreate person types.",
1247 personMode =
new FXMenuCommand(editMenu,
1248 "Person mode\tP\tCreate persons.",
1250 personPlanMode =
new FXMenuCommand(editMenu,
1251 "Person plan mode\tC\tCreate person plans.",
1254 myHorizontalSeparator =
new FXMenuSeparator(editMenu);
1271 undoLastChange =
new FXMenuCommand(fileMenu,
1272 "&Undo\tCtrl+Z\tUndo the last change.",
1274 redoLastChange =
new FXMenuCommand(fileMenu,
1275 "&Redo\tCtrl+Y\tRedo the last change.",
1278 new FXMenuSeparator(fileMenu);
1280 myGNEApp->mySupermodeCommands.buildSupermodeCommands(fileMenu);
1281 myGNEApp->mySupermodeCommands.hideSupermodeCommands();
1283 networkMenuCommands.buildNetworkMenuCommands(fileMenu);
1284 networkMenuCommands.hideNetworkMenuCommands();
1286 demandMenuCommands.buildDemandMenuCommands(fileMenu);
1287 demandMenuCommands.hideDemandMenuCommands();
1288 editViewScheme =
new FXMenuCommand(fileMenu,
1289 "Edit Visualisation\tCtrl+V\tOpens a dialog for editing visualization settings.",
1291 editViewPort =
new FXMenuCommand(fileMenu,
1292 "Edit Viewport\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.",
1294 toogleGrid =
new FXMenuCommand(fileMenu,
1295 "Toggle Grid\tCtrl+G\tToggles background grid (and snap-to-grid functionality).",
1297 new FXMenuSeparator(fileMenu);
1298 openInSUMOGUI =
new FXMenuCommand(fileMenu,
1299 "Open in SUMO GUI\tCtrl+T\tOpens the SUMO GUI application with the current network.",
1315 computeNetwork =
new FXMenuCommand(fileMenu,
1316 "Compute Junctions\tF5\tComputes junction shape and logic.",
1318 computeNetworkVolatile =
new FXMenuCommand(fileMenu,
1319 "Compute Junctions with volatile options\tShift+F5\tComputes junction shape and logic using volatile junctions.",
1321 cleanJunctions =
new FXMenuCommand(fileMenu,
1322 "Clean Junctions\tF6\tRemoves solitary junctions.",
1324 joinJunctions =
new FXMenuCommand(fileMenu,
1325 "Join Selected Junctions\tF7\tJoins selected junctions into a single junction.",
1327 clearInvalidCrossings =
new FXMenuCommand(fileMenu,
1328 "Clean invalid crossings\tF8\tClear invalid crossings.",
1331 computeDemand =
new FXMenuCommand(fileMenu,
1332 "Compute demand\tF5\tComputes demand elements.",
1334 cleanRoutes =
new FXMenuCommand(fileMenu,
1335 "Clean routes\tF6\tRemoves routes without vehicles.",
1337 joinRoutes =
new FXMenuCommand(fileMenu,
1338 "Join routes\tF7\tJoins routes with the same edges.",
1340 clearInvalidDemandElements =
new FXMenuCommand(fileMenu,
1341 "Clean invalid route elements\tF8\tClear elements with an invalid path (routes, Trips, Flows...).",
1344 new FXMenuSeparator(fileMenu);
1345 optionMenus =
new FXMenuCommand(fileMenu,
1346 "Options\tF10\t\tConfigure Processing Options.",
1354 computeNetwork->enable();
1355 computeNetworkVolatile->enable();
1356 cleanJunctions->enable();
1357 joinJunctions->enable();
1358 clearInvalidCrossings->enable();
1360 computeNetwork->show();
1361 computeNetworkVolatile->show();
1362 cleanJunctions->show();
1363 joinJunctions->show();
1364 clearInvalidCrossings->show();
1371 computeNetwork->disable();
1372 computeNetworkVolatile->disable();
1373 cleanJunctions->disable();
1374 joinJunctions->disable();
1375 clearInvalidCrossings->disable();
1377 computeNetwork->hide();
1378 computeNetworkVolatile->hide();
1379 cleanJunctions->hide();
1380 joinJunctions->hide();
1381 clearInvalidCrossings->hide();
1388 computeDemand->enable();
1389 cleanRoutes->enable();
1390 joinRoutes->enable();
1391 clearInvalidDemandElements->enable();
1393 computeDemand->show();
1394 cleanRoutes->show();
1396 clearInvalidDemandElements->show();
1403 computeDemand->disable();
1404 cleanRoutes->disable();
1405 joinRoutes->disable();
1406 clearInvalidDemandElements->disable();
1408 computeDemand->hide();
1409 cleanRoutes->hide();
1411 clearInvalidDemandElements->hide();
1426 new FXMenuCommand(fileMenu,
1427 "Locate &Junctions\tShift+J\tOpen a dialog for locating a Junction.",
1429 new FXMenuCommand(fileMenu,
1430 "Locate &Edges\tShift+E\tOpen a dialog for locating an Edge.",
1432 new FXMenuCommand(fileMenu,
1433 "Locate &Vehicles\tShift+V\tOpen a dialog for locating a Vehicle.",
1435 new FXMenuCommand(fileMenu,
1436 "Locate &Route\tShift+R\tOpen a dialog for locating a Route.",
1438 new FXMenuCommand(fileMenu,
1439 "Locate &Stops\tShift+S\tOpen a dialog for locating a Stop.",
1441 new FXMenuCommand(fileMenu,
1442 "Locate &TLS\tShift+T\tOpen a dialog for locating a Traffic Light.",
1444 new FXMenuCommand(fileMenu,
1445 "Locate &Additional\tShift+A\tOpen a dialog for locating an Additional Structure.",
1447 new FXMenuCommand(fileMenu,
1448 "Locate P&oI\tShift+O\tOpen a dialog for locating a Point of Interest.",
1450 new FXMenuCommand(fileMenu,
1451 "Locate Po&lygon\tShift+L\tOpen a dialog for locating a Polygon.",
1460 networkMode(nullptr),
1461 demandMode(nullptr),
1468 networkMode->show();
1471 myHorizontalSeparator->show();
1477 networkMode->hide();
1480 myHorizontalSeparator->hide();
1487 networkMode =
new FXMenuCommand(editMenu,
"&Network mode\tF3\tSelect network mode.",
1489 demandMode =
new FXMenuCommand(editMenu,
"&Demand mode\tF4\tSelect demand mode.",
1492 myHorizontalSeparator =
new FXMenuSeparator(editMenu);
1502 FXMenuTitle* menuTitle;
1504 myFileMenu =
new FXMenuPane(
this, LAYOUT_FIX_HEIGHT);
1506 menuTitle->setHeight(23);
1511 menuTitle->setHeight(23);
1516 menuTitle->setHeight(23);
1521 menuTitle->setHeight(23);
1526 menuTitle->setHeight(23);
1529 "&Show Status Line\t\tToggle this Status Bar on/off.",
1532 "Show &Message Window\t\tToggle the Message Window on/off.",
1535 "&Clear Message Window\t\tClear the message window.",
1540 menuTitle->setHeight(23);
1543 "&Online Documentation\tF1\tOpen Online documentation.",
1546 "&About\tF2\tAbout netedit.",
1554 getApp()->beginWaitCursor();
1627 if (
myNet !=
nullptr) {
1644 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
1652 oc.
set(
"offset.disable-normalization",
"true");
1659 myStatusbar->getStatusLine()->setText(statusBarText.c_str());
1660 myStatusbar->getStatusLine()->setNormalText(statusBarText.c_str());
1671 std::string additionalsSavePath = oc.
getString(
"additional-files");
1672 std::string demandElementsSavePath = oc.
getString(
"route-files");
1674 WRITE_DEBUG(
"Opening FXMessageBox 'Volatile Recomputing'");
1676 answer = FXMessageBox::question(
myNet->
getViewNet()->getApp(), MBOX_YES_NO,
"Recompute with volatile options",
1677 "Changes produced in the net due a recomputing with volatile options cannot be undone. Continue?");
1681 WRITE_DEBUG(
"Closed FXMessageBox 'Volatile Recomputing' with 'No'");
1682 }
else if (answer == 4) {
1683 WRITE_DEBUG(
"Closed FXMessageBox 'Volatile Recomputing' with 'ESC'");
1689 WRITE_DEBUG(
"Closed FXMessageBox 'Volatile Recomputing' with 'Yes'");
1693 if (oc.
getString(
"additional-files") ==
"") {
1695 WRITE_DEBUG(
"Opening FXMessageBox 'Save additionals before recomputing'");
1697 answer = FXMessageBox::question(
myNet->
getViewNet()->getApp(), MBOX_YES_NO,
"Save additionals before recomputing with volatile options",
1698 "Would you like to save additionals before recomputing?");
1702 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before recomputing' with 'No'");
1703 }
else if (answer == 4) {
1704 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before recomputing' with 'ESC'");
1708 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before recomputing' with 'Yes'");
1711 "Select name of the demand element file",
".xml",
1717 if (fileWithExtension !=
"") {
1720 oc.
set(
"additional-files", fileWithExtension);
1722 additionalsSavePath = oc.
getString(
"additional-files");
1727 if (oc.
getString(
"additional-files") ==
"") {
1729 additionalsSavePath = FXSystem::getTempDirectory().text() + std::string(
"/tmpAdditionalsNetedit.xml");
1732 getApp()->beginWaitCursor();
1737 WRITE_DEBUG(
"Opening FXMessageBox 'Error saving additionals before recomputing'");
1739 FXMessageBox::error(
this, MBOX_OK,
"Saving additionals in temporal folder failed!",
"%s", e.what());
1741 WRITE_DEBUG(
"Closed FXMessageBox 'Error saving additionals before recomputing' with 'OK'");
1745 getApp()->endWaitCursor();
1748 additionalsSavePath =
"";
1753 if (oc.
getString(
"route-files") ==
"") {
1755 WRITE_DEBUG(
"Opening FXMessageBox 'Save demand elements before recomputing'");
1757 answer = FXMessageBox::question(
myNet->
getViewNet()->getApp(), MBOX_YES_NO,
"Save demand elements before recomputing with volatile options",
1758 "Would you like to save demand elements before recomputing?");
1762 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before recomputing' with 'No'");
1763 }
else if (answer == 4) {
1764 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before recomputing' with 'ESC'");
1768 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before recomputing' with 'Yes'");
1771 "Select name of the demand element file",
".xml",
1777 if (fileWithExtension !=
"") {
1780 oc.
set(
"route-files", fileWithExtension);
1782 demandElementsSavePath = oc.
getString(
"route-files");
1787 if (oc.
getString(
"route-files") ==
"") {
1789 demandElementsSavePath = FXSystem::getTempDirectory().text() + std::string(
"/tmpDemandElementsNetedit.xml");
1792 getApp()->beginWaitCursor();
1797 WRITE_DEBUG(
"Opening FXMessageBox 'Error saving demand elements before recomputing'");
1799 FXMessageBox::error(
this, MBOX_OK,
"Saving demand elements in temporal folder failed!",
"%s", e.what());
1801 WRITE_DEBUG(
"Closed FXMessageBox 'Error saving demand elements before recomputing' with 'OK'");
1805 getApp()->endWaitCursor();
1808 demandElementsSavePath =
"";
1879 switch (FXSELID(sel)) {
1888 WRITE_DEBUG(
"Keys Shift + F5 (Compute with volatile options) pressed");
1903 WRITE_DEBUG(
"Key F8 (Clean invalid crossings) pressed");
1911 switch (FXSELID(sel)) {
1920 WRITE_DEBUG(
"Key F6 (RemoveUnusedRoutes) pressed");
1930 WRITE_DEBUG(
"Key F8 (CleanInvalidDemandElements) pressed");
1946 FXRegistry reg(
"SUMO GUI",
"Eclipse");
1952 std::string sumogui =
"sumo-gui";
1953 const char* sumoPath = getenv(
"SUMO_HOME");
1954 if (sumoPath !=
nullptr) {
1955 std::string newPath = std::string(sumoPath) +
"/bin/sumo-gui";
1957 sumogui =
"\"" + newPath +
"\"";
1966 cmd =
"start /B \"\" " + cmd;
2072 WRITE_DEBUG(
"Disabled grid throught Ctrl+g hotkey");
2092 if ((numericalKeyPressed < 0) || (numericalKeyPressed > 10)) {
2096 std::vector<FXMenuCheck*> visibleMenuCommands;
2102 if (numericalKeyPressed >= (
int)visibleMenuCommands.size()) {
2111 WRITE_DEBUG(
"Disabled toogle show grid throught alt + " +
toString(numericalKeyPressed + 1));
2115 WRITE_DEBUG(
"Enabled toogle show grid throught alt + " +
toString(numericalKeyPressed + 1));
2124 WRITE_DEBUG(
"Disabled show demand elements throught alt + " +
toString(numericalKeyPressed + 1));
2128 WRITE_DEBUG(
"Enabled show demand elements throught alt + " +
toString(numericalKeyPressed + 1));
2150 WRITE_DEBUG(
"Disabled show connections throught alt + " +
toString(numericalKeyPressed + 1));
2154 WRITE_DEBUG(
"Enabled show connections throught alt + " +
toString(numericalKeyPressed + 1));
2163 WRITE_DEBUG(
"Disabled hide connections throught alt + " +
toString(numericalKeyPressed + 1));
2167 WRITE_DEBUG(
"Enabled hide connections throught alt + " +
toString(numericalKeyPressed + 1));
2176 WRITE_DEBUG(
"Disabled extend selection throught alt + " +
toString(numericalKeyPressed + 1));
2180 WRITE_DEBUG(
"Enabled extend selection throught alt + " +
toString(numericalKeyPressed + 1));
2189 WRITE_DEBUG(
"Disabled change all phases throught alt + " +
toString(numericalKeyPressed + 1));
2193 WRITE_DEBUG(
"Enabled change all phases throught alt + " +
toString(numericalKeyPressed + 1));
2202 WRITE_DEBUG(
"Disabled warn about merge throught alt + " +
toString(numericalKeyPressed + 1));
2206 WRITE_DEBUG(
"Enabled warn about merge throught alt + " +
toString(numericalKeyPressed + 1));
2215 WRITE_DEBUG(
"Disabled show junction as bubble throught alt + " +
toString(numericalKeyPressed + 1));
2219 WRITE_DEBUG(
"Enabled show junction as bubble throught alt + " +
toString(numericalKeyPressed + 1));
2228 WRITE_DEBUG(
"Disabled move elevation throught alt + " +
toString(numericalKeyPressed + 1));
2232 WRITE_DEBUG(
"Enabled move elevation throught alt + " +
toString(numericalKeyPressed + 1));
2254 WRITE_DEBUG(
"Disabled auto opposite edge throught alt + " +
toString(numericalKeyPressed + 1));
2258 WRITE_DEBUG(
"Enabled auto opposite edge throught alt + " +
toString(numericalKeyPressed + 1));
2280 WRITE_DEBUG(
"Disabled hide non inspected demand elements throught alt + " +
toString(numericalKeyPressed + 1));
2284 WRITE_DEBUG(
"Enabled hide non inspected demand elements throught alt + " +
toString(numericalKeyPressed + 1));
2293 WRITE_DEBUG(
"Disabled show all person plans throught alt + " +
toString(numericalKeyPressed + 1));
2297 WRITE_DEBUG(
"Enabled show all person plans throught alt + " +
toString(numericalKeyPressed + 1));
2322 if (wizard->execute()) {
2363 "Save Network as",
".net.xml",
2369 if (fileWithExtension !=
"") {
2372 oc.
set(
"output-file", fileWithExtension);
2383 "Select name of the plain-xml edge-file (other names will be deduced from this)",
"",
2389 bool wasSet = oc.
isSet(
"plain-output-prefix");
2390 std::string oldPrefix = oc.
getString(
"plain-output-prefix");
2391 std::string prefix = file.text();
2394 prefix = prefix.substr(0, prefix.size() - 8);
2397 prefix = prefix.substr(0, prefix.size() - 1);
2400 oc.
set(
"plain-output-prefix", prefix);
2401 getApp()->beginWaitCursor();
2408 WRITE_DEBUG(
"Opening FXMessageBox 'Error saving plainXML'");
2410 FXMessageBox::error(
this, MBOX_OK,
"Saving plain xml failed!",
"%s", e.what());
2412 WRITE_DEBUG(
"Closed FXMessageBox 'Error saving plainXML' with 'OK'");
2418 oc.
set(
"plain-output-prefix", oldPrefix);
2420 oc.
unSet(
"plain-output-prefix");
2422 getApp()->endWaitCursor();
2431 "Select name of the joined-junctions file",
".nod.xml",
2437 if (fileWithExtension !=
"") {
2439 bool wasSet = oc.
isSet(
"junctions.join-output");
2440 std::string oldFile = oc.
getString(
"junctions.join-output");
2442 oc.
set(
"junctions.join-output", fileWithExtension);
2443 getApp()->beginWaitCursor();
2448 WRITE_DEBUG(
"Opening FXMessageBox 'error saving joined'");
2450 FXMessageBox::error(
this, MBOX_OK,
"Saving joined junctions failed!",
"%s", e.what());
2452 WRITE_DEBUG(
"Closed FXMessageBox 'error saving joined' with 'OK'");
2458 oc.
set(
"junctions.join-output", oldFile);
2460 oc.
unSet(
"junctions.join-output");
2462 getApp()->endWaitCursor();
2470 sender->handle(
this,
myNet ==
nullptr ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
2477 sender->handle(
this, ((
myNet ==
nullptr) || !
OptionsCont::getOptions().isSet(
"sumo-net-file")) ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
2483 sender->handle(
this, ((
myNet ==
nullptr) ||
myNet->
isAdditionalsSaved()) ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
2490 sender->handle(
this, ((
myNet ==
nullptr) ||
myNet->
isDemandElementsSaved()) ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
2511 if (oc.
getString(
"output-file") ==
"") {
2514 getApp()->beginWaitCursor();
2521 WRITE_DEBUG(
"Opening FXMessageBox 'error saving network'");
2523 FXMessageBox::error(
this, MBOX_OK,
"Saving Network failed!",
"%s", e.what());
2525 WRITE_DEBUG(
"Closed FXMessageBox 'error saving network' with 'OK'");
2531 getApp()->endWaitCursor();
2544 if (oc.
getString(
"additional-files").empty()) {
2546 "Select name of the additional file",
".xml",
2552 if (fileWithExtension !=
"") {
2555 oc.
set(
"additional-files", fileWithExtension);
2562 getApp()->beginWaitCursor();
2569 WRITE_DEBUG(
"Opening FXMessageBox 'error saving additionals'");
2571 FXMessageBox::error(
this, MBOX_OK,
"Saving additionals failed!",
"%s", e.what());
2573 WRITE_DEBUG(
"Closed FXMessageBox 'error saving additionals' with 'OK'");
2576 getApp()->endWaitCursor();
2588 "Select name of the additional file",
".xml",
2594 if (fileWithExtension !=
"") {
2616 if (oc.
getString(
"TLSPrograms-output").empty()) {
2618 "Select name of the TLS file",
".xml",
2630 oc.
set(
"TLSPrograms-output", fileWithExtension);
2634 getApp()->beginWaitCursor();
2641 WRITE_DEBUG(
"Opening FXMessageBox 'error saving TLS Programs'");
2643 FXMessageBox::error(
this, MBOX_OK,
"Saving TLS Programs failed!",
"%s", e.what());
2645 WRITE_DEBUG(
"Closed FXMessageBox 'error saving TLS Programs' with 'OK'");
2648 getApp()->endWaitCursor();
2660 "Select name of the TLS Progarm file",
".xml",
2666 if (fileWithExtension !=
"") {
2684 if (oc.
getString(
"route-files").empty()) {
2686 "Select name of the demand element file",
".xml",
2692 if (fileWithExtension !=
"") {
2695 oc.
set(
"route-files", fileWithExtension);
2702 getApp()->beginWaitCursor();
2709 WRITE_DEBUG(
"Opening FXMessageBox 'error saving demand elements'");
2711 FXMessageBox::error(
this, MBOX_OK,
"Saving demand elements failed!",
"%s", e.what());
2713 WRITE_DEBUG(
"Closed FXMessageBox 'error saving demand elements' with 'OK'");
2716 getApp()->endWaitCursor();
2728 "Select name of the demand element file",
".xml",
2734 if (fileWithExtension !=
"") {
2752 bool enable =
myNet !=
nullptr && oc.
isSet(
"output-file");
2753 sender->handle(
this, FXSEL(SEL_COMMAND, enable ? ID_ENABLE : ID_DISABLE),
nullptr);
2755 FXString caption = (
"Save " + oc.
getString(
"output-file")).c_str();
2756 sender->handle(
this, FXSEL(SEL_COMMAND, FXMenuCaption::ID_SETSTRINGVALUE), (
void*)&caption);
2767 WRITE_DEBUG(
"Opening FXMessageBox 'Confirm closing network'");
2769 answer = FXMessageBox::question(getApp(), MBOX_QUIT_SAVE_CANCEL,
2770 "Confirm closing Network",
"%s",
2771 "You have unsaved changes in the network. Do you wish to quit and discard all changes?");
2775 if (answer == MBOX_CLICKED_QUIT) {
2777 WRITE_DEBUG(
"Closed FXMessageBox 'Confirm closing network' with 'Quit'");
2785 }
else if (answer == MBOX_CLICKED_SAVE) {
2802 WRITE_DEBUG(
"Closed FXMessageBox 'Confirm closing network' with 'No'");
2803 }
else if (answer == 4) {
2804 WRITE_DEBUG(
"Closed FXMessageBox 'Confirm closing network' with 'ESC'");
2826 WRITE_DEBUG(
"Opening FXMessageBox 'Save additionals before exit'");
2828 FXuint answer = FXMessageBox::question(getApp(), MBOX_QUIT_SAVE_CANCEL,
2829 "Save additionals before exit",
"%s",
2830 "You have unsaved additionals. Do you wish to quit and discard all changes?");
2834 if (answer == MBOX_CLICKED_QUIT) {
2835 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before exit' with 'Quit'");
2838 }
else if (answer == MBOX_CLICKED_SAVE) {
2840 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before exit' with 'Yes'");
2851 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before exit' with 'No'");
2852 }
else if (answer == 4) {
2853 WRITE_DEBUG(
"Closed FXMessageBox 'Save additionals before exit' with 'ESC'");
2869 WRITE_DEBUG(
"Opening FXMessageBox 'Save demand elements before exit'");
2871 FXuint answer = FXMessageBox::question(getApp(), MBOX_QUIT_SAVE_CANCEL,
2872 "Save demand elements before exit",
"%s",
2873 "You have unsaved demand elements. Do you wish to quit and discard all changes?");
2877 if (answer == MBOX_CLICKED_QUIT) {
2878 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before exit' with 'Quit'");
2881 }
else if (answer == MBOX_CLICKED_SAVE) {
2883 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before exit' with 'Yes'");
2894 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before exit' with 'No'");
2895 }
else if (answer == 4) {
2896 WRITE_DEBUG(
"Closed FXMessageBox 'Save demand elements before exit' with 'ESC'");
2920 Supermode currentSupermode = static_cast<Supermode>(supermode);
2974 const long handled = FXMainWindow::onKeyPress(o, sel, eventData);
2975 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2987 const long handled = FXMainWindow::onKeyRelease(o, sel, eventData);
2988 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
ToolbarsGrip myToolbarsGrip
Toolbars Grip.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
void p_clear()
clears the undo list (implies abort)
static unsigned long runHiddenCommand(const std::string &cmd)
run a shell command without popping up any windows (particuarly on win32)
hot key <F4> set demand mode in NETEDIT
long onCmdHelp(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Documentation
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
virtual void showViewportEditor()
show viewport editor
void buildLocateMenuCommands(FXMenuPane *editMenu)
build menu commands
void buildEditMenuCommands(FXMenuPane *editMenu)
build edit menu commands
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
#define GUIDesignToolBarGrip
design for toolbar grip (used to change the position of toolbar with mouse)
hot key <ESC> abort current edit operation
long onCmdToogleMoveElevation(FXObject *, FXSelector, void *)
toogle move elevation
long onClipboardRequest(FXObject *sender, FXSelector sel, void *ptr)
called when the command/FXCall clipboard request is executed
FXMenuCommand * redoLastChange
FXMenuCommand for redo last change.
FXHorizontalFrame * myCartesianFrame
std::string myUndoRedoListEnabled
string to check if undo/redo list is enabled (a String is used to keep the disabling reason)
FXHorizontalFrame * myGeoFrame
void hotkeyFocusFrame()
handle focus frame keypress
FXMenuPane * myProcessingMenu
void showDemandProcessingMenuCommands()
show demand processing menu commands
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
void storeWindowSizeAndPos()
record window position and size in registry
void loadOptionOnStartup()
load net on startup
hot key <F12> focus upper element of current frame
send when a message occured
void cleanInvalidDemandElements(GNEUndoList *undoList)
clean invalid demand elements
#define WRITE_WARNING(msg)
long onCmdToogleShowConnections(FXObject *, FXSelector, void *)
toogle show connections
void hotkeyBackSpace()
handle backspace keypress
bool continueWithUnsavedAdditionalChanges()
warns about unsaved changes in additionals and gives the user the option to abort
void loadConfigOrNet(const std::string file, bool isNet, bool isReload=false, bool useStartupOptions=false, bool newNet=false)
starts to load a netimport configuration or a network */
FXMDIClient * myMDIClient
The multi view panel.
static FXint fxexecute(FXString link)
long onCmdOptions(FXObject *, FXSelector, void *)
called if the user selects Processing->Configure Options
FXStatusBar * myStatusbar
The status bar.
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string demandPath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
static void initCursors(FXApp *a)
Initiate GUICursorSubSys.
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
NetworkMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
long onCmdClose(FXObject *, FXSelector, void *)
called when the command/FXCall close is executed
void requiereSaveNet(bool value)
inform that net has to be saved
long onCmdToogleWarnAboutMerge(FXObject *, FXSelector, void *)
toogle warn for merge
A logging window for the gui.
long onCmdEditViewScheme(FXObject *, FXSelector, void *)
Called on menu Edit->Visualization.
long onCmdUndo(FXObject *, FXSelector, void *)
called when user press Ctrl+Z
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
GNEViewNet * myViewNet
pointer to current view net
FXSplitter * myMainSplitter
The splitter that divides the main window into view and the log window.
void resetWritable()
Resets all options to be writeable.
void showViewschemeEditor()
show viewsscheme editor
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
void setTarget(FXObject *tgt)
set the target
#define GUIDesignSplitterMDI
MDI Splitter.
static std::string addExtension(const std::string &path, const std::string &extension)
Add an extension to the given file path.
long onUpdUndo(FXObject *obj, FXSelector sel, void *ptr)
called when the update/FXCall undo is executed
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle select edges
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
long onUpdSaveAdditionals(FXObject *, FXSelector, void *)
called when the update/FXCall save additionals is executed
const std::vector< TAZCurrent::TAZEdge > & getEdgeAndTAZChildrenSelected() const
get map with edge and TAZChildren
#define GUIDesignStatusBar
design used in status bar
void clearSelectedEdges()
clear current TAZ children
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
void getVisibleDemandMenuCommands(std::vector< FXMenuCheck * > &commands) const
get visible demand menu commands
const FXString myTitlePrefix
the prefix for the window title
#define GUIDesignToolbarMenuBarNetedit
design for top toolbar (file, edit, processing...) used only in netedit (due supermodes buttons)
long onCmdSaveDemandElementsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save demand elements as is executed
LocateMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
hot key <F1> open online documentation
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
long onCmdSaveDemandElements(FXObject *, FXSelector, void *)
called when the command/FXCall save demand elements is executed
FXEX::FXThreadEvent myLoadThreadEvent
io-event with the load-thread
clean junctions without edges in network mode and unused routes in demand mode
std::vector< GUIGlChildWindow * > myGLWindows
long onCmdToogleGrid(FXObject *, FXSelector, void *)
called if the user press key combination Ctrl + G to toogle grid
long onCmdFocusFrame(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits f
long onUpdReload(FXObject *, FXSelector, void *)
called when the update/FXCall reload is executed
Load file with TLS Programs.
static void resetFont()
to be called when the font context is invalidated
ProcessingMenuCommands(GNEApplicationWindow *GNEApp)
constructor
Reload the previously loaded simulation.
static FXString getTitleText(const FXString &appname, FXString filename="")
Returns the title text in dependance to an optional file name.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
void buildDemandMenuCommands(FXMenuPane *editMenu)
build menu commands
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
const std::string & isUndoRedoEnabled() const
check if undo-redo is enabled
static OptionsCont & getOptions()
Retrieves the options.
DemandMenuCommands demandMenuCommands
Demand Menu Commands.
bool cleanInvalidCrossings(GNEUndoList *undoList)
clear invalid crossings
The main window of the Netedit.
static void close()
close GUIIconSubSys
void disableUndoRedo(const std::string &reason)
disable undo-redo giving a string with the reason
void unregisterMsgHandlers()
unregister message handlers
EditMenuCommands myEditMenuCommands
Edit Menu Commands.
const std::string & getMsg() const
Returns the message.
long computeJunctionWithVolatileOptions()
called if the user selects Processing->compute junctions with volatile options
void unSet(const std::string &name, bool failOnNonExistant=true) const
Marks the option as unset.
FXMenuCommand * saveDemandElements
FXMenuCommand for enable or disable save demand elements.
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
hot key <F2> open about dialog
#define GUIDesignSplitter
hotkey for mode deleting things
static void initTextures(FXApp *a)
Initiate GUITextureSubSys for textures.
hotkey for mode connecting lanes
void disableSaveDemandElementsMenu()
disable save demand elements
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
long onCmdOpenTLSPrograms(FXObject *, FXSelector, void *)
called when the command/FXCall open additionals is executed
FXMenuPane * myFileMenu
the submenus
void update() const
Mark the entire GNEViewNet to be repainted later.
void setSelector(FXSelector sel)
set the selector
void redo()
redo the last command group
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Toogle Gaming mode in SUMO and grid in NETEDIT.
static void initIcons(FXApp *a)
Initiate GUIIconSubSys.
struct for edit menu commands
FXCursor * getDefaultCursor()
get default cursor
hotkey for mode editing TAZ
ProcessingMenuCommands myProcessingMenuCommands
Edit Menu Commands.
FileMenuCommands(GNEApplicationWindow *GNEApp)
constructor
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
long onCmdToogleExtendSelection(FXObject *, FXSelector, void *)
toogle extend selection
A single child window which contains a view of the simulation area.
void hotkeyEnter()
handle enter keypress
static void buildNETEDITAccelerators(GNEApplicationWindow *GNEApp)
build NETEDIT Accelerators
hotkey for mode selecting objects
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
long onCmdOpenNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall open network is executed
send when a debug occured
FXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
bool continueWithUnsavedDemandElementChanges()
warns about unsaved changes in demand elements and gives the user the option to abort
long onUpdSaveDemandElements(FXObject *, FXSelector, void *)
called when the update/FXCall save demand elements is executed
#define GUIDesignHorizontalFrameStatusBar
Horizontal frame used in status bar.
void undo()
undo the last command group
bool myAmLoading
information whether the gui is currently loading and the load-options shall be greyed out
static std::string clipped
bool continueWithUnsavedChanges()
warns about unsaved changes and gives the user the option to abort
bool joinSelectedJunctions(GNEUndoList *undoList)
join selected junctions
hot key <Backspace> remove last sub-operation
send when a warning occured
GNENet * myNet
we are responsible for the net
long onCmdToogleShowDemandElements(FXObject *, FXSelector, void *)
LocateMenuCommands myLocateMenuCommands
Locate Menu Commands.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
SupermodeCommands(GNEApplicationWindow *GNEApp)
constructor
std::string myFile
the name of the loaded file
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
save network as plain XML
FXMenuCheck * menuCheckShowConnections
menu check to show connections
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
void joinRoutes(GNEUndoList *undoList)
join routes
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
void addSeparator()
Adds a a separator to this log window.
static bool endsWith(const std::string &str, const std::string suffix)
Checks whether a given string ends with the suffix.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
void enableSaveDemandElementsMenu()
enable save demand elements
void clear()
Clears the window.
long onCmdDel(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits del
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call
GUIMessageWindow * myMessageWindow
A window to display messages, warnings and error in.
std::vector< FXMainWindow * > myTrackerWindows
long onCmdToogleEditOptions(FXObject *, FXSelector, void *)
called if the user press key combination Alt + <0-9>
GNENet * myNet
the loaded net
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
bool isAdditionalsSaved() const
check if additionals are saved
SupermodeCommands mySupermodeCommands
Supermode Commands.
void showNetworkProcessingMenuCommands()
show network processing menu commands
void hideDemandMenuCommands()
hide all menu commands
void set(double x, double y)
set positions x and y
void abortOperation(bool clearSelection=true)
abort current edition operation
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
FXMenuPane * myFileMenuDemandElements
bool hadDependentBuild
check if had dependent build
FXMenuPane * myLocatorMenu
long onCmdClearMsgWindow(FXObject *, FXSelector, void *)
called when the command/FXCall clear message windows is executed
long onUpdRedo(FXObject *obj, FXSelector sel, void *ptr)
called when the update/FXCall redo is executed
void create()
Creates the main window (required by FOX)
Open current network in SUMO or in NETEDIT.
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
void buildFileMenuCommands(FXMenuPane *editMenu)
build menu commands
void handleEvent_Message(GUIEvent *e)
hanlde event of type message
#define GUIDesignToolBar
design for default toolbar
int getNumberOfDemandElements(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of demand elements of the net.
void enableSaveTLSProgramsMenu()
enable save TLS Programs
FXMenuCommand * saveAdditionals
FXMenuCommand for enable or disable save additionals.
The application's "About" - dialog.
Network mode (Edges, junctions, etc..)
long onCmdAbort(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits esc
Supermode currentSupermode
the current supermode
hotkey for mode editing connection prohibitions AND person types
send when a simulation has been loaded
A point in 2D or 3D with translation and scaling methods.
FXMenuCommand * saveDemandElementsAs
FXMenuCommand for enable or disable save demand elements as.
GUICompleteSchemeStorage gSchemeStorage
double x() const
Returns the x-position.
~GNEApplicationWindow()
Destructor.
SUMOTime getCurrentSimTime() const
get current simulation time (pure virtual but we don't need it)
An XML-handler for visualisation schemes.
void getVisibleCommonMenuCommands(std::vector< FXMenuCheck * > &commands) const
get visible common menu commands
long onUpdOpen(FXObject *, FXSelector, void *)
called when the command/FXCall on update open executed
GNELoadThread * myLoadThread
the thread that loads the network
void create()
Creates the widget.
GNEUndoList * getUndoList() const
get the undoList object
FXMenuPane * myFileMenuTLS
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
long onCmdEnter(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits enter
void hideSupermodeCommands()
hide all menu commands
Open viewport editor - button.
void save(OptionsCont &oc)
save the network
void enableSaveAdditionalsMenu()
enable save additionals
void getVisibleNetworkMenuCommands(std::vector< FXMenuCheck * > &commands) const
get visible network menu commands
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when a key is released
A storage for options typed value containers)
#define GUIDesignToolBarRaisedNext
design for first toolbar shell positioned in the next position of dock
long onCmdNewNetwork(FXObject *, FXSelector, void *)
Supermode
@brie enum for supermodes
long onCmdAbout(FXObject *, FXSelector, void *)
called when the command/FXCall show about dialog is executed
void dependentBuild()
build dependent
long onCmdSaveNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall save network is executed
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
FXMenuCommand * saveAdditionalsAs
FXMenuCommand for enable or disable save additionals As.
long onCmdToogleHideConnections(FXObject *, FXSelector, void *)
toogle hide connections
TAZSelectionStatistics * getTAZSelectionStatisticsModul() const
get TAZ Selection Statistics modul
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
send when a gldebug occured
long onCmdOpenDemandElements(FXObject *, FXSelector, void *)
called when the command/FXCall open demand is executed
hot key delete selections or elements
void closeAllWindows()
this method closes all windows and deletes the current simulation */
hotkey for mode editing TLS AND Vehicle Types
FXString gCurrentFolder
The folder used as last.
std::string mySettingsFile
the name of the settings file to load
long onLoadThreadEvent(FXObject *, FXSelector, void *)
called when the command/FXCall load thread is executed
long onUpdNeedsNetwork(FXObject *, FXSelector, void *)
called when the update/FXCall needs network is executed
long onCmdSetSuperMode(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits an edit-supermode hotkey
long onCmdOpenRecent(FXObject *, FXSelector, void *)
called when the command/FXCall open recent is executed
compute junctions with volatile options
long onCmdSaveAsNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall save network as is executed
bool isDemandElementsSaved() const
check if demand elements are saved
#define GUIDesignToolBarRaisedSame
design for toolbar
long p_onUpdRedo(FXObject *, FXSelector, void *)
event after Redo
void loadConfigOrNet(const std::string &file, bool isNet, bool useStartupOptions, bool newNet=false)
begins the loading of a netconvert configuration or a a network
FXGLVisual * myGLVisual
The gl-visual used.
GNEViewNet * getViewNet() const
get view net
FXLabel * myGeoCoordinate
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when a key is pressed
void appendMsg(GUIEventType eType, const std::string &msg)
Adds new text to the window.
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
long onCmdToogleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toogle hide non inspected demand elements
send when a error occured
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void updateControls()
update control contents after undo/redo or recompute
long onCmdSaveTLSPrograms(FXObject *, FXSelector, void *)
called when the command/FXCall save TLSPrograms is executed
clean invalid crossings in network mode and demand elements in demand mode
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
join selected junctions in network mode and normalice demand element ids in demand mode
bool myViewportFromRegistry
whether loading viewport from registry
void disableSaveAdditionalsMenu()
disable save additionals
void saveAdditionals(const std::string &filename)
save additional elements of the network
hotkey for mode create vehicles
double y() const
Returns the y-position.
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
GUIPerspectiveChanger & getChanger() const
get changer
MenuBarFile myMenuBarFile
MenuBarFile.
void handleEvent_NetworkLoaded(GUIEvent *e)
handle event of type Network loaded
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
Locate junction - button.
GUIEventType getOwnType() const
returns the event type
long onCmdOpenSUMOGUI(FXObject *sender, FXSelector sel, void *ptr)
called if the user hints ctrl + T
long onCmdSetMode(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits an edit-mode hotkey
void saveTLSPrograms(const std::string &filename)
save TLS Programs elements of the network
FileMenuCommands myFileMenuCommands
File Menu Commands.
long onCmdSaveAdditionalsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save additionals as is executed
long onCmdOpenAdditionals(FXObject *, FXSelector, void *)
called when the command/FXCall open additionals is executed
long onCmdSaveJoined(FXObject *, FXSelector, void *)
called when the command/FXCall save joined is executed
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
Demanding mode (Routes, Vehicles etc..)
void hideDemandProcessingMenuCommands()
show demand processing menu commands
FXMenuPane * myWindowsMenu
FXMenuCommand * undoLastChange
FXMenuCommand for undo last change.
long onCmdToogleChangeAllPhases(FXObject *, FXSelector, void *)
toogle change all phases
void setStatusBarText(const std::string &statusBarText)
set text of the statusBar
void hideNetworkMenuCommands()
hide all menu commands
GNEUndoList * getUndoList()
get pointer to undoList
void saveViewport(const double x, const double y, const double z, const double rot)
Makes the given viewport the default.
long onCmdReload(FXObject *, FXSelector, void *)
called when the command/FXCall reload is executed
static void close()
close GUITextureSubSys
void registerMsgHandlers()
register message handlers
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
GUISelectedStorage gSelected
A global holder of selected objects.
hot key <F3> set network mode in NETEDIT
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
long onCmdToogleHideShapes(FXObject *, FXSelector, void *)
toogle hide shapes in super mode demand
static void setDefaultOptions(OptionsCont &oc)
sets required options for proper functioning
void buildSupermodeCommands(FXMenuPane *editMenu)
build menu commands
void buildNetworkMenuCommands(FXMenuPane *editMenu)
build menu commands
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
hot key <ENTER> accept current operation
long onCmdToogleShowGrid(FXObject *, FXSelector, void *)
toogle show grid
static void fillOptions(OptionsCont &oc)
clears and initializes the OptionsCont
FXGLCanvas * getBuildGLCanvas() const
void addDecals(const std::vector< Decal > &decals)
add decals
static bool isReadable(std::string path)
Checks whether the given file is readable.
static void resetTextures()
Reset textures.
hotkey for mode creating polygons
void fillMenuBar()
Builds the menu bar.
Loads a file previously loaded.
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
void updateControls()
update control contents after undo/redo or recompute
Open view editor - button.
long onUpdSaveNetwork(FXObject *, FXSelector, void *)
called when the update/FXCall save network is executed
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
long onCmdEditChosen(FXObject *, FXSelector, void *)
called when the command/FXCall edit chosen is executed
static bool checkOptions()
checks shared options and sets StdDefs
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
Save Additional Elements.
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
long onCmdRedo(FXObject *, FXSelector, void *)
void enableUndoRedo()
disable undo-redo
Perform a single simulation step in SUMO and open Demand Elements in NETEDIT.
GNEUndoList * myUndoList
the one and only undo list
Start the simulation in SUMO and open Additionals Elemements in NETEDIT.
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
const GNEViewNetHelper::CommonViewOptions & getCommonViewOptions() const
get Common view options
hotkey for mode inspecting object attributes
long p_onUpdUndo(FXObject *, FXSelector, void *)
std::string myConfigPattern
Input file pattern.
long onCmdToogleShowJunctionBubbles(FXObject *, FXSelector, void *)
toogle show junction bubbles
long onCmdSaveTLSProgramsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save TLSPrograms as is executed
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
long onCmdToogleChainEdges(FXObject *, FXSelector, void *)
toogle chain edges
void hotkeyDel()
handle del keypress
long onCmdSaveAsPlainXML(FXObject *, FXSelector, void *)
called when the command/FXCall save as plain xml is executed
void showSupermodeCommands()
show all menu commands
Locate polygons - button.
FXSynchQue< GUIEvent * > myEvents
List of got requests.
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
called when the command/FXCall open configuration is executed
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...
void computeDemandElements(GNEApplicationWindow *window)
compute demand elements param[in] window The window to inform about delay
void showNetworkMenuCommands()
show all menu commands
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
long onCmdEditViewport(FXObject *, FXSelector, void *)
Called on menu Edit->Viewport.
long onCmdLocate(FXObject *, FXSelector, void *)
called when the command/FXCall locate is executed
Stop the simulation in SUMO and save network in NETEDIT.
double getTrackerInterval() const
get current tracker interval (pure virtual but we don't need it)
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
DemandMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
void updateSuperModeMenuCommands(int supermode)
update FXMenuCommands
long onCmdProcessButton(FXObject *, FXSelector sel, void *)
called when user press a process button (or a shortcut)
Locate addtional structure - button.
hotkey for mode adding edges
GNEApplicationWindow()
FOX needs this for static members.
static void resetLoaded()
resets loaded location elements
FXMenuCommand * saveTLSPrograms
FXMenuCommand for enable or disable save additionals.
hotkey for mode editing crossing AND routes
void buildProcessingMenuCommands(FXMenuPane *editMenu)
build menu commands
void showDemandMenuCommands()
show all menu commands
bool isNetSaved() const
return if net has to be saved
void cleanUnusedRoutes(GNEUndoList *undoList)
clean unused routes
long onCmdToogleAutoOppositeEdge(FXObject *, FXSelector, void *)
toogle autoOpposite edge
void hideNetworkProcessingMenuCommands()
show network processing menu commands
long onCmdOpenForeign(FXObject *, FXSelector, void *)
called when the command/FXCall open foreign is executed
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
hotkey for mode moving element
compute Network in network mode and Demand elements in demand mode
#define WRITE_MESSAGE(msg)
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String)
long onCmdBackspace(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits backspace
FXDEFMAP(GNEApplicationWindow) GNEApplicationWindowMap[]
void saveDemandElements(const std::string &filename)
save demand element elements of the network
EditMenuCommands(GNEApplicationWindow *GNEApp)
constructor
long onCmdSaveAdditionals(FXObject *, FXSelector, void *)
called when the command/FXCall save additionals is executed
FXMenuPane * myFileMenuAdditionals
GNEViewParent * getViewParent() const
get the net object
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
Editor for the list of chosen objects.
NetworkMenuCommands networkMenuCommands
Network Menu Commands.
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
hotkey for mode editing additionals AND stops