231 FXIMPLEMENT(
GNEApplicationWindow, FXMainWindow, GNEApplicationWindowMap, ARRAYNUMBER(GNEApplicationWindowMap))
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);
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);
975 FXMenuSeparator* sep2 =
new FXMenuSeparator(fileMenu);
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);
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).",
1034 "Load A&dditionals...\tCtrl+A\tLoad additionals and shapes.",
1037 "Save Additionals\tCtrl+Shift+A\tSave additionals and shapes.",
1041 "Save Additionals As...\t\tSave additional elements in another file.",
1048 "load TLS Programs...\tCtrl+K\tload TLS Programs in all Traffic Lights of the net.",
1051 "Save TLS Programs \tCtrl+Shift+K\tSave TLS Programs of all Traffic Lights of the current net.",
1055 "Save TLS Programs As...\t\tSave TLS Programs of all Traffic Lights of the current net in another file.",
1061 "Load demand elements...\tCtrl+D\tLoad demand elements.",
1064 "Save demand elements\tCtrl+Shift+D\tSave demand elements.",
1068 "Save demand elements as...\t\tSave demand elements in another file.",
1073 new FXMenuSeparator(fileMenu);
1074 new FXMenuCommand(fileMenu,
1075 "Close\tCtrl+W\tClose the net&work.",
1079 new FXMenuSeparator(fileMenu);
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) {
1146 "&Edge mode\tE\tCreate junction and edges.",
1148 moveMode =
new FXMenuCommand(editMenu,
1149 "&Move mode\tM\tMove elements.",
1152 "&Delete mode\tD\tDelete elements.",
1155 "&Inspect mode\tI\tInspect elements and change their attributes.",
1158 "&Select mode\tS\tSelect elements.",
1161 "&Connection mode\tC\tEdit connections between lanes.",
1164 "Pro&hibition mode\tW\tEdit connection prohibitions.",
1166 TLSMode =
new FXMenuCommand(editMenu,
1167 "&Traffic light mode\tT\tEdit traffic lights over junctions.",
1170 "&Additional mode\tA\tCreate additional elements.",
1173 "C&rossing mode\tR\tCreate crossings between edges.",
1175 TAZMode =
new FXMenuCommand(editMenu,
1176 "TA&Z mode\tZ\tCreate Traffic Assignment Zones.",
1179 "&POI-Poly mode\tP\tCreate Points-Of-Interest and polygons.",
1191 vehicleMode(nullptr),
1192 vehicleTypeMode(nullptr),
1194 personTypeMode(nullptr),
1195 personMode(nullptr),
1196 personPlanMode(nullptr),
1233 "Route mode\tR\tCreate Routes.",
1236 "Vehicle mode\tV\tCreate vehicles.",
1239 "Vehicle type mode\tT\tCreate vehicle types.",
1241 stopMode =
new FXMenuCommand(editMenu,
1242 "Stop mode\tA\tCreate stops.",
1245 "Person type mode\tW\tCreate person types.",
1248 "Person mode\tP\tCreate persons.",
1251 "Person plan mode\tC\tCreate person plans.",
1272 "&Undo\tCtrl+Z\tUndo the last change.",
1275 "&Redo\tCtrl+Y\tRedo the last change.",
1278 new FXMenuSeparator(fileMenu);
1289 "Edit Visualisation\tCtrl+V\tOpens a dialog for editing visualization settings.",
1292 "Edit Viewport\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.",
1295 "Toggle Grid\tCtrl+G\tToggles background grid (and snap-to-grid functionality).",
1297 new FXMenuSeparator(fileMenu);
1299 "Open in SUMO GUI\tCtrl+T\tOpens the SUMO GUI application with the current network.",
1316 "Compute Junctions\tF5\tComputes junction shape and logic.",
1319 "Compute Junctions with volatile options\tShift+F5\tComputes junction shape and logic using volatile junctions.",
1322 "Clean Junctions\tF6\tRemoves solitary junctions.",
1325 "Join Selected Junctions\tF7\tJoins selected junctions into a single junction.",
1328 "Clean invalid crossings\tF8\tClear invalid crossings.",
1332 "Compute demand\tF5\tComputes demand elements.",
1335 "Clean routes\tF6\tRemoves routes without vehicles.",
1338 "Join routes\tF7\tJoins routes with the same edges.",
1341 "Clean invalid route elements\tF8\tClear elements with an invalid path (routes, Trips, Flows...).",
1344 new FXMenuSeparator(fileMenu);
1346 "Options\tF10\t\tConfigure Processing Options.",
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),
1487 networkMode =
new FXMenuCommand(editMenu,
"&Network mode\tF3\tSelect network mode.",
1489 demandMode =
new FXMenuCommand(editMenu,
"&Demand mode\tF4\tSelect demand mode.",
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();
1617 myTrackerWindows.clear();
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'");
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) {
Locate junction - button.
void hideDemandMenuCommands()
hide all menu commands
std::vector< FXMainWindow * > myTrackerWindows
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
Perform a single simulation step in SUMO and open Demand Elements in NETEDIT.
MenuBarFile myMenuBarFile
MenuBarFile.
std::string myConfigPattern
Input file pattern.
void enableSaveTLSProgramsMenu()
enable save TLS Programs
FXMenuCommand * clearInvalidCrossings
FXMenuCommand for clear invalid crosings.
FXLabel * myGeoCoordinate
hotkey for mode editing TLS AND Vehicle Types
TAZSelectionStatistics * getTAZSelectionStatisticsModul() const
get TAZ Selection Statistics modul
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
FXSynchQue< GUIEvent * > myEvents
List of got requests.
void buildFileMenuCommands(FXMenuPane *editMenu)
build menu commands
#define GUIDesignToolBarRaisedSame
design for toolbar
bool myAmLoading
information whether the gui is currently loading and the load-options shall be greyed out ...
SUMOTime getCurrentSimTime() const
get current simulation time (pure virtual but we don't need it)
GUICompleteSchemeStorage gSchemeStorage
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
hot key <F4> set demand mode in NETEDIT
FXMenuCommand * optionMenus
FXMenuCommand for open option menus.
void enableSaveAdditionalsMenu()
enable save additionals
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
send when a warning occured
static std::string clipped
long onCmdNewNetwork(FXObject *, FXSelector, void *)
FXEX::FXThreadEvent myLoadThreadEvent
io-event with the load-thread
FXMenuCommand * shapeMode
menu command for shape mode
static void resetFont()
to be called when the font context is invalidated
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
long onCmdToogleGrid(FXObject *, FXSelector, void *)
called if the user press key combination Ctrl + G to toogle grid
FXMenuCommand * saveDemandElementsAs
FXMenuCommand for enable or disable save demand elements as.
void abortOperation(bool clearSelection=true)
abort current edition operation
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
void setStatusBarText(const std::string &statusBarText)
set text of the statusBar
void appendMsg(GUIEventType eType, const std::string &msg)
Adds new text to the window.
void resetWritable()
Resets all options to be writeable.
long onCmdBackspace(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits backspace
long onCmdToogleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toogle hide non inspected demand elements
GNEUndoList * getUndoList()
get pointer to undoList
FXMenuCommand * routeMode
menu command for route mode
long onCmdReload(FXObject *, FXSelector, void *)
called when the command/FXCall reload is executed
void create()
Creates the widget.
Reload the previously loaded simulation.
void closeAllWindows()
this method closes all windows and deletes the current simulation */
FXMenuCommand * cleanRoutes
FXMenuCommand for clean routes without vehicles.
long onCmdToogleHideShapes(FXObject *, FXSelector, void *)
toogle hide shapes in super mode demand
FXMenuCommand * cleanJunctions
FXMenuCommand for clean junctions without edges.
long onCmdSaveAdditionals(FXObject *, FXSelector, void *)
called when the command/FXCall save additionals is executed
FXMenuPane * myFileMenuAdditionals
const std::string & isUndoRedoEnabled() const
check if undo-redo is enabled
void hotkeyBackSpace()
handle backspace keypress
hot key <Backspace> remove last sub-operation
void buildLocateMenuCommands(FXMenuPane *editMenu)
build menu commands
GUIMessageWindow * myMessageWindow
A window to display messages, warnings and error in.
static bool isReadable(std::string path)
Checks whether the given file is readable.
void enableSaveDemandElementsMenu()
enable save demand elements
void update() const
Mark the entire GNEViewNet to be repainted later.
long onCmdToogleChainEdges(FXObject *, FXSelector, void *)
toogle chain edges
The main window of the Netedit.
EditMenuCommands myEditMenuCommands
Edit Menu Commands.
long computeJunctionWithVolatileOptions()
called if the user selects Processing->compute junctions with volatile options
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
static bool endsWith(const std::string &str, const std::string suffix)
Checks whether a given string ends with the suffix.
long onCmdToogleMoveElevation(FXObject *, FXSelector, void *)
toogle move elevation
#define GUIDesignSplitterMDI
MDI Splitter.
void hotkeyFocusFrame()
handle focus frame keypress
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
long onCmdClearMsgWindow(FXObject *, FXSelector, void *)
called when the command/FXCall clear message windows is executed
Locate addtional structure - button.
void loadConfigOrNet(const std::string &file, bool isNet, bool useStartupOptions, bool newNet=false)
begins the loading of a netconvert configuration or a a network
long onCmdToogleChangeAllPhases(FXObject *, FXSelector, void *)
toogle change all phases
void create()
Creates the main window (required by FOX)
FXMenuCommand * stopMode
menu command for stop mode
bool hadDependentBuild
check if had dependent build
hotkey for mode editing connection prohibitions AND person types
FXMenuCommand * createEdgeMode
menu command for create edge
DemandMenuCommands demandMenuCommands
Demand Menu Commands.
clean invalid crossings in network mode and demand elements in demand mode
FXMenuCommand * saveDemandElements
FXMenuCommand for enable or disable save demand elements.
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle select edges
long onUpdRedo(FXObject *obj, FXSelector sel, void *ptr)
called when the update/FXCall redo is executed
GNEViewParent * getViewParent() const
get the net object
double y() const
Returns the y-position.
long onCmdSaveTLSPrograms(FXObject *, FXSelector, void *)
called when the command/FXCall save TLSPrograms is executed
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
static void initIcons(FXApp *a)
Initiate GUIIconSubSys.
GNEUndoList * myUndoList
the one and only undo list
static void resetTextures()
Reset textures.
long onCmdOpenSUMOGUI(FXObject *sender, FXSelector sel, void *ptr)
called if the user hints ctrl + T
void registerMsgHandlers()
register message handlers
long onCmdSetMode(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits an edit-mode hotkey
hot key <F12> focus upper element of current frame
void buildNetworkMenuCommands(FXMenuPane *editMenu)
build menu commands
void handleEvent_NetworkLoaded(GUIEvent *e)
handle event of type Network loaded
hotkey for mode deleting things
#define GUIDesignStatusBar
design used in status bar
FXMenuCommand * TAZMode
menu command for TAZ mode
bool continueWithUnsavedAdditionalChanges()
warns about unsaved changes in additionals and gives the user the option to abort ...
static void initCursors(FXApp *a)
Initiate GUICursorSubSys.
double x() const
Returns the x-position.
FXMenuCommand * TLSMode
menu command for TLS Mode
static void buildNETEDITAccelerators(GNEApplicationWindow *GNEApp)
build NETEDIT Accelerators
send when a debug occured
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 */
LocateMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call ...
#define GUIDesignToolBarGrip
design for toolbar grip (used to change the position of toolbar with mouse)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when a key is released
long onCmdProcessButton(FXObject *, FXSelector sel, void *)
called when user press a process button (or a shortcut)
#define GUIDesignSplitter
void getVisibleNetworkMenuCommands(std::vector< FXMenuCheck *> &commands) const
get visible network menu commands
Load file with TLS Programs.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
hotkey for mode editing crossing AND routes
Editor for the list of chosen objects.
bool continueWithUnsavedChanges()
warns about unsaved changes and gives the user the option to abort
FXGLVisual * myGLVisual
The gl-visual used.
long onCmdEditViewScheme(FXObject *, FXSelector, void *)
Called on menu Edit->Visualization.
long onCmdOpenForeign(FXObject *, FXSelector, void *)
called when the command/FXCall open foreign is executed
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
long onCmdSaveNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall save network is executed
long onCmdToogleShowConnections(FXObject *, FXSelector, void *)
toogle show connections
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 buildProcessingMenuCommands(FXMenuPane *editMenu)
build menu commands
hot key <DEL> delete selections or elements
long onCmdAbout(FXObject *, FXSelector, void *)
called when the command/FXCall show about dialog is executed
Open current network in SUMO or in NETEDIT.
void clearSelectedEdges()
clear current TAZ children
bool cleanInvalidCrossings(GNEUndoList *undoList)
clear invalid crossings
FXString gCurrentFolder
The folder used as last.
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
FXMenuCommand * saveTLSPrograms
FXMenuCommand for enable or disable save additionals.
hotkey for mode editing additionals AND stops
long onUpdNeedsNetwork(FXObject *, FXSelector, void *)
called when the update/FXCall needs network is executed
struct for edit menu commands
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
ProcessingMenuCommands(GNEApplicationWindow *GNEApp)
constructor
#define GUIDesignToolBar
design for default toolbar
std::string myFile
the name of the loaded file
const std::vector< TAZCurrent::TAZEdge > & getEdgeAndTAZChildrenSelected() const
get map with edge and TAZChildren
DemandMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
long onLoadThreadEvent(FXObject *, FXSelector, void *)
called when the command/FXCall load thread is executed
static void resetLoaded()
resets loaded location elements
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
void unregisterMsgHandlers()
unregister message handlers
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
FXMenuCommand * inspectMode
menu command for inspect mode
void set(double x, double y)
set positions x and y
FXMenuCommand * crossingMode
menu command for crossing mode
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
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.
void updateControls()
update control contents after undo/redo or recompute
void redo()
redo the last command group
FXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
FXMenuCommand * editViewPort
FXMenuCommand for edit view port.
NetworkMenuCommands networkMenuCommands
Network Menu Commands.
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
FXMenuCommand * clearInvalidDemandElements
FXMenuCommand for clear invalid demand elements.
compute Network in network mode and Demand elements in demand mode
ToolbarsGrip myToolbarsGrip
Toolbars Grip.
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
void cleanInvalidDemandElements(GNEUndoList *undoList)
clean invalid demand elements
long onCmdEditChosen(FXObject *, FXSelector, void *)
called when the command/FXCall edit chosen is executed
void updateControls()
update control contents after undo/redo or recompute
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc..)
void addDecals(const std::vector< Decal > &decals)
add decals
GNENet * myNet
the loaded net
FXMenuCommand * personTypeMode
menu command for person type mode
long onUpdReload(FXObject *, FXSelector, void *)
called when the update/FXCall reload is executed
#define WRITE_WARNING(msg)
A single child window which contains a view of the simulation area.
void undo()
undo the last command group
void enableUndoRedo()
disable undo-redo
bool isDemandElementsSaved() const
check if demand elements are saved
void saveTLSPrograms(const std::string &filename)
save TLS Programs elements of the network
Loads a file previously loaded.
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
static OptionsCont & getOptions()
Retrieves the options.
FXMenuCommand * joinJunctions
FXMenuCommand for join selected junctions.
long onCmdHelp(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Documentation
The application's "About" - dialog.
const GNEViewNetHelper::CommonViewOptions & getCommonViewOptions() const
get Common view options
void addSeparator()
Adds a a separator to this log window.
void buildDemandMenuCommands(FXMenuPane *editMenu)
build menu commands
void p_clear()
clears the undo list (implies abort)
FXMenuCommand * joinRoutes
FXMenuCommand for join routes.
long onClipboardRequest(FXObject *sender, FXSelector sel, void *ptr)
called when the command/FXCall clipboard request is executed
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
void saveViewport(const double x, const double y, const double z, const double rot)
Makes the given viewport the default.
static void setDefaultOptions(OptionsCont &oc)
sets required options for proper functioning
void disableUndoRedo(const std::string &reason)
disable undo-redo giving a string with the reason
void disableSaveAdditionalsMenu()
disable save additionals
void joinRoutes(GNEUndoList *undoList)
join routes
FXHorizontalFrame * myCartesianFrame
FileMenuCommands myFileMenuCommands
File Menu Commands.
FXDEFMAP(GNEApplicationWindow) GNEApplicationWindowMap[]
long onCmdSaveTLSProgramsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save TLSPrograms as is executed
FXMenuPane * myProcessingMenu
long onCmdSaveAdditionalsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save additionals as is executed
const std::string & getMsg() const
Returns the message.
void hideDemandProcessingMenuCommands()
show demand processing menu commands
static FXint fxexecute(FXString link)
long onCmdEditViewport(FXObject *, FXSelector, void *)
Called on menu Edit->Viewport.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
long onCmdOptions(FXObject *, FXSelector, void *)
called if the user selects Processing->Configure Options
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
FXMenuPane * myFileMenuTLS
FXMenuPane * myWindowsMenu
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
static void close()
close GUITextureSubSys
GNEUndoList * getUndoList() const
get the undoList object
void showDemandMenuCommands()
show all menu commands
NetworkMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
void updateSuperModeMenuCommands(int supermode)
update FXMenuCommands
ProcessingMenuCommands myProcessingMenuCommands
Edit Menu Commands.
Locate polygons - button.
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
FXMenuCommand * openInSUMOGUI
FXMenuCommand for open in SUMO GUI.
GNEApplicationWindow()
FOX needs this for static members.
hotkey for mode connecting lanes
SupermodeCommands(GNEApplicationWindow *GNEApp)
constructor
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
FXSplitter * myMainSplitter
The splitter that divides the main window into view and the log window.
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
Save Additional Elements.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static unsigned long runHiddenCommand(const std::string &cmd)
run a shell command without popping up any windows (particuarly on win32)
long onCmdOpenRecent(FXObject *, FXSelector, void *)
called when the command/FXCall open recent is executed
long onCmdOpenNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall open network is executed
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
FXGLCanvas * getBuildGLCanvas() const
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
void hideSupermodeCommands()
hide all menu commands
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
Supermode currentSupermode
the current supermode
bool joinSelectedJunctions(GNEUndoList *undoList)
join selected junctions
void showSupermodeCommands()
show all menu commands
void fillMenuBar()
Builds the menu bar.
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
long onCmdToogleHideConnections(FXObject *, FXSelector, void *)
toogle hide connections
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Open viewport editor - button.
long onCmdToogleAutoOppositeEdge(FXObject *, FXSelector, void *)
toogle autoOpposite edge
int getNumberOfDemandElements(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of demand elements of the net.
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
FXMenuCommand * computeNetwork
FXMenuCommand * saveAdditionalsAs
FXMenuCommand for enable or disable save additionals As.
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
GUIPerspectiveChanger & getChanger() const
get changer
long onCmdRedo(FXObject *, FXSelector, void *)
#define GUIDesignToolBarRaisedNext
design for first toolbar shell positioned in the next position of dock
void getVisibleCommonMenuCommands(std::vector< FXMenuCheck *> &commands) const
get visible common menu commands
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) ...
hotkey for mode moving element
Toogle Gaming mode in SUMO and grid in NETEDIT.
long onCmdToogleEditOptions(FXObject *, FXSelector, void *)
called if the user press key combination Alt + <0-9>
bool isAdditionalsSaved() const
check if additionals are saved
long onCmdSaveAsPlainXML(FXObject *, FXSelector, void *)
called when the command/FXCall save as plain xml is executed
void save(OptionsCont &oc)
save the network
void cleanUnusedRoutes(GNEUndoList *undoList)
clean unused routes
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
called when the command/FXCall open configuration is executed
static bool checkOptions()
checks shared options and sets StdDefs
void showDemandProcessingMenuCommands()
show demand processing menu commands
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
std::string mySettingsFile
the name of the settings file to load
long onCmdOpenAdditionals(FXObject *, FXSelector, void *)
called when the command/FXCall open additionals is executed
double getTrackerInterval() const
get current tracker interval (pure virtual but we don't need it)
FXMenuCommand * redoLastChange
FXMenuCommand for redo last change.
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
void hideNetworkMenuCommands()
hide all menu commands
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
long onCmdLocate(FXObject *, FXSelector, void *)
called when the command/FXCall locate is executed
#define GUIDesignToolbarMenuBarNetedit
design for top toolbar (file, edit, processing...) used only in netedit (due supermodes buttons) ...
void setTarget(FXObject *tgt)
set the target
long onCmdUndo(FXObject *, FXSelector, void *)
called when user press Ctrl+Z
FXCursor * getDefaultCursor()
get default cursor
clean junctions without edges in network mode and unused routes in demand mode
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
hotkey for mode inspecting object attributes
Start the simulation in SUMO and open Additionals Elemements in NETEDIT.
long onCmdToogleShowGrid(FXObject *, FXSelector, void *)
toogle show grid
std::vector< GUIGlChildWindow * > myGLWindows
long p_onUpdRedo(FXObject *, FXSelector, void *)
event after Redo
void buildSupermodeCommands(FXMenuPane *editMenu)
build menu commands
GNEViewNet * myViewNet
pointer to current view net
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
long onUpdSaveAdditionals(FXObject *, FXSelector, void *)
called when the update/FXCall save additionals is executed
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
Open view editor - button.
hot key <ENTER> accept current operation
long onUpdUndo(FXObject *obj, FXSelector sel, void *ptr)
called when the update/FXCall undo is executed
FileMenuCommands(GNEApplicationWindow *GNEApp)
constructor
FXMenuCommand * connectMode
menu command for connect mode
~GNEApplicationWindow()
Destructor.
save network as plain XML
bool continueWithUnsavedDemandElementChanges()
warns about unsaved changes in demand elements and gives the user the option to abort ...
long onUpdOpen(FXObject *, FXSelector, void *)
called when the command/FXCall on update open executed
GNELoadThread * myLoadThread
the thread that loads the network
FXStatusBar * myStatusbar
The status bar.
long onCmdEnter(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits enter
virtual void showViewportEditor()
show viewport editor
long onCmdToogleShowJunctionBubbles(FXObject *, FXSelector, void *)
toogle show junction bubbles
bool myViewportFromRegistry
whether loading viewport from registry
FXMenuCommand * undoLastChange
FXMenuCommand for undo last change.
hotkey for mode adding edges
long onCmdFocusFrame(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits f
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
long onCmdSaveDemandElements(FXObject *, FXSelector, void *)
called when the command/FXCall save demand elements is executed
FXMenuCommand * moveMode
menu command for move mode
LocateMenuCommands myLocateMenuCommands
Locate Menu Commands.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
send when a gldebug occured
hotkey for mode create vehicles
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
long onCmdSetSuperMode(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits an edit-supermode hotkey
void setSelector(FXSelector sel)
set the selector
FXMenuCheck * menuCheckShowConnections
menu check to show connections
const EditMenuCommands * myEditMenuCommandsParent
reference to EditMenuCommands
void unSet(const std::string &name, bool failOnNonExistant=true) const
Marks the option as unset.
long onCmdDel(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits del
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
void loadOptionOnStartup()
load net on startup
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...
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
send when a message occured
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
const EditMenuCommands * myEditMenuCommandsParent
reference to EditMenuCommands
static void close()
close GUIIconSubSys
void showNetworkMenuCommands()
show all menu commands
void requiereSaveNet(bool value)
inform that net has to be saved
Demanding mode (Routes, Vehicles etc..)
FXMenuCommand * additionalMode
menu command for additional mode
FXHorizontalFrame * myGeoFrame
SupermodeCommands mySupermodeCommands
Supermode Commands.
A storage for options typed value containers)
void disableSaveDemandElementsMenu()
disable save demand elements
hotkey for mode selecting objects
void computeDemandElements(GNEApplicationWindow *window)
compute demand elements param[in] window The window to inform about delay
FXMenuPane * myFileMenuDemandElements
long onCmdClose(FXObject *, FXSelector, void *)
called when the command/FXCall close is executed
long onCmdOpenTLSPrograms(FXObject *, FXSelector, void *)
called when the command/FXCall open additionals is executed
send when a error occured
FXMenuCommand * editViewScheme
FXMenuCommand for edit view scheme.
FXMDIClient * myMDIClient
The multi view panel.
send when a simulation has been loaded
Supermode
enum for supermodes
Stop the simulation in SUMO and save network in NETEDIT.
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
FXMenuCommand * deleteMode
menu command for delete mode
FXMenuCommand * toogleGrid
FXMenuCommand for toogle grid.
void handleEvent_Message(GUIEvent *e)
hanlde event of type message
hotkey for mode creating polygons
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
long onCmdToogleShowDemandElements(FXObject *, FXSelector, void *)
#define GUIDesignHorizontalFrameStatusBar
Horizontal frame used in status bar.
FXMenuCommand * computeDemand
FXMenuCommand * saveAdditionals
FXMenuCommand for enable or disable save additionals.
long onCmdAbort(FXObject *sender, FXSelector sel, void *ptr)
called if the user hits esc
void saveDemandElements(const std::string &filename)
save demand element elements of the network
hot key <F1> open online documentation
FXMenuCommand * demandMode
FXMenuCommand for demand supermode.
hotkey for mode editing TAZ
long onCmdSaveJoined(FXObject *, FXSelector, void *)
called when the command/FXCall save joined is executed
An XML-handler for visualisation schemes.
long onUpdSaveDemandElements(FXObject *, FXSelector, void *)
called when the update/FXCall save demand elements is executed
const FXString myTitlePrefix
the prefix for the window title
join selected junctions in network mode and normalice demand element ids in demand mode ...
static std::string addExtension(const std::string &path, const std::string &extension)
Add an extension to the given file path.
GUIEventType getOwnType() const
returns the event type
void getVisibleDemandMenuCommands(std::vector< FXMenuCheck *> &commands) const
get visible demand menu commands
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
virtual void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children) ...
static FXString getTitleText(const FXString &appname, FXString filename="")
Returns the title text in dependance to an optional file name.
FXMenuCommand * personPlanMode
menu command for person plan mode
long onCmdSaveDemandElementsAs(FXObject *, FXSelector, void *)
called when the command/FXCall save demand elements as is executed
GNENet * myNet
we are responsible for the net
hot key <ESC> abort current edit operation
FXMenuCommand * computeNetworkVolatile
FXMenuCommand for compute network with volatile options.
void dependentBuild()
build dependent
FXMenuCommand * vehicleTypeMode
menu command for vehicle type mode
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
void clear()
Clears the window.
void showViewschemeEditor()
show viewsscheme editor
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
EditMenuCommands(GNEApplicationWindow *GNEApp)
constructor
long onCmdOpenDemandElements(FXObject *, FXSelector, void *)
called when the command/FXCall open demand is executed
FXMenuCommand * selectMode
menu command for select mode
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void storeWindowSizeAndPos()
record window position and size in registry
void hotkeyDel()
handle del keypress
#define WRITE_MESSAGE(msg)
compute junctions with volatile options
Network mode (Edges, junctions, etc..)
hot key <F3> set network mode in NETEDIT
FXMenuCommand * prohibitionMode
menu command for prohibition mode
static void initTextures(FXApp *a)
Initiate GUITextureSubSys for textures.
std::string myUndoRedoListEnabled
string to check if undo/redo list is enabled (a String is used to keep the disabling reason) ...
GUISelectedStorage gSelected
A global holder of selected objects.
void hotkeyEnter()
handle enter keypress
long onCmdSaveAsNetwork(FXObject *, FXSelector, void *)
called when the command/FXCall save network as is executed
A logging window for the gui.
hot key <F2> open about dialog
long onCmdToogleWarnAboutMerge(FXObject *, FXSelector, void *)
toogle warn for merge
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
FXMenuCommand * networkMode
FXMenuCommand for network supermode.
void saveAdditionals(const std::string &filename)
save additional elements of the network
FXMenuCommand * vehicleMode
menu command for vehicle mode
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
static void fillOptions(OptionsCont &oc)
clears and initializes the OptionsCont
FXMenuPane * myFileMenu
the submenus
FXMenuCommand * personMode
menu command for person mode
void buildEditMenuCommands(FXMenuPane *editMenu)
build edit menu commands
bool isNetSaved() const
return if net has to be saved
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when a key is pressed
long onCmdToogleExtendSelection(FXObject *, FXSelector, void *)
toogle extend selection
long onUpdSaveNetwork(FXObject *, FXSelector, void *)
called when the update/FXCall save network is executed
void showNetworkProcessingMenuCommands()
show network processing menu commands
FXMenuPane * myLocatorMenu
GNEViewNet * getViewNet() const
get view net
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
void hideNetworkProcessingMenuCommands()
show network processing menu commands
long p_onUpdUndo(FXObject *, FXSelector, void *)