Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEApplicationWindowHelper.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// The main window of Netedit (adapted from GUIApplicationWindow)
19/****************************************************************************/
20
27#include <netedit/templates.h>
33#include <xercesc/parsers/SAXParser.hpp>
34#include <xercesc/sax/AttributeList.hpp>
35#include <xercesc/sax/HandlerBase.hpp>
36#include <xercesc/sax/SAXException.hpp>
37#include <xercesc/sax/SAXParseException.hpp>
38
39#include <regex>
40
42#include "GNEViewNet.h"
43#include "GNENet.h"
44
45// ===========================================================================
46// GNEApplicationWindowHelper::ToolbarsGrip method definitions
47// ===========================================================================
48
52
53
54void
56 // build menu bar (for File, edit, processing...) using specify design
57 myPythonToolBarShellMenu = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
58 menu = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellMenu, GUIDesignToolbarMenuBarNetedit);
59 // declare toolbar grip for menu bar
60 new FXToolBarGrip(menu, menu, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
61}
62
63
64void
66 // build toolbar shells
67 myPythonToolBarShellSuperModes = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
68 myPythonToolBarShellSaveElements = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
69 myPythonToolBarShellTimeFormat = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
70 myPythonToolBarShellNavigation = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
71 myPythonToolBarShellModes = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
72 myPythonToolBarShellIntervalBar = new FXToolBarShell(myGNEApp, GUIDesignToolBar);
73 // build menu bars
74 superModes = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellSuperModes, GUIDesignToolBarRaisedSupermodes);
75 saveElements = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellSaveElements, GUIDesignToolBarRaisedNext);
76 timeSwitch = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellTimeFormat, GUIDesignToolBarRaisedSame);
77 navigation = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellNavigation, GUIDesignToolBarRaisedSame);
78 if (OptionsCont::getOptions().getBool("gui-testing")) {
79 modes = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellModes, GUIDesignToolBarRaisedNext);
80 } else {
81 modes = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellModes, GUIDesignToolBarRaisedSame);
82 }
83 intervalBar = new FXMenuBar(myGNEApp->getTopDock(), myPythonToolBarShellIntervalBar, GUIDesignToolBarRaisedNext);
84 // build FXToolBarGrip
85 new FXToolBarGrip(superModes, superModes, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
86 new FXToolBarGrip(saveElements, saveElements, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
87 new FXToolBarGrip(timeSwitch, timeSwitch, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
88 new FXToolBarGrip(navigation, navigation, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
89 new FXToolBarGrip(modes, modes, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
90 new FXToolBarGrip(intervalBar, intervalBar, FXMenuBar::ID_TOOLBARGRIP, GUIDesignToolBarGrip);
91 // create menu bars
92 superModes->create();
93 saveElements->create();
94 timeSwitch->create();
95 navigation->create();
96 modes->create();
97 intervalBar->create();
98 // create toolbar shells
99 myPythonToolBarShellSuperModes->create();
100 myPythonToolBarShellSaveElements->create();
101 myPythonToolBarShellTimeFormat->create();
102 myPythonToolBarShellNavigation->create();
103 myPythonToolBarShellModes->create();
104 myPythonToolBarShellIntervalBar->create();
105 // recalc top dop after creating elements
106 myGNEApp->getTopDock()->recalc();
107}
108
109
110void
112 // delete Menu bars
113 delete superModes;
114 delete saveElements;
115 delete timeSwitch;
116 delete navigation;
117 delete modes;
118 delete intervalBar;
119 // also delete toolbar shells to avoid floating windows
120 delete myPythonToolBarShellSuperModes;
121 delete myPythonToolBarShellSaveElements;
122 delete myPythonToolBarShellTimeFormat;
123 delete myPythonToolBarShellNavigation;
124 delete myPythonToolBarShellModes;
125 delete myPythonToolBarShellIntervalBar;
126 // recalc top dop after deleting elements
127 myGNEApp->getTopDock()->recalc();
128}
129
130// ===========================================================================
131// GNEApplicationWindowHelper::MenuBarFile method definitions
132// ===========================================================================
133
135 myRecentNetworks(GNEApp->getApp(), TL("nets")),
136 myRecentConfigs(GNEApp->getApp(), TL("configs")),
137 myGNEApp(GNEApp) {
138}
139
140
141void
142GNEApplicationWindowHelper::MenuBarFile::buildRecentNetworkFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentNetworkFiles) {
143 // for whatever reason, sonar complains in the next line that sep1 may leak, but fox does the cleanup
144 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_1);
145 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_2);
146 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_3);
147 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_4);
148 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_5);
149 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_6);
150 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_7);
151 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_8);
152 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_9);
153 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentNetworkFiles, "", &myRecentNetworks, FXRecentFiles::ID_FILE_10);
154 new FXMenuSeparator(fileMenuRecentNetworkFiles); // NOSONAR, Fox does the cleanup
155 GUIDesigns::buildFXMenuCommand(fileMenuRecentNetworkFiles, TL("Cl&ear Recent Networks"), nullptr, &myRecentNetworks, FXRecentFiles::ID_CLEAR);
156 GUIDesigns::buildFXMenuCommand(fileMenuRecentNetworkFiles, TL("No Recent Networks"), nullptr, &myRecentNetworks, MFXRecentNetworks::ID_NOFILES);
157 // set target
158 myRecentNetworks.setTarget(myGNEApp);
159 myRecentNetworks.setSelector(MID_RECENTFILE);
160 new FXMenuCascade(fileMenu, TL("Recent Networks"), nullptr, fileMenuRecentNetworkFiles);
161}
162
163
164void
165GNEApplicationWindowHelper::MenuBarFile::buildRecentConfigFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentConfigFiles) {
166 // for whatever reason, sonar complains in the next line that sep1 may leak, but fox does the cleanup
167 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_1);
168 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_2);
169 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_3);
170 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_4);
171 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_5);
172 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_6);
173 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_7);
174 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_8);
175 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_9);
176 GUIDesigns::buildFXMenuCommandRecentFile(fileMenuRecentConfigFiles, "", &myRecentConfigs, FXRecentFiles::ID_FILE_10);
177 new FXMenuSeparator(fileMenuRecentConfigFiles); // NOSONAR, Fox does the cleanup
178 GUIDesigns::buildFXMenuCommand(fileMenuRecentConfigFiles, TL("Cl&ear Recent Configs"), nullptr, &myRecentConfigs, FXRecentFiles::ID_CLEAR);
179 GUIDesigns::buildFXMenuCommand(fileMenuRecentConfigFiles, TL("No Recent Configs"), nullptr, &myRecentConfigs, MFXRecentNetworks::ID_NOFILES);
180 // set target
181 myRecentConfigs.setTarget(myGNEApp);
182 myRecentConfigs.setSelector(MID_RECENTFILE);
183 new FXMenuCascade(fileMenu, TL("Recent Configs"), nullptr, fileMenuRecentConfigFiles);
184}
185
186// ---------------------------------------------------------------------------
187// GNEApplicationWindowHelper::FileMenuCommands - methods
188// ---------------------------------------------------------------------------
189
193
194
195void
196GNEApplicationWindowHelper::FileMenuCommands::buildFileMenuCommands(FXMenuPane* fileMenu, FXMenuPane* fileMenuNeteditConfig,
197 FXMenuPane* fileMenuSumoConfig, FXMenuPane* fileMenuTLS, FXMenuPane* fileMenuEdgeTypes, FXMenuPane* fileMenuAdditionals,
198 FXMenuPane* fileMenuDemandElements, FXMenuPane* fileMenuDataElements, FXMenuPane* fileMenuMeanDataElements) {
199
201 TL("New Network"), "Ctrl+N", TL("Create a new network."),
203
205 TL("New Window"), "Ctrl+Shift+N", TL("Open a new netedit window."),
206 nullptr, myGNEApp, MID_HOTKEY_CTRL_SHIFT_N_NEWWINDOW);
207
209 TL("Generate Network"), "", TL("Create network using netgenerate."),
211
212 // load sumo/netedit configs
213 new FXMenuSeparator(fileMenu);
214
216 TL("Load Netedit config..."), "Ctrl+E", TL("Load a netedit configuration file."),
218
220 TL("Load Sumo config..."), "Ctrl+M", TL("Load a SUMO configuration file."),
222
223 // load networks
224 new FXMenuSeparator(fileMenu);
225
227 TL("Open Network..."), "Ctrl+O", TL("Open a SUMO network."),
229
231 TL("Open Netconvert Configuration..."), "Ctrl+Shift+O", TL("Open a configuration file with NETCONVERT options."),
233
235 TL("Import Foreign Network..."), "", TL("Import a foreign network such as OSM."),
237
238 // save networks
239 new FXMenuSeparator(fileMenu);
240
242 TL("Save Network"), "Ctrl+S", TL("Save the network."),
244
246 TL("Save Network As..."), "", TL("Save the network to another file."),
248
250 TL("Save Plain XML..."), "Ctrl+L", TL("Save a plain XML representation of the network."),
252
254 TL("Save Joined Junctions..."), "", TL("Save log of joined junctions (allows reproduction of joins)."),
256
257 // reload
258 new FXMenuSeparator(fileMenu);
259
261 TL("Reload"), "Ctrl+R", TL("Reload the network."),
263
265 TL("Reload Network"), "", TL("Reload the network."),
267
268 new FXMenuSeparator(fileMenu);
269
270 // create netedit config menu options
271 buildNeteditConfigSection(fileMenuNeteditConfig);
272 myNeteditConfigMenuCascade = new FXMenuCascade(fileMenu, TL("Netedit Config"), GUIIconSubSys::getIcon(GUIIcon::NETEDIT_MINI), fileMenuNeteditConfig);
273
274 // create SumoConfig menu options
275 buildSumoConfigSection(fileMenuSumoConfig);
276 mySumoConfigMenuCascade = new FXMenuCascade(fileMenu, TL("Sumo Config"), GUIIconSubSys::getIcon(GUIIcon::SUMO_MINI), fileMenuSumoConfig);
277
278 // create TLS menu options
279 buildTrafficLightSection(fileMenuTLS);
280 myTLSMenuCascade = new FXMenuCascade(fileMenu, TL("Traffic Lights"), GUIIconSubSys::getIcon(GUIIcon::MODETLS), fileMenuTLS);
281
282 // create edgeTypes menu options
283 buildEdgeTypeSection(fileMenuEdgeTypes);
284 myEdgeTypesMenuCascade = new FXMenuCascade(fileMenu, TL("Edge Types"), GUIIconSubSys::getIcon(GUIIcon::MODECREATEEDGE), fileMenuEdgeTypes);
285
286 // create Additionals menu options
287 buildAdditionalSection(fileMenuAdditionals);
288 myAdditionalMenuCascade = new FXMenuCascade(fileMenu, TL("Additionals and Shapes"), GUIIconSubSys::getIcon(GUIIcon::MODEADDITIONAL), fileMenuAdditionals);
289
290 // create DemandElements menu options
291 buildDemandSection(fileMenuDemandElements);
292 myDemandMenuCascade = new FXMenuCascade(fileMenu, TL("Demand Elements"), GUIIconSubSys::getIcon(GUIIcon::SUPERMODEDEMAND), fileMenuDemandElements);
293
294 // create DataElements menu options
295 buildDataSection(fileMenuDataElements);
296 myDataMenuCascade = new FXMenuCascade(fileMenu, TL("Data Elements"), GUIIconSubSys::getIcon(GUIIcon::SUPERMODEDATA), fileMenuDataElements);
297
298 // create MeanDatas menu options
299 buildMeanDataSection(fileMenuMeanDataElements);
300 myMeanDataMenuCascade = new FXMenuCascade(fileMenu, TL("MeanData Elements"), GUIIconSubSys::getIcon(GUIIcon::MODEMEANDATA), fileMenuMeanDataElements);
301
302 // add checkBox for quick load
303 new FXMenuSeparator(fileMenu);
304 menuCheckAllowUndoRedoLoading = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
305 TL("Allow undoing element loading"), "", TL("Allow to undo loading of elements (Slow if a lot of elements are loaded)"),
307 // set default value
308 menuCheckAllowUndoRedoLoading->setCheck(myGNEApp->getApp()->reg().readBoolEntry("NETEDIT", "AllowUndoRedoLoading", true));
309
310 // close network
311 new FXMenuSeparator(fileMenu);
313 TL("Close"), "Ctrl+W", TL("Close the network."),
315}
316
317
318void
320 mySumoConfigMenuCascade->enable();
321 myNeteditConfigMenuCascade->enable();
322 myTLSMenuCascade->enable();
323 myEdgeTypesMenuCascade->enable();
324 myAdditionalMenuCascade->enable();
325 myDemandMenuCascade->enable();
326 myDataMenuCascade->enable();
327 myMeanDataMenuCascade->enable();
328}
329
330
331void
333 mySumoConfigMenuCascade->disable();
334 myNeteditConfigMenuCascade->disable();
335 myTLSMenuCascade->disable();
336 myEdgeTypesMenuCascade->disable();
337 myAdditionalMenuCascade->disable();
338 myDemandMenuCascade->disable();
339 myDataMenuCascade->disable();
340 myMeanDataMenuCascade->disable();
341}
342
343
344void
346 myTLSMenuCascade->show();
347 myDataMenuCascade->show();
348 myMeanDataMenuCascade->show();
349}
350
351
352void
354 myTLSMenuCascade->hide();
355 myDataMenuCascade->hide();
356 myMeanDataMenuCascade->hide();
357}
358
359
360void
363 TL("Save Netedit Config"), "Ctrl+Shift+E", TL("Save netedit configuration file."),
365
367 TL("Save Netedit Config As..."), "", TL("Save netedit configuration in a new file."),
369
370 new FXMenuSeparator(menuPane);
371
373 TL("Reload Netedit Config"), "", TL("Reload netedit configuration."),
375}
376
377
378void
381 TL("Save Sumo Config"), "Ctrl+Shift+S", TL("Save sumo configuration file."),
383
385 TL("Save Sumo Config As..."), "", TL("Save sumo configuration in a new file."),
387
388 new FXMenuSeparator(menuPane);
389
391 TL("Reload Sumo Config"), "", TL("Reload sumo configuration."),
393}
394
395
396void
399 TL("Load TLS Programs..."), "Ctrl+K", TL("Load programs for traffic lights in the current net."),
401
402 new FXMenuSeparator(menuPane);
403
405 TL("Save TLS Programs"), "Ctrl+Shift+K", TL("Save all traffic light programs of the current network."),
407
409 TL("Save TLS Programs As..."), "", TL("Save all traffic light programs of the current network to another file."),
411
412 new FXMenuSeparator(menuPane);
413
415 TL("Reload TLS Programs"), "", TL("Reload TLS Programs."),
417}
418
419
420void
423 TL("Load Edge Types..."), "Ctrl+H", TL("Load edge types in the current net."),
425
426 new FXMenuSeparator(menuPane);
427
429 TL("Save Edge Types"), "Ctrl+Shift+H", TL("Save edge types of the current net."),
431
433 TL("Save Edge Types As..."), "", TL("Save edge types of the current net to another file."),
435
436 new FXMenuSeparator(menuPane);
437
439 TL("Reload edge types"), "", TL("Reload edge types."),
441}
442
443
444void
447 TL("Load Additionals..."), "Ctrl+A", TL("Load additionals and shapes."),
449
450 new FXMenuSeparator(menuPane);
451
453 TL("Save Additionals"), "Ctrl+Shift+A", TL("Save additionals and shapes."),
455
457 TL("Save Additionals As..."), "", TL("Save additional elements to another file."),
459
461 TL("Save JuPedSim Elements As..."), "", TL("Save JuPedSim elements in a separated file."),
463
464 new FXMenuSeparator(menuPane);
465
467 TL("Reload Additionals"), "", TL("Reload additionals."),
469}
470
471
472void
475 TL("Load Demand Elements..."), "Ctrl+D", TL("Load demand elements."),
477
478 new FXMenuSeparator(menuPane);
479
481 TL("Save Demand Elements"), "Ctrl+Shift+D", TL("Save demand elements."),
483
485 TL("Save Demand Elements As..."), "", TL("Save demand elements to another file."),
487
488 new FXMenuSeparator(menuPane);
489
491 TL("Reload Demand Elements"), "", TL("Reload demand elements."),
493}
494
495
496void
499 TL("Load Data Elements..."), "Ctrl+B", TL("Load data elements."),
501
502 new FXMenuSeparator(menuPane);
503
505 TL("Save Data Elements"), "Ctrl+Shift+B", TL("Save data elements."),
507
509 TL("Save Data Elements As..."), "", TL("Save data elements to another file."),
511
512 new FXMenuSeparator(menuPane);
513
515 TL("Reload Data Elements"), "", TL("Reload data elements."),
517}
518
519
520void
523 TL("Load MeanDatas..."), "", TL("Load meanDatas and shapes."),
525
526 new FXMenuSeparator(menuPane);
527
529 TL("Save MeanDatas"), "", TL("Save meanDatas and shapes."),
531
533 TL("Save MeanDatas As..."), "Ctrl+Shift+M", TL("Save meanData elements to another file."),
535
536 new FXMenuSeparator(menuPane);
537
539 TL("Reload MeanDatas"), "", TL("Reload meanDatas."),
541}
542
543// ---------------------------------------------------------------------------
544// GNEApplicationWindowHelper::ModesMenuCommands::CommonMenuCommands - methods
545// ---------------------------------------------------------------------------
546
548 myModesMenuCommandsParent(modesMenuCommandsParent) {
549}
550
551
552void
554 // build every FXMenuCommand giving it a shortcut
555 inspectMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
556 TL("&Inspect"), "I", TL("Inspect elements and change their attributes."),
557 GUIIconSubSys::getIcon(GUIIcon::MODEINSPECT), myModesMenuCommandsParent->myGNEApp, MID_HOTKEY_I_MODE_INSPECT);
558 deleteMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
559 TL("&Delete"), "D", TL("Delete elements."),
561 selectMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
562 TL("&Select"), "S", TL("Select elements."),
564}
565
566// ---------------------------------------------------------------------------
567// GNEApplicationWindowHelper::ModesMenuCommands::NetworkMenuCommands - methods
568// ---------------------------------------------------------------------------
569
571 myModesMenuCommandsParent(modesMenuCommandsParent) {
572}
573
574
575void
577 createEdgeMode->show();
578 moveMode->show();
579 connectMode->show();
580 prohibitionMode->show();
581 TLSMode->show();
582 additionalMode->show();
583 crossingMode->show();
584 TAZMode->show();
585 shapeMode->show();
586 wireMode->show();
587 decalMode->show();
588}
589
590
591void
593 createEdgeMode->hide();
594 moveMode->hide();
595 connectMode->hide();
596 prohibitionMode->hide();
597 TLSMode->hide();
598 additionalMode->hide();
599 crossingMode->hide();
600 TAZMode->hide();
601 shapeMode->hide();
602 wireMode->hide();
603 decalMode->hide();
604}
605
606
607void
609 // build every FXMenuCommand giving it a shortcut
610 moveMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
611 TL("&Move"), "M", TL("Move elements."),
612 GUIIconSubSys::getIcon(GUIIcon::MODEMOVE), myModesMenuCommandsParent->myGNEApp,
614 createEdgeMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
615 TL("&Edge"), "E", TL("Create junction and edges."),
616 GUIIconSubSys::getIcon(GUIIcon::MODECREATEEDGE), myModesMenuCommandsParent->myGNEApp,
618 TLSMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
619 TL("&Traffic light"), "T", TL("Modes traffic lights over junctions."),
620 GUIIconSubSys::getIcon(GUIIcon::MODETLS), myModesMenuCommandsParent->myGNEApp,
622 connectMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
623 TL("&Connection"), "C", TL("Modes connections between lanes."),
624 GUIIconSubSys::getIcon(GUIIcon::MODECONNECTION), myModesMenuCommandsParent->myGNEApp,
626 prohibitionMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
627 TL("Pro&hibition"), "H", TL("Modes connection prohibitions."),
628 GUIIconSubSys::getIcon(GUIIcon::MODEPROHIBITION), myModesMenuCommandsParent->myGNEApp,
630 crossingMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
631 TL("C&rossing"), "R", TL("Create crossings between edges."),
632 GUIIconSubSys::getIcon(GUIIcon::MODECROSSING), myModesMenuCommandsParent->myGNEApp,
634 additionalMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
635 TL("&Additional"), "A", TL("Create additional elements."),
636 GUIIconSubSys::getIcon(GUIIcon::MODEADDITIONAL), myModesMenuCommandsParent->myGNEApp,
638 wireMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
639 TL("&Wire"), "W", TL("Create wires."),
640 GUIIconSubSys::getIcon(GUIIcon::MODEWIRE), myModesMenuCommandsParent->myGNEApp,
642 TAZMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
643 TL("TA&Z"), "Z", TL("Create Traffic Assignment Zones."),
644 GUIIconSubSys::getIcon(GUIIcon::MODETAZ), myModesMenuCommandsParent->myGNEApp,
646 shapeMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
647 TL("&POI-Poly"), "P", TL("Create Points-Of-Interest and polygons."),
648 GUIIconSubSys::getIcon(GUIIcon::MODESHAPE), myModesMenuCommandsParent->myGNEApp,
650 decalMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
651 TL("Deca&ls"), "U", TL("Create decals."),
652 GUIIconSubSys::getIcon(GUIIcon::MODEDECAL), myModesMenuCommandsParent->myGNEApp,
654}
655
656// ---------------------------------------------------------------------------
657// GNEApplicationWindowHelper::ModesMenuCommands::DemandMenuCommands - methods
658// ---------------------------------------------------------------------------
659
661 myModesMenuCommandsParent(modesMenuCommandsParent) {
662}
663
664
665void
667 moveMode->show();
668 routeMode->show();
669 routeDistributionMode->show();
670 vehicleMode->show();
671 typeMode->show();
672 typeDistributionMode->show();
673 stopMode->show();
674 personMode->show();
675 personPlanMode->show();
676 containerMode->show();
677 containerPlanMode->show();
678}
679
680
681void
683 moveMode->hide();
684 routeMode->hide();
685 routeDistributionMode->hide();
686 vehicleMode->hide();
687 typeMode->hide();
688 typeDistributionMode->hide();
689 stopMode->hide();
690 personMode->hide();
691 personPlanMode->hide();
692 containerMode->hide();
693 containerPlanMode->hide();
694}
695
696
697void
699 // build every FXMenuCommand giving it a shortcut
700 moveMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
701 TL("&Move"), "M", TL("Move elements."),
702 GUIIconSubSys::getIcon(GUIIcon::MODEMOVE), myModesMenuCommandsParent->myGNEApp, MID_HOTKEY_M_MODE_MOVE_MEANDATA);
703 routeMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
704 TL("Route"), "R", TL("Create Routes."),
706 routeDistributionMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
707 TL("Route distribution"), "W", TL("Create and edit route distributions."),
708 GUIIconSubSys::getIcon(GUIIcon::MODEROUTEDISTRIBUTION), myModesMenuCommandsParent->myGNEApp,
710 vehicleMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
711 TL("Vehicle"), "V", TL("Create vehicles."),
712 GUIIconSubSys::getIcon(GUIIcon::MODEVEHICLE), myModesMenuCommandsParent->myGNEApp, MID_HOTKEY_V_MODE_VEHICLE);
713 typeMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
714 TL("Type"), "T", TL("Create types (vehicles, person and containers)."),
715 GUIIconSubSys::getIcon(GUIIcon::MODETYPE), myModesMenuCommandsParent->myGNEApp, MID_HOTKEY_T_MODE_TLS_TYPE);
716 typeDistributionMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
717 TL("TypeDistribution"), "U", TL("Create and edit type distributions."),
719 stopMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
720 TL("Stop"), "A", TL("Create stops."),
722 personMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
723 TL("Person"), "P", TL("Create persons."),
725 personPlanMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
726 TL("Person plan"), "L", TL("Create person plans."),
728 containerMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
729 TL("Container"), "C", TL("Create containers."),
731 containerPlanMode = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
732 TL("Container plan"), "H", TL("Create container plans."),
734}
735
736// ---------------------------------------------------------------------------
737// GNEApplicationWindowHelper::ModesMenuCommands::DataMenuCommands - methods
738// ---------------------------------------------------------------------------
739
741 myModesMenuCommandsParent(modesMenuCommandsParent) {
742}
743
744
745void
747 edgeData->show();
748 edgeRelData->show();
749 TAZRelData->show();
750 meanData->show();
751}
752
753
754void
756 edgeData->hide();
757 edgeRelData->hide();
758 TAZRelData->hide();
759 meanData->hide();
760}
761
762
763void
765 // build every FXMenuCommand giving it a shortcut
766 edgeData = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
767 TL("&EdgeData"), "E", TL("Create edgeData elements."),
769 edgeRelData = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
770 TL("Edge&Relation"), "R", TL("Create edgeRelation elements."),
772 TAZRelData = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
773 TL("TA&ZRelation"), "Z", TL("Create TAZRelation elements."),
775 meanData = GUIDesigns::buildFXMenuCommandShortcut(modesMenu,
776 TL("&MeanData"), "M", TL("Create MeanData edge/lanes."),
778}
779
780// ---------------------------------------------------------------------------
781// GNEApplicationWindowHelper::ModesMenuCommands - methods
782// ---------------------------------------------------------------------------
783
791
792
793void
795 commonMenuCommands.buildCommonMenuCommands(modesMenu);
796 // build Network modes commands and hide it
797 networkMenuCommands.buildNetworkMenuCommands(modesMenu);
798 networkMenuCommands.hideNetworkMenuCommands();
799 // build Demand Modes commands
800 demandMenuCommands.buildDemandMenuCommands(modesMenu);
801 demandMenuCommands.hideDemandMenuCommands();
802 // build Data Modes commands
803 dataMenuCommands.buildDataMenuCommands(modesMenu);
804 dataMenuCommands.hideDataMenuCommands();
805}
806
807
808void
810 if (supermode == Supermode::NETWORK) {
811 networkMenuCommands.showNetworkMenuCommands();
812 } else if (supermode == Supermode::DEMAND) {
813 demandMenuCommands.showDemandMenuCommands();
814 } else if (supermode == Supermode::DATA) {
815 dataMenuCommands.showDataMenuCommands();
816 }
817}
818
819
820void
822 if (supermode == Supermode::NETWORK) {
823 networkMenuCommands.connectMode->hide();
824 networkMenuCommands.TLSMode->hide();
825 networkMenuCommands.prohibitionMode->hide();
826 networkMenuCommands.wireMode->hide();
827 networkMenuCommands.decalMode->hide();
828 } else if (supermode == Supermode::DEMAND) {
829 demandMenuCommands.moveMode->hide();
830 demandMenuCommands.vehicleMode->hide();
831 demandMenuCommands.stopMode->hide();
832 demandMenuCommands.containerMode->hide();
833 demandMenuCommands.containerPlanMode->hide();
834 } else if (supermode == Supermode::DATA) {
835 dataMenuCommands.hideDataMenuCommands();
836 }
837}
838
839// ---------------------------------------------------------------------------
840// GNEApplicationWindowHelper::EditMenuCommands::NetworkViewOptions - methods
841// ---------------------------------------------------------------------------
842
846
847
848void
850 // create menu checks
851 menuCheckToggleGrid = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
852 TL("Show grid"), "Ctrl+G or Alt+1", "",
855
856 menuCheckToggleDrawJunctionShape = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
857 TL("Hide junction shape"), "Ctrl+J or Alt+2", "",
860
861 menuCheckDrawSpreadVehicles = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
862 TL("Draw vehicles spread in lane or in depart position"), "Alt+3", "",
865
866 menuCheckShowDemandElements = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
867 TL("Show demand elements"), "Alt+4", "",
870
871 menuCheckSelectEdges = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
872 TL("Clicking should target lanes"), "Alt+5", "",
875
876 menuCheckShowConnections = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
877 TL("Show connections over junctions"), "Alt+6", "",
880
881 menuCheckHideConnections = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
882 TL("Hide connections"), "Alt+7", "",
885
886 menuCheckShowAdditionalSubElements = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
887 TL("Show sub-additional elements"), "Alt+8", "",
890
891 menuCheckShowTAZElements = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
892 TL("Show TAZ elements"), "Alt+9", "",
895
896 menuCheckExtendSelection = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
897 TL("Selecting multiple edges automatically select their junctions"), "Alt+10", "",
900
901 menuCheckChangeAllPhases = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
902 TL("Clicking should apply state changes to all phases of TLS plan"), "Alt+5", "",
905
906 menuCheckWarnAboutMerge = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
907 TL("Ask for confirmation before merging junction"), "Alt+5", "",
910
911 menuCheckShowJunctionBubble = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
912 TL("Show bubbles over junctions shapes"), "Alt+6", "",
915
916 menuCheckMoveElevation = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
917 TL("Apply mouse movement to elevation"), "Alt+7", "",
920
921 menuCheckChainEdges = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
922 TL("Create consecutive edges"), "Alt+5", "",
925
926 menuCheckAutoOppositeEdge = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
927 TL("Create an edge in the opposite direction"), "Alt+6", "",
930
931 // build separator
932 separator = new FXMenuSeparator(editMenu);
933}
934
935
936void
938 menuCheckToggleGrid->hide();
939 menuCheckToggleDrawJunctionShape->hide();
940 menuCheckDrawSpreadVehicles->hide();
941 menuCheckShowDemandElements->hide();
942 menuCheckSelectEdges->hide();
943 menuCheckShowConnections->hide();
944 menuCheckHideConnections->hide();
945 menuCheckShowAdditionalSubElements->hide();
946 menuCheckShowTAZElements->hide();
947 menuCheckExtendSelection->hide();
948 menuCheckChangeAllPhases->hide();
949 menuCheckWarnAboutMerge->hide();
950 menuCheckShowJunctionBubble->hide();
951 menuCheckMoveElevation->hide();
952 menuCheckChainEdges->hide();
953 menuCheckAutoOppositeEdge->hide();
954 separator->hide();
955}
956
957
958void
960 int index = 2;
961 // update all accel text
962 if (menuCheckDrawSpreadVehicles->shown()) {
963 menuCheckDrawSpreadVehicles->setAccelText(("Alt+" + toString(index)).c_str());
964 index++;
965 }
966 if (menuCheckDrawSpreadVehicles->shown()) {
967 menuCheckDrawSpreadVehicles->setAccelText(("Alt+" + toString(index)).c_str());
968 index++;
969 }
970 if (menuCheckShowDemandElements->shown()) {
971 menuCheckShowDemandElements->setAccelText(("Alt+" + toString(index)).c_str());
972 index++;
973 }
974 if (menuCheckSelectEdges->shown()) {
975 menuCheckSelectEdges->setAccelText(("Alt+" + toString(index)).c_str());
976 index++;
977 }
978 if (menuCheckShowConnections->shown()) {
979 menuCheckShowConnections->setAccelText(("Alt+" + toString(index)).c_str());
980 index++;
981 }
982 if (menuCheckHideConnections->shown()) {
983 menuCheckHideConnections->setAccelText(("Alt+" + toString(index)).c_str());
984 index++;
985 }
986 if (menuCheckShowAdditionalSubElements->shown()) {
987 menuCheckShowAdditionalSubElements->setAccelText(("Alt+" + toString(index)).c_str());
988 index++;
989 }
990 if (menuCheckShowTAZElements->shown()) {
991 menuCheckShowTAZElements->setAccelText(("Alt+" + toString(index)).c_str());
992 index++;
993 }
994 if (menuCheckExtendSelection->shown()) {
995 menuCheckExtendSelection->setAccelText(("Alt+" + toString(index)).c_str());
996 index++;
997 }
998 if (menuCheckChangeAllPhases->shown()) {
999 menuCheckChangeAllPhases->setAccelText(("Alt+" + toString(index)).c_str());
1000 index++;
1001 }
1002 if (menuCheckWarnAboutMerge->shown()) {
1003 menuCheckWarnAboutMerge->setAccelText(("Alt+" + toString(index)).c_str());
1004 index++;
1005 }
1006 if (menuCheckShowJunctionBubble->shown()) {
1007 menuCheckShowJunctionBubble->setAccelText(("Alt+" + toString(index)).c_str());
1008 index++;
1009 }
1010 if (menuCheckMoveElevation->shown()) {
1011 menuCheckMoveElevation->setAccelText(("Alt+" + toString(index)).c_str());
1012 index++;
1013 }
1014 if (menuCheckChainEdges->shown()) {
1015 menuCheckChainEdges->setAccelText(("Alt+" + toString(index)).c_str());
1016 index++;
1017 }
1018 if (menuCheckAutoOppositeEdge->shown()) {
1019 menuCheckAutoOppositeEdge->setAccelText(("Alt+" + toString(index)).c_str());
1020 index++;
1021 }
1022}
1023
1024// ---------------------------------------------------------------------------
1025// GNEApplicationWindowHelper::DemandViewOptions - methods
1026// ---------------------------------------------------------------------------
1027
1031
1032
1033void
1035 // create menu checks
1036 menuCheckToggleGrid = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1037 TL("Show grid"), "Ctrl+G or Alt+1", "",
1040
1041 menuCheckToggleDrawJunctionShape = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1042 TL("Hide junction shape"), "Ctrl+J or Alt+2", "",
1045
1046 menuCheckDrawSpreadVehicles = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1047 TL("Draw vehicles spread/depart position"), "Alt+3", "",
1050
1051 menuCheckHideShapes = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1052 TL("Show shapes"), "Alt+4", "",
1055
1056 menuCheckShowAllTrips = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1057 TL("Show all trips"), "Alt+5", "",
1060
1061 menuCheckShowAllPersonPlans = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1062 TL("Show all person plans"), "Alt+6", "",
1065
1066 menuCheckLockPerson = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1067 TL("Lock selected person"), "Alt+7", "",
1070
1071 menuCheckShowAllContainerPlans = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1072 TL("Show all container plans"), "Alt+6", "",
1075
1076 menuCheckLockContainer = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1077 TL("Lock selected container"), "Alt+7", "",
1080
1081 menuCheckHideNonInspectedDemandElements = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1082 TL("Show non-inspected demand elements"), "Alt+8", "",
1085
1086 menuCheckShowOverlappedRoutes = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1087 TL("Show number of overlapped routes"), "Alt+9", "",
1090
1091 // build separator
1092 separator = new FXMenuSeparator(editMenu);
1093}
1094
1095
1096void
1098 menuCheckToggleGrid->hide();
1099 menuCheckToggleDrawJunctionShape->hide();
1100 menuCheckDrawSpreadVehicles->hide();
1101 menuCheckHideShapes->hide();
1102 menuCheckShowAllTrips->hide();
1103 menuCheckHideNonInspectedDemandElements->hide();
1104 menuCheckShowOverlappedRoutes->hide();
1105 menuCheckShowAllPersonPlans->hide();
1106 menuCheckLockPerson->hide();
1107 menuCheckShowAllContainerPlans->hide();
1108 menuCheckLockContainer->hide();
1109 separator->hide();
1110}
1111
1112
1113void
1115 int index = 2;
1116 // update all accel text
1117 if (menuCheckDrawSpreadVehicles->shown()) {
1118 menuCheckDrawSpreadVehicles->setAccelText(("Alt+" + toString(index)).c_str());
1119 index++;
1120 }
1121 if (menuCheckHideShapes->shown()) {
1122 menuCheckHideShapes->setAccelText(("Alt+" + toString(index)).c_str());
1123 index++;
1124 }
1125 if (menuCheckShowAllTrips->shown()) {
1126 menuCheckShowAllTrips->setAccelText(("Alt+" + toString(index)).c_str());
1127 index++;
1128 }
1129 if (menuCheckHideNonInspectedDemandElements->shown()) {
1130 menuCheckHideNonInspectedDemandElements->setAccelText(("Alt+" + toString(index)).c_str());
1131 index++;
1132 }
1133 if (menuCheckShowOverlappedRoutes->shown()) {
1134 menuCheckShowOverlappedRoutes->setAccelText(("Alt+" + toString(index)).c_str());
1135 index++;
1136 }
1137 if (menuCheckShowAllPersonPlans->shown()) {
1138 menuCheckShowAllPersonPlans->setAccelText(("Alt+" + toString(index)).c_str());
1139 index++;
1140 }
1141 if (menuCheckLockPerson->shown()) {
1142 menuCheckLockPerson->setAccelText(("Alt+" + toString(index)).c_str());
1143 index++;
1144 }
1145 if (menuCheckShowAllContainerPlans->shown()) {
1146 menuCheckShowAllContainerPlans->setAccelText(("Alt+" + toString(index)).c_str());
1147 index++;
1148 }
1149 if (menuCheckLockContainer->shown()) {
1150 menuCheckLockContainer->setAccelText(("Alt+" + toString(index)).c_str());
1151 index++;
1152 }
1153}
1154
1155// ---------------------------------------------------------------------------
1156// GNEApplicationWindowHelper::EditMenuCommands::DataViewOptions - methods
1157// ---------------------------------------------------------------------------
1158
1162
1163
1164void
1166 // create menu checks
1167 menuCheckToggleDrawJunctionShape = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1168 TL("Hide junction shape"), "Ctrl+J or Alt+1", "",
1171
1172 menuCheckShowAdditionals = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1173 TL("Show additionals"), "Alt+2", "",
1176
1177 menuCheckShowShapes = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1178 TL("Show shapes"), "Alt+3", "",
1181
1182 menuCheckShowDemandElements = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1183 TL("Show demand elements"), "Alt+4", "",
1186
1187 menuCheckToggleTAZRelDrawing = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1188 TL("Draw TAZRel from center"), "Alt+5", "",
1191
1192 menuCheckToggleTAZDrawFill = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1193 TL("Draw TAZ fill"), "Alt+6", "",
1196
1197 menuCheckToggleTAZRelOnlyFrom = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1198 TL("Only draw TAZRel from"), "Alt+6", "",
1201
1202 menuCheckToggleTAZRelOnlyTo = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1203 TL("Only draw TAZRel to"), "Alt+7", "",
1206 // build separator
1207 separator = new FXMenuSeparator(editMenu);
1208}
1209
1210
1211void
1213 menuCheckToggleDrawJunctionShape->hide();
1214 menuCheckShowAdditionals->hide();
1215 menuCheckShowShapes->hide();
1216 menuCheckShowDemandElements->hide();
1217 menuCheckToggleTAZRelDrawing->hide();
1218 menuCheckToggleTAZDrawFill->hide();
1219 menuCheckToggleTAZRelOnlyFrom->hide();
1220 menuCheckToggleTAZRelOnlyTo->hide();
1221 separator->hide();
1222}
1223
1224
1225void
1227 int index = 2;
1228 // update all accel text
1229 if (menuCheckShowAdditionals->shown()) {
1230 menuCheckShowAdditionals->setAccelText(("Alt+" + toString(index)).c_str());
1231 index++;
1232 }
1233 if (menuCheckShowShapes->shown()) {
1234 menuCheckShowShapes->setAccelText(("Alt+" + toString(index)).c_str());
1235 index++;
1236 }
1237 if (menuCheckShowDemandElements->shown()) {
1238 menuCheckShowDemandElements->setAccelText(("Alt+" + toString(index)).c_str());
1239 index++;
1240 }
1241 if (menuCheckToggleTAZRelDrawing->shown()) {
1242 menuCheckToggleTAZRelDrawing->setAccelText(("Alt+" + toString(index)).c_str());
1243 index++;
1244 }
1245 if (menuCheckToggleTAZDrawFill->shown()) {
1246 menuCheckToggleTAZDrawFill->setAccelText(("Alt+" + toString(index)).c_str());
1247 index++;
1248 }
1249 if (menuCheckToggleTAZRelOnlyFrom->shown()) {
1250 menuCheckToggleTAZRelOnlyFrom->setAccelText(("Alt+" + toString(index)).c_str());
1251 index++;
1252 }
1253 if (menuCheckToggleTAZRelOnlyTo->shown()) {
1254 menuCheckToggleTAZRelOnlyTo->setAccelText(("Alt+" + toString(index)).c_str());
1255 index++;
1256 }
1257}
1258
1259// ---------------------------------------------------------------------------
1260// GNEApplicationWindowHelper::EditMenuCommands - methods
1261// ---------------------------------------------------------------------------
1262
1269
1270
1271void
1273 // build undo/redo command
1274 undoLastChange = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1275 TL("Undo"), "Ctrl+Z", TL("Undo the last change."),
1277 redoLastChange = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1278 TL("Redo"), "Ctrl+Y", TL("Redo the last change."),
1280 openUndolistDialog = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1281 TL("Show undo/redo history"), "", TL("Open undo/redo history dialog."),
1283 // add checkBox for recomputing in data mode
1284 menuCheckAllowUndoRedo = GUIDesigns::buildFXMenuCheckboxIcon(editMenu,
1285 TL("Allow undo-redo"), "", "",
1287 menuCheckAllowUndoRedo->setCheck(myGNEApp->getApp()->reg().readBoolEntry("NETEDIT", "AllowUndoRedo", true));
1288}
1289
1290
1291void
1293 // build rest of menu commands
1294 editViewScheme = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1295 TL("Edit Visualisation"), "F9", TL("Opens a dialog for editing visualization settings."),
1297 editViewPort = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1298 TL("Edit Viewport"), "Ctrl+I", TL("Opens a dialog for editing viewing area, zoom and rotation."),
1300}
1301
1302
1303void
1305 // add clear front element
1306 clearFrontElement = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1307 TL("Clear front element"), "F11", TL("Clear current front element"),
1309}
1310
1311
1312void
1314 // add open in sumo options
1315 loadAdditionalsInSUMOGUI = GUIDesigns::buildFXMenuCheckbox(editMenu,
1316 TL("Load additionals in sumo-gui"), TL("Load additionals in sumo-gui."),
1318 loadAdditionalsInSUMOGUI->setCheck(TRUE);
1319 loadDemandInSUMOGUI = GUIDesigns::buildFXMenuCheckbox(editMenu,
1320 TL("Load demand in sumo-gui"), TL("Load demand in sumo-gui."),
1321 myGNEApp, MID_TOOLBAREDIT_LOADDEMAND);
1322 loadDemandInSUMOGUI->setCheck(TRUE);
1323 openInSUMOGUI = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
1324 TL("Open in sumo-gui"), "Ctrl+T", TL("Opens the sumo-gui application with the current network."),
1326}
1327
1328// ---------------------------------------------------------------------------
1329// GNEApplicationWindowHelper::LockMenuCommands - methods
1330// ---------------------------------------------------------------------------
1331
1335
1336
1337void
1339 // network
1340 menuCheckLockJunction = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1341 TL("&Junctions"), "", "",
1343 myGNEApp, MID_GNE_LOCK_ELEMENT);
1344
1345 menuCheckLockEdges = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1346 TL("&Edges"), "", "",
1348 myGNEApp, MID_GNE_LOCK_ELEMENT);
1349
1350 menuCheckLockLanes = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1351 TL("&Lanes"), "", "",
1353 myGNEApp, MID_GNE_LOCK_ELEMENT);
1354
1355 menuCheckLockConnections = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1356 TL("&Connections"), "", "",
1358 myGNEApp, MID_GNE_LOCK_ELEMENT);
1359
1360 menuCheckLockCrossings = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1361 TL("C&rossings"), "", "",
1363 myGNEApp, MID_GNE_LOCK_ELEMENT);
1364
1365 menuCheckLockWalkingAreas = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1366 TL("Walkin&gAreas"), "", "",
1368 myGNEApp, MID_GNE_LOCK_ELEMENT);
1369
1370 menuCheckLockAdditionals = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1371 TL("&Additionals"), "", "",
1373 myGNEApp, MID_GNE_LOCK_ELEMENT);
1374
1375 menuCheckLockTAZs = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1376 TL("&TAZs"), "", "",
1378 myGNEApp, MID_GNE_LOCK_ELEMENT);
1379
1380 menuCheckLockWires = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1381 TL("&Wires"), "", "",
1383 myGNEApp, MID_GNE_LOCK_ELEMENT);
1384
1385 menuCheckLockPolygons = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1386 TL("&Polygons"), "", "",
1388 myGNEApp, MID_GNE_LOCK_ELEMENT);
1389
1390 menuCheckLockPOIs = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1391 TL("P&OIs"), "", "",
1393 myGNEApp, MID_GNE_LOCK_ELEMENT);
1394
1395 menuCheckLockJpsWalkableAreas = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1396 TL("WalkableAreas"), "", "",
1398 myGNEApp, MID_GNE_LOCK_ELEMENT);
1399
1400 menuCheckLockJpsObstacles = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1401 TL("Obstacles"), "", "",
1403 myGNEApp, MID_GNE_LOCK_ELEMENT);
1404 // demand
1405 menuCheckLockRoutes = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1406 TL("&Routes"), "", "",
1408 myGNEApp, MID_GNE_LOCK_ELEMENT);
1409
1410 menuCheckLockVehicles = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1411 TL("&Vehicles"), "", "",
1413 myGNEApp, MID_GNE_LOCK_ELEMENT);
1414
1415 menuCheckLockPersons = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1416 TL("&Persons"), "", "",
1418 myGNEApp, MID_GNE_LOCK_ELEMENT);
1419
1420 menuCheckLockPersonTrip = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1421 TL("Person&Trips"), "", "",
1423 myGNEApp, MID_GNE_LOCK_ELEMENT);
1424
1425 menuCheckLockWalk = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1426 TL("&Walks"), "", "",
1428 myGNEApp, MID_GNE_LOCK_ELEMENT);
1429
1430 menuCheckLockRides = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1431 TL("Ri&des"), "", "",
1433 myGNEApp, MID_GNE_LOCK_ELEMENT);
1434
1435 menuCheckLockContainers = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1436 TL("&Containers"), "", "",
1438 myGNEApp, MID_GNE_LOCK_ELEMENT);
1439
1440 menuCheckLockTransports = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1441 TL("Tra&nsports"), "", "",
1443 myGNEApp, MID_GNE_LOCK_ELEMENT);
1444
1445 menuCheckLockTranships = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1446 TL("Trans&hips"), "", "",
1448 myGNEApp, MID_GNE_LOCK_ELEMENT);
1449
1450 menuCheckLockStops = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1451 TL("Stop&s"), "", "",
1453 myGNEApp, MID_GNE_LOCK_ELEMENT);
1454 // data
1455 menuCheckLockEdgeDatas = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1456 TL("&EdgeDatas"), "", "",
1458 myGNEApp, MID_GNE_LOCK_ELEMENT);
1459
1460 menuCheckLockEdgeRelDatas = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1461 TL("E&dgeRelDatas"), "", "",
1463 myGNEApp, MID_GNE_LOCK_ELEMENT);
1464
1465 menuCheckLockEdgeTAZRels = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1466 TL("Edge&TAZRel"), "", "",
1468 myGNEApp, MID_GNE_LOCK_ELEMENT);
1469
1470 // separator
1471 new FXMenuSeparator(fileMenu);
1472
1473 menuCheckLockSelectedElements = GUIDesigns::buildFXMenuCheckboxIcon(fileMenu,
1474 TL("Lock selected elements"), "", TL("selected elements"),
1476
1477 // separator
1478 new FXMenuSeparator(fileMenu);
1479
1481 TL("Lock all elements"), "", TL("all elements"),
1483
1485 TL("Unlock all elements"), "", TL("Unlock all elements"),
1487}
1488
1489
1490void
1492 // network
1493 menuCheckLockJunction->remHotKey(parseHotKey('j'));
1494 menuCheckLockEdges->remHotKey(parseHotKey('e'));
1495 menuCheckLockLanes->remHotKey(parseHotKey('l'));
1496 menuCheckLockConnections->remHotKey(parseHotKey('c'));
1497 menuCheckLockCrossings->remHotKey(parseHotKey('r'));
1498 menuCheckLockWalkingAreas->remHotKey(parseHotKey('g'));
1499 menuCheckLockAdditionals->remHotKey(parseHotKey('a'));
1500 menuCheckLockTAZs->remHotKey(parseHotKey('t'));
1501 menuCheckLockWires->remHotKey(parseHotKey('w'));
1502 menuCheckLockPolygons->remHotKey(parseHotKey('p'));
1503 menuCheckLockPOIs->remHotKey(parseHotKey('o'));
1504 menuCheckLockJpsWalkableAreas->remHotKey(parseHotKey('n'));
1505 menuCheckLockJpsObstacles->remHotKey(parseHotKey('b'));
1506 // demand
1507 menuCheckLockRoutes->remHotKey(parseHotKey('r'));
1508 menuCheckLockVehicles->remHotKey(parseHotKey('v'));
1509 menuCheckLockPersons->remHotKey(parseHotKey('p'));
1510 menuCheckLockPersonTrip->remHotKey(parseHotKey('t'));
1511 menuCheckLockWalk->remHotKey(parseHotKey('w'));
1512 menuCheckLockRides->remHotKey(parseHotKey('d'));
1513 menuCheckLockContainers->remHotKey(parseHotKey('c'));
1514 menuCheckLockTransports->remHotKey(parseHotKey('n'));
1515 menuCheckLockTranships->remHotKey(parseHotKey('h'));
1516 menuCheckLockStops->remHotKey(parseHotKey('s'));
1517 // data
1518 menuCheckLockEdgeDatas->remHotKey(parseHotKey('e'));
1519 menuCheckLockEdgeRelDatas->remHotKey(parseHotKey('d'));
1520 menuCheckLockEdgeTAZRels->remHotKey(parseHotKey('t'));
1521}
1522
1523void
1525 // first enable menu commands
1526 menuCheckLockJunction->enable();
1527 menuCheckLockEdges->enable();
1528 menuCheckLockLanes->enable();
1529 menuCheckLockConnections->enable();
1530 menuCheckLockCrossings->enable();
1531 menuCheckLockWalkingAreas->enable();
1532 menuCheckLockAdditionals->enable();
1533 menuCheckLockTAZs->enable();
1534 menuCheckLockWires->enable();
1535 menuCheckLockPolygons->enable();
1536 menuCheckLockPOIs->enable();
1537 menuCheckLockJpsWalkableAreas->enable();
1538 menuCheckLockJpsObstacles->enable();
1539 // set accels
1540 menuCheckLockJunction->addHotKey(parseHotKey('j'));
1541 menuCheckLockEdges->addHotKey(parseHotKey('e'));
1542 menuCheckLockLanes->addHotKey(parseHotKey('l'));
1543 menuCheckLockConnections->addHotKey(parseHotKey('c'));
1544 menuCheckLockCrossings->addHotKey(parseHotKey('r'));
1545 menuCheckLockWalkingAreas->addHotKey(parseHotKey('g'));
1546 menuCheckLockAdditionals->addHotKey(parseHotKey('a'));
1547 menuCheckLockTAZs->addHotKey(parseHotKey('t'));
1548 menuCheckLockWires->addHotKey(parseHotKey('w'));
1549 menuCheckLockPolygons->addHotKey(parseHotKey('p'));
1550 menuCheckLockPOIs->addHotKey(parseHotKey('o'));
1551 menuCheckLockJpsWalkableAreas->addHotKey(parseHotKey('n'));
1552 menuCheckLockJpsObstacles->addHotKey(parseHotKey('b'));
1553 // now show it
1554 menuCheckLockJunction->show();
1555 menuCheckLockEdges->show();
1556 menuCheckLockLanes->show();
1557 menuCheckLockConnections->show();
1558 menuCheckLockCrossings->show();
1559 menuCheckLockWalkingAreas->show();
1560 menuCheckLockAdditionals->show();
1561 menuCheckLockTAZs->show();
1562 menuCheckLockWires->show();
1563 menuCheckLockPolygons->show();
1564 menuCheckLockPOIs->show();
1565 menuCheckLockJpsWalkableAreas->show();
1566 menuCheckLockJpsObstacles->show();
1567}
1568
1569
1570void
1572 // first disable menu commands
1573 menuCheckLockJunction->disable();
1574 menuCheckLockEdges->disable();
1575 menuCheckLockLanes->disable();
1576 menuCheckLockConnections->disable();
1577 menuCheckLockCrossings->disable();
1578 menuCheckLockWalkingAreas->disable();
1579 menuCheckLockAdditionals->disable();
1580 menuCheckLockTAZs->disable();
1581 menuCheckLockPolygons->disable();
1582 menuCheckLockPOIs->disable();
1583 menuCheckLockJpsWalkableAreas->disable();
1584 menuCheckLockJpsObstacles->disable();
1585 // now hide it
1586 menuCheckLockJunction->hide();
1587 menuCheckLockEdges->hide();
1588 menuCheckLockLanes->hide();
1589 menuCheckLockConnections->hide();
1590 menuCheckLockCrossings->hide();
1591 menuCheckLockWalkingAreas->hide();
1592 menuCheckLockAdditionals->hide();
1593 menuCheckLockTAZs->hide();
1594 menuCheckLockWires->hide();
1595 menuCheckLockPolygons->hide();
1596 menuCheckLockPOIs->hide();
1597 menuCheckLockJpsWalkableAreas->hide();
1598 menuCheckLockJpsObstacles->hide();
1599}
1600
1601
1602void
1604 // first enable menu commands
1605 menuCheckLockRoutes->enable();
1606 menuCheckLockVehicles->enable();
1607 menuCheckLockPersons->enable();
1608 menuCheckLockPersonTrip->enable();
1609 menuCheckLockWalk->enable();
1610 menuCheckLockRides->enable();
1611 menuCheckLockContainers->enable();
1612 menuCheckLockTransports->enable();
1613 menuCheckLockTranships->enable();
1614 menuCheckLockStops->enable();
1615 // set accels
1616 menuCheckLockRoutes->addHotKey(parseHotKey('r'));
1617 menuCheckLockVehicles->addHotKey(parseHotKey('v'));
1618 menuCheckLockPersons->addHotKey(parseHotKey('p'));
1619 menuCheckLockPersonTrip->addHotKey(parseHotKey('t'));
1620 menuCheckLockWalk->addHotKey(parseHotKey('w'));
1621 menuCheckLockRides->addHotKey(parseHotKey('d'));
1622 menuCheckLockContainers->addHotKey(parseHotKey('c'));
1623 menuCheckLockTransports->addHotKey(parseHotKey('n'));
1624 menuCheckLockTranships->addHotKey(parseHotKey('h'));
1625 menuCheckLockStops->addHotKey(parseHotKey('s'));
1626 // now show it
1627 menuCheckLockRoutes->show();
1628 menuCheckLockVehicles->show();
1629 menuCheckLockPersons->show();
1630 menuCheckLockPersonTrip->show();
1631 menuCheckLockWalk->show();
1632 menuCheckLockRides->show();
1633 menuCheckLockContainers->show();
1634 menuCheckLockTransports->show();
1635 menuCheckLockTranships->show();
1636 menuCheckLockStops->show();
1637}
1638
1639
1640void
1642 // first disable menu commands
1643 menuCheckLockRoutes->disable();
1644 menuCheckLockVehicles->disable();
1645 menuCheckLockPersons->disable();
1646 menuCheckLockPersonTrip->disable();
1647 menuCheckLockWalk->disable();
1648 menuCheckLockRides->disable();
1649 menuCheckLockContainers->disable();
1650 menuCheckLockTransports->disable();
1651 menuCheckLockTranships->disable();
1652 menuCheckLockStops->disable();
1653 // now hide it
1654 menuCheckLockRoutes->hide();
1655 menuCheckLockVehicles->hide();
1656 menuCheckLockPersons->hide();
1657 menuCheckLockPersonTrip->hide();
1658 menuCheckLockWalk->hide();
1659 menuCheckLockRides->hide();
1660 menuCheckLockContainers->hide();
1661 menuCheckLockTransports->hide();
1662 menuCheckLockTranships->hide();
1663 menuCheckLockStops->hide();
1664}
1665
1666
1667void
1669 // first enable menu commands
1670 menuCheckLockEdgeDatas->enable();
1671 menuCheckLockEdgeRelDatas->enable();
1672 menuCheckLockEdgeTAZRels->enable();
1673 // set accels
1674 menuCheckLockEdgeDatas->addHotKey(parseHotKey('e'));
1675 menuCheckLockEdgeRelDatas->addHotKey(parseHotKey('d'));
1676 menuCheckLockEdgeTAZRels->addHotKey(parseHotKey('t'));
1677 // now show it
1678 menuCheckLockEdgeDatas->show();
1679 menuCheckLockEdgeRelDatas->show();
1680 menuCheckLockEdgeTAZRels->show();
1681}
1682
1683
1684void
1686 // first disable menu commands
1687 menuCheckLockEdgeDatas->disable();
1688 menuCheckLockEdgeRelDatas->disable();
1689 menuCheckLockEdgeTAZRels->disable();
1690 // now hide it
1691 menuCheckLockEdgeDatas->hide();
1692 menuCheckLockEdgeRelDatas->hide();
1693 menuCheckLockEdgeTAZRels->hide();
1694}
1695
1696
1697void
1699 menuCheckLockJunction->setCheck(TRUE);
1700 menuCheckLockEdges->setCheck(TRUE);
1701 menuCheckLockLanes->setCheck(TRUE);
1702 menuCheckLockConnections->setCheck(TRUE);
1703 menuCheckLockCrossings->setCheck(TRUE);
1704 menuCheckLockWalkingAreas->setCheck(TRUE);
1705 menuCheckLockAdditionals->setCheck(TRUE);
1706 menuCheckLockTAZs->setCheck(TRUE);
1707 menuCheckLockWires->setCheck(TRUE);
1708 menuCheckLockPolygons->setCheck(TRUE);
1709 menuCheckLockPOIs->setCheck(TRUE);
1710 menuCheckLockJpsWalkableAreas->setCheck(TRUE);
1711 menuCheckLockJpsObstacles->setCheck(TRUE);
1712 menuCheckLockRoutes->setCheck(TRUE);
1713 menuCheckLockVehicles->setCheck(TRUE);
1714 menuCheckLockPersons->setCheck(TRUE);
1715 menuCheckLockPersonTrip->setCheck(TRUE);
1716 menuCheckLockWalk->setCheck(TRUE);
1717 menuCheckLockRides->setCheck(TRUE);
1718 menuCheckLockContainers->setCheck(TRUE);
1719 menuCheckLockTransports->setCheck(TRUE);
1720 menuCheckLockTranships->setCheck(TRUE);
1721 menuCheckLockStops->setCheck(TRUE);
1722 menuCheckLockEdgeDatas->setCheck(TRUE);
1723 menuCheckLockEdgeRelDatas->setCheck(TRUE);
1724 menuCheckLockEdgeTAZRels->setCheck(TRUE);
1725}
1726
1727
1728void
1730 menuCheckLockJunction->setCheck(FALSE);
1731 menuCheckLockEdges->setCheck(FALSE);
1732 menuCheckLockLanes->setCheck(FALSE);
1733 menuCheckLockConnections->setCheck(FALSE);
1734 menuCheckLockCrossings->setCheck(FALSE);
1735 menuCheckLockWalkingAreas->setCheck(FALSE);
1736 menuCheckLockAdditionals->setCheck(FALSE);
1737 menuCheckLockTAZs->setCheck(FALSE);
1738 menuCheckLockWires->setCheck(FALSE);
1739 menuCheckLockPolygons->setCheck(FALSE);
1740 menuCheckLockPOIs->setCheck(FALSE);
1741 menuCheckLockJpsWalkableAreas->setCheck(FALSE);
1742 menuCheckLockJpsObstacles->setCheck(FALSE);
1743 menuCheckLockRoutes->setCheck(FALSE);
1744 menuCheckLockVehicles->setCheck(FALSE);
1745 menuCheckLockPersons->setCheck(FALSE);
1746 menuCheckLockPersonTrip->setCheck(FALSE);
1747 menuCheckLockWalk->setCheck(FALSE);
1748 menuCheckLockRides->setCheck(FALSE);
1749 menuCheckLockContainers->setCheck(FALSE);
1750 menuCheckLockTransports->setCheck(FALSE);
1751 menuCheckLockTranships->setCheck(FALSE);
1752 menuCheckLockStops->setCheck(FALSE);
1753 menuCheckLockEdgeDatas->setCheck(FALSE);
1754 menuCheckLockEdgeRelDatas->setCheck(FALSE);
1755 menuCheckLockEdgeTAZRels->setCheck(FALSE);
1756}
1757
1758
1759void
1761 // check elements
1762 if (AC->getTagProperty().getTag() == SUMO_TAG_JUNCTION) {
1763 menuCheckLockJunction->setCheck(value);
1764 } else if (AC->getTagProperty().getTag() == SUMO_TAG_EDGE) {
1765 menuCheckLockEdges->setCheck(value);
1766 } else if (AC->getTagProperty().getTag() == SUMO_TAG_LANE) {
1767 menuCheckLockLanes->setCheck(value);
1768 } else if (AC->getTagProperty().getTag() == SUMO_TAG_CONNECTION) {
1769 menuCheckLockConnections->setCheck(value);
1770 } else if (AC->getTagProperty().getTag() == SUMO_TAG_CROSSING) {
1771 menuCheckLockCrossings->setCheck(value);
1772 } else if (AC->getTagProperty().getTag() == SUMO_TAG_WALKINGAREA) {
1773 menuCheckLockWalkingAreas->setCheck(value);
1774 } else if (AC->getTagProperty().isAdditionalElement()) {
1775 menuCheckLockAdditionals->setCheck(value);
1776 } else if (AC->getTagProperty().isTAZElement()) {
1777 menuCheckLockTAZs->setCheck(value);
1778 } else if (AC->getTagProperty().isWireElement()) {
1779 menuCheckLockWires->setCheck(value);
1780 } else if (AC->getTagProperty().getTag() == SUMO_TAG_POLY) {
1781 menuCheckLockPolygons->setCheck(value);
1782 } else if (AC->getTagProperty().getTag() == GNE_TAG_JPS_WALKABLEAREA) {
1783 menuCheckLockJpsWalkableAreas->setCheck(value);
1784 } else if (AC->getTagProperty().getTag() == GNE_TAG_JPS_OBSTACLE) {
1785 menuCheckLockJpsObstacles->setCheck(value);
1786 } else if ((AC->getTagProperty().getTag() == SUMO_TAG_POI) ||
1787 (AC->getTagProperty().getTag() == GNE_TAG_POILANE) ||
1788 (AC->getTagProperty().getTag() == GNE_TAG_POIGEO)) {
1789 menuCheckLockPOIs->setCheck(value);
1790 } else if (AC->getTagProperty().isRoute()) {
1791 menuCheckLockRoutes->setCheck(value);
1792 } else if (AC->getTagProperty().isVehicle()) {
1793 menuCheckLockVehicles->setCheck(value);
1794 } else if (AC->getTagProperty().isPerson()) {
1795 menuCheckLockPersons->setCheck(value);
1796 } else if (AC->getTagProperty().isPlanPersonTrip()) {
1797 menuCheckLockPersonTrip->setCheck(value);
1798 } else if (AC->getTagProperty().isPlanWalk()) {
1799 menuCheckLockWalk->setCheck(value);
1800 } else if (AC->getTagProperty().isPlanRide()) {
1801 menuCheckLockRides->setCheck(value);
1802 } else if (AC->getTagProperty().isContainer()) {
1803 menuCheckLockContainers->setCheck(value);
1804 } else if (AC->getTagProperty().isPlanTransport()) {
1805 menuCheckLockTransports->setCheck(value);
1806 } else if (AC->getTagProperty().isPlanTranship()) {
1807 menuCheckLockTranships->setCheck(value);
1808 } else if (AC->getTagProperty().isVehicleStop() ||
1811 menuCheckLockStops->setCheck(value);
1812 } else if (AC->getTagProperty().getTag() == GNE_TAG_EDGEREL_SINGLE) {
1813 menuCheckLockEdgeDatas->setCheck(value);
1814 } else if (AC->getTagProperty().getTag() == SUMO_TAG_EDGEREL) {
1815 menuCheckLockEdgeRelDatas->setCheck(value);
1816 } else if (AC->getTagProperty().getTag() == SUMO_TAG_TAZREL) {
1817 menuCheckLockEdgeTAZRels->setCheck(value);
1818 }
1819}
1820
1821
1822FXHotKey
1824 FXuint code = 0, mods = 0;
1825 if (Unicode::isAlphaNumeric(character)) {
1826 mods = ALTMASK;
1827 code = fxucs2keysym(Unicode::toLower(character));
1828 }
1829 return MKUINT(code, mods);
1830}
1831
1832// ---------------------------------------------------------------------------
1833// GNEApplicationWindowHelper::ProcessingMenuCommands - methods
1834// ---------------------------------------------------------------------------
1835
1839
1840
1841void
1843 // build network processing menu commands
1844 computeNetwork = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1845 TL("Compute Junctions"), "F5", TL("Compute junction shape and logic."),
1847 computeNetworkVolatile = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1848 TL("Compute Junctions with volatile options"), "Shift+F5", TL("Compute junction shape and logic using volatile junctions."),
1850 cleanJunctions = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1851 TL("Clean Junctions"), "F6", TL("Remove solitary junctions."),
1853 joinJunctions = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1854 TL("Join Selected Junctions"), "F7", TL("Join selected junctions into a single junction."),
1856 clearInvalidCrossings = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1857 TL("Clean invalid crossings"), "F8", TL("Clear invalid crossings."),
1859 // add separator for checkBox
1860 mySeparatorCheckBox = new FXMenuSeparator(processingMenu);
1861 // add checkBox for recomputing in data mode
1862 menuCheckRecomputeDataMode = GUIDesigns::buildFXMenuCheckboxIcon(processingMenu,
1863 TL("Recompute Network in Data Mode"), "", "",
1865 // set default value
1866 menuCheckRecomputeDataMode->setCheck(myGNEApp->getApp()->reg().readBoolEntry("NETEDIT", "RecomputeData", true));
1867 // build demand processing menu commands
1868 computeDemand = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1869 TL("Compute demand"), "F5", TL("Computes demand elements."),
1871 cleanRoutes = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1872 TL("Clean routes"), "F6", TL("Removes routes without vehicles."),
1874 joinRoutes = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1875 TL("Join routes"), "F7", TL("Joins routes with the same edges."),
1877 adjustPersonPlans = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1878 TL("Adjust person plans"), "Shift+F7", TL("Adjust person plans (start/end positions, arrival positions, etc.)"),
1880 clearInvalidDemandElements = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1881 TL("Clean invalid route elements"), "F8", TL("Clear elements with an invalid path (routes, Trips, Flows...)."),
1883 // add separator
1884 myOptionsSeparator = new FXMenuSeparator(processingMenu);
1885 // create optionmenus
1886 optionMenus = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1887 TL("Sumo options"), "Shift+F10", TL("Configure sumo Options."),
1889 // add separator
1890 myOptionsSeparator = new FXMenuSeparator(processingMenu);
1891 // create optionmenus
1892 optionMenus = GUIDesigns::buildFXMenuCommandShortcut(processingMenu,
1893 TL("Options"), "F10", TL("Configure netedit Options."),
1895}
1896
1897
1898void
1900 // first enable menu commands
1901 computeNetwork->enable();
1902 computeNetworkVolatile->enable();
1903 cleanJunctions->enable();
1904 joinJunctions->enable();
1905 clearInvalidCrossings->enable();
1906 mySeparatorCheckBox->enable();
1907 menuCheckRecomputeDataMode->enable();
1908 // now show it
1909 computeNetwork->show();
1910 computeNetworkVolatile->show();
1911 cleanJunctions->show();
1912 joinJunctions->show();
1913 clearInvalidCrossings->show();
1914 mySeparatorCheckBox->show();
1915 menuCheckRecomputeDataMode->show();
1916}
1917
1918
1919void
1921 // first disable menu commands
1922 computeNetwork->disable();
1923 computeNetworkVolatile->disable();
1924 cleanJunctions->disable();
1925 joinJunctions->disable();
1926 clearInvalidCrossings->disable();
1927 // now hide it
1928 computeNetwork->hide();
1929 computeNetworkVolatile->hide();
1930 cleanJunctions->hide();
1931 joinJunctions->hide();
1932 clearInvalidCrossings->hide();
1933}
1934
1935
1936void
1938 // first enable menu commands
1939 computeDemand->enable();
1940 cleanRoutes->enable();
1941 joinRoutes->enable();
1942 adjustPersonPlans->enable();
1943 clearInvalidDemandElements->enable();
1944 // now show it
1945 computeDemand->show();
1946 cleanRoutes->show();
1947 joinRoutes->show();
1948 adjustPersonPlans->show();
1949 clearInvalidDemandElements->show();
1950}
1951
1952
1953void
1955 // first disable menu commands
1956 computeDemand->disable();
1957 cleanRoutes->disable();
1958 joinRoutes->disable();
1959 adjustPersonPlans->disable();
1960 clearInvalidDemandElements->disable();
1961 // now hide it
1962 computeDemand->hide();
1963 cleanRoutes->hide();
1964 joinRoutes->hide();
1965 adjustPersonPlans->hide();
1966 clearInvalidDemandElements->hide();
1967}
1968
1969
1970void
1974
1975
1976void
1980
1981
1982void
1986
1987
1988void
1992
1993// ---------------------------------------------------------------------------
1994// GNEApplicationWindowHelper::LocateMenuCommands - methods
1995// ---------------------------------------------------------------------------
1996
2000
2001
2002void
2004 // build locate menu commands
2006 TL("&Junctions"), "Shift+J", TL("Open a dialog for locating a Junction."),
2009 TL("&Edges"), "Shift+E", TL("Open a dialog for locating an Edge."),
2012 TL("&WalkingAreas"), "Shift+W", TL("Open a dialog for locating a Walking Area."),
2015 TL("&Vehicles"), "Shift+V", TL("Open a dialog for locating a Vehicle."),
2018 TL("&Persons"), "Shift+P", TL("Open a dialog for locating a Person."),
2021 TL("&Containers"), "Shift+C", TL("Open a dialog for locating a Container."),
2024 TL("&Route"), "Shift+R", TL("Open a dialog for locating a Route."),
2027 TL("&Stops"), "Shift+S", TL("Open a dialog for locating a Stop."),
2030 TL("&TLS"), "Shift+T", TL("Open a dialog for locating a Traffic Light."),
2033 TL("&Additional"), "Shift+A", TL("Open a dialog for locating an Additional Structure."),
2036 TL("P&oI"), "Shift+O", TL("Open a dialog for locating a Point of Interest."),
2039 TL("Po&lygon"), "Shift+L", TL("Open a dialog for locating a Polygon."),
2041}
2042
2043// ---------------------------------------------------------------------------
2044// GNEApplicationWindowHelper::ToolsMenuCommands - methods
2045// ---------------------------------------------------------------------------
2046
2050
2051
2053 // delete all tools
2054 for (const auto& tool : myPythonTools) {
2055 delete tool;
2056 }
2057 // delete dialogs
2058 delete myPythonToolDialog;
2059 delete myNetgenerateDialog;
2060 delete myRunPythonToolDialog;
2061 delete myRunNetgenerateDialog;
2062}
2063
2064
2065void
2067 const std::map<std::string, FXMenuPane*>& menuPaneToolMaps) {
2068 // build tools from template
2069 // the templateTools vector is imported from templates.h (which only exists in the cmake-build folder)
2070 for (const auto& templateTool : templateTools) {
2071 if (templateTool.name == "netdiff") {
2072 myPythonTools.push_back(new GNENetDiffTool(myGNEApp, templateTool.pythonPath,
2073 menuPaneToolMaps.at(templateTool.subfolder)));
2074 } else if (menuPaneToolMaps.count(templateTool.subfolder) > 0) {
2075 myPythonTools.push_back(new GNEPythonTool(myGNEApp, templateTool.pythonPath,
2076 templateTool.templateStr, menuPaneToolMaps.at(templateTool.subfolder)));
2077 } else {
2078 myPythonTools.push_back(new GNEPythonTool(myGNEApp, templateTool.pythonPath,
2079 templateTool.templateStr, toolsMenu));
2080 }
2081 }
2082 // build dialogs
2083 myPythonToolDialog = new GNEPythonToolDialog(myGNEApp);
2084 myNetgenerateDialog = new GNENetgenerateDialog(myGNEApp);
2085 myRunPythonToolDialog = new GNERunPythonToolDialog(myGNEApp);
2086 myRunNetgenerateDialog = new GNERunNetgenerateDialog(myGNEApp);
2087}
2088
2089
2090long
2092 // iterate over all tools and find menu command
2093 for (const auto& tool : myPythonTools) {
2094 if (tool->getMenuCommand() == menuCommand) {
2095 myPythonToolDialog->openDialog(tool);
2096 return 1;
2097 }
2098 }
2099 return 0;
2100}
2101
2102
2103long
2105 myNetgenerateDialog->openDialog();
2106 return 1;
2107}
2108
2109
2110long
2112 // iterate over all tools and find menu command
2113 for (const auto& tool : myPythonTools) {
2114 if (tool->getMenuCommand() == menuCommand) {
2115 myRunPythonToolDialog->runTool(tool);
2116 return 1;
2117 }
2118 }
2119 return 0;
2120}
2121
2122
2123long
2125 // iterate over all tools and find menu command
2126 for (const auto& tool : myPythonTools) {
2127 if (tool->getMenuCommand() == menuCommand) {
2128 // execute postProcessing
2129 tool->postProcessing();
2130 return 1;
2131 }
2132 }
2133 return 0;
2134}
2135
2136
2137long
2139 myRunNetgenerateDialog->run(netgenerateOptions);
2140 return 0;
2141}
2142
2143// ---------------------------------------------------------------------------
2144// GNEApplicationWindowHelper::WindowsMenuCommands - methods
2145// ---------------------------------------------------------------------------
2146
2150
2151
2152void
2154 FXStatusBar* statusbar, GUIMessageWindow* messageWindow) {
2155 // build windows menu commands
2157 TL("Show Status Line"), TL("Toggle this Status Bar on/off."),
2158 statusbar, FXWindow::ID_TOGGLESHOWN);
2160 TL("Show Message Window"), TL("Toggle the Message Window on/off."),
2161 messageWindow, FXWindow::ID_TOGGLESHOWN);
2162 new FXMenuSeparator(windowsMenu);
2164 TL("Clear Message Window"), "", TL("Clear the Message Window."),
2166}
2167
2168// ---------------------------------------------------------------------------
2169// GNEApplicationWindowHelper::WindowsMenuCommands - methods
2170// ---------------------------------------------------------------------------
2171
2175
2176
2177void
2179 // build windows menu commands
2180 GUIDesigns::buildFXMenuCommandShortcut(helpMenu, TL("Online Documentation"), "F1", TL("Open Online documentation."),
2181 nullptr, myGNEApp, MID_HOTKEY_F1_ONLINEDOCUMENTATION);
2182 new FXMenuSeparator(helpMenu);
2183 GUIDesigns::buildFXMenuCommandShortcut(helpMenu, TL("Changelog"), "", TL("Open Changelog."),
2184 nullptr, myGNEApp, MID_CHANGELOG);
2185 GUIDesigns::buildFXMenuCommandShortcut(helpMenu, TL("Hotkeys"), "", TL("Open Hotkeys."),
2186 nullptr, myGNEApp, MID_HOTKEYS);
2187 GUIDesigns::buildFXMenuCommandShortcut(helpMenu, TL("Tutorial"), "", TL("Open Tutorial."),
2188 nullptr, myGNEApp, MID_TUTORIAL);
2189 GUIDesigns::buildFXMenuCommandShortcut(helpMenu, TL("Feedback"), "", TL("Open feedback channels."),
2190 nullptr, myGNEApp, MID_FEEDBACK);
2191 new FXMenuSeparator(helpMenu);
2192 GUIDesigns::buildFXMenuCommandShortcut(helpMenu, TL("About"), "F12", TL("About netedit."),
2194}
2195
2196// ---------------------------------------------------------------------------
2197// GNEApplicationWindowHelper::NetworkCheckableButtons - methods
2198// ---------------------------------------------------------------------------
2199
2203
2204
2205void
2207 networkMode->show();
2208 demandMode->show();
2209 dataMode->show();
2210}
2211
2212
2213void
2217
2218
2219void
2223
2224
2225void
2227 // build supermode menu commands
2228 networkMode = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
2229 TL("&Network"), "F2", TL("Select network mode."),
2231 demandMode = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
2232 TL("&Demand"), "F3", TL("Select demand mode."),
2234 dataMode = GUIDesigns::buildFXMenuCommandShortcut(editMenu,
2235 TL("&Data"), "F4", TL("Select data mode."),
2237}
2238
2239// ---------------------------------------------------------------------------
2240// GNESumoConfigHandler - methods
2241// ---------------------------------------------------------------------------
2242
2244 mySumoOptions(sumoOptions),
2245 myFile(file) {
2246}
2247
2248
2249bool
2251 // get options
2252 auto& neteditOptions = OptionsCont::getOptions();
2253 // reset options
2254 mySumoOptions.resetDefault();
2255 neteditOptions.resetDefault();
2256 // make all options writables
2257 mySumoOptions.resetWritable();
2258 neteditOptions.resetWritable();
2259 // build parser
2260 XERCES_CPP_NAMESPACE::SAXParser parser;
2261 parser.setValidationScheme(XERCES_CPP_NAMESPACE::SAXParser::Val_Never);
2262 parser.setDisableDefaultEntityResolution(true);
2263 // start the parsing
2264 OptionsLoader handler(mySumoOptions);
2265 try {
2266 parser.setDocumentHandler(&handler);
2267 parser.setErrorHandler(&handler);
2268 parser.parse(StringUtils::transcodeToLocal(myFile).c_str());
2269 if (handler.errorOccurred()) {
2270 WRITE_ERROR(TL("Could not load SUMO configuration '") + myFile + "'.");
2271 return false;
2272 }
2273 } catch (const XERCES_CPP_NAMESPACE::XMLException& e) {
2274 WRITE_ERROR(TL("Could not load SUMO configuration '") + myFile + "':\n " + StringUtils::transcode(e.getMessage()));
2275 return false;
2276 }
2277 // relocate files
2278 mySumoOptions.relocateFiles(myFile);
2279 // set loaded files in netedit options
2280 neteditOptions.set("sumocfg-file", myFile);
2281 neteditOptions.set("net-file", mySumoOptions.getString("net-file"));
2282 neteditOptions.set("additional-files", mySumoOptions.getString("additional-files"));
2283 neteditOptions.set("route-files", mySumoOptions.getString("route-files"));
2284 // check if we need to define the configuration file
2285 if (neteditOptions.getString("configuration-file").empty()) {
2286 const auto newConfiguration = StringUtils::replace(neteditOptions.getString("configuration-file"), ".sumocfg", ".netecfg");
2287 neteditOptions.resetWritable();
2288 neteditOptions.set("configuration-file", newConfiguration);
2289 }
2290 return true;
2291}
2292
2293// ---------------------------------------------------------------------------
2294// GNENeteditConfigHandler - methods
2295// ---------------------------------------------------------------------------
2296
2298 myFile(file) {
2299}
2300
2301
2302bool
2304 // get options
2305 auto& neteditOptions = OptionsCont::getOptions();
2306 // reset options
2307 neteditOptions.resetDefault();
2308 // make all options writables
2309 neteditOptions.resetWritable();
2310 // build parser
2311 XERCES_CPP_NAMESPACE::SAXParser parser;
2312 parser.setValidationScheme(XERCES_CPP_NAMESPACE::SAXParser::Val_Never);
2313 parser.setDisableDefaultEntityResolution(true);
2314 // start the parsing
2315 OptionsLoader handler(neteditOptions);
2316 try {
2317 parser.setDocumentHandler(&handler);
2318 parser.setErrorHandler(&handler);
2319 parser.parse(StringUtils::transcodeToLocal(myFile).c_str());
2320 if (handler.errorOccurred()) {
2321 WRITE_ERROR(TL("Could not load netedit configuration '") + myFile + "'.");
2322 return false;
2323 }
2324 } catch (const XERCES_CPP_NAMESPACE::XMLException& e) {
2325 WRITE_ERROR(TL("Could not load netedit configuration '") + myFile + "':\n " + StringUtils::transcode(e.getMessage()));
2326 return false;
2327 }
2328 // relocate files
2329 neteditOptions.relocateFiles(myFile);
2330 // check if we have loaded a netedit config or a netconvert config
2331 if (neteditOptions.getString("configuration-file").find(".netccfg") != std::string::npos) {
2332 const auto newConfiguration = StringUtils::replace(neteditOptions.getString("configuration-file"), ".netccfg", ".netecfg");
2333 neteditOptions.resetWritable();
2334 neteditOptions.set("configuration-file", newConfiguration);
2335 }
2336 return true;
2337}
2338
2339// ---------------------------------------------------------------------------
2340// GNEApplicationWindowHelper - methods
2341// ---------------------------------------------------------------------------
2342
2343bool
2345 const int numericalKeyPressed, FXObject* obj, FXSelector sel) {
2346 // finally function correspond to visibleMenuCommands[numericalKeyPressed]
2347 if (menuCheck == viewNet->getNetworkViewOptions().menuCheckToggleGrid) {
2348 // Toggle menuCheckToggleGrid
2349 if (viewNet->getNetworkViewOptions().menuCheckToggleGrid->amChecked() == TRUE) {
2350 // show extra information for tests
2351 WRITE_DEBUG("Disabled toggle show grid through alt + " + toString(numericalKeyPressed + 1));
2352 } else {
2353 // show extra information for tests
2354 WRITE_DEBUG("Enabled toggle show grid through alt + " + toString(numericalKeyPressed + 1));
2355 }
2356 // Call manually onCmdToggleShowGrid
2357 viewNet->onCmdToggleShowGrid(obj, sel, nullptr);
2358 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckToggleDrawJunctionShape) {
2359 // Toggle menuCheckToggleDrawJunctionShape
2361 // show extra information for tests
2362 WRITE_DEBUG("Disabled draw junction shape through alt + " + toString(numericalKeyPressed + 1));
2363 } else {
2364 // show extra information for tests
2365 WRITE_DEBUG("Enabled draw junction shape through alt + " + toString(numericalKeyPressed + 1));
2366 }
2367 // Call manually onCmdToggleDrawJunctionShape
2368 viewNet->onCmdToggleDrawJunctionShape(obj, sel, nullptr);
2369 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckDrawSpreadVehicles) {
2370 // Toggle menuCheckDrawSpreadVehicles
2372 // show extra information for tests
2373 WRITE_DEBUG("Disabled toggle draw spread vehicles through alt + " + toString(numericalKeyPressed + 1));
2374 } else {
2375 // show extra information for tests
2376 WRITE_DEBUG("Enabled toggle spread vehicles through alt + " + toString(numericalKeyPressed + 1));
2377 }
2378 // Call manually onCmdToggleDrawSpreadVehicles
2379 viewNet->onCmdToggleDrawSpreadVehicles(obj, sel, nullptr);
2380 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowDemandElements) {
2381 // Toggle menuCheckShowDemandElements
2383 // show extra information for tests
2384 WRITE_DEBUG("Disabled show demand elements through alt + " + toString(numericalKeyPressed + 1));
2385 } else {
2386 // show extra information for tests
2387 WRITE_DEBUG("Enabled show demand elements through alt + " + toString(numericalKeyPressed + 1));
2388 }
2389 // Call manually onCmdToggleShowDemandElementsNetwork
2390 viewNet->onCmdToggleShowDemandElementsNetwork(obj, sel, nullptr);
2391 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckSelectEdges) {
2392 // Toggle menuCheckSelectEdges
2393 if (viewNet->getNetworkViewOptions().menuCheckSelectEdges->amChecked() == TRUE) {
2394 // show extra information for tests
2395 WRITE_DEBUG("Disabled select edges through alt + " + toString(numericalKeyPressed + 1));
2396 } else {
2397 // show extra information for tests
2398 WRITE_DEBUG("Enabled select edges through alt + " + toString(numericalKeyPressed + 1));
2399 }
2400 // Call manually onCmdToggleSelectEdges
2401 viewNet->onCmdToggleSelectEdges(obj, sel, nullptr);
2402 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowConnections) {
2403 // Toggle menuCheckShowConnections
2404 if (viewNet->getNetworkViewOptions().menuCheckShowConnections->amChecked() == TRUE) {
2405 // show extra information for tests
2406 WRITE_DEBUG("Disabled show connections through alt + " + toString(numericalKeyPressed + 1));
2407 } else {
2408 // show extra information for tests
2409 WRITE_DEBUG("Enabled show connections through alt + " + toString(numericalKeyPressed + 1));
2410 }
2411 // Call manually onCmdToggleShowConnections
2412 viewNet->onCmdToggleShowConnections(obj, sel, nullptr);
2413 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckHideConnections) {
2414 // Toggle menuCheckHideConnections
2415 if (viewNet->getNetworkViewOptions().menuCheckHideConnections->amChecked() == TRUE) {
2416 // show extra information for tests
2417 WRITE_DEBUG("Disabled hide connections through alt + " + toString(numericalKeyPressed + 1));
2418 } else {
2419 // show extra information for tests
2420 WRITE_DEBUG("Enabled hide connections through alt + " + toString(numericalKeyPressed + 1));
2421 }
2422 // Call manually onCmdToggleHideConnections
2423 viewNet->onCmdToggleHideConnections(obj, sel, nullptr);
2424 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowAdditionalSubElements) {
2425 // Toggle menuCheckShowAdditionalSubElements
2427 // show extra information for tests
2428 WRITE_DEBUG("Disabled show additional sub-elements through alt + " + toString(numericalKeyPressed + 1));
2429 } else {
2430 // show extra information for tests
2431 WRITE_DEBUG("Enabled show additional sub-elements through alt + " + toString(numericalKeyPressed + 1));
2432 }
2433 // Call manually onCmdToggleShowAdditionalSubElements
2434 viewNet->onCmdToggleShowAdditionalSubElements(obj, sel, nullptr);
2435 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowTAZElements) {
2436 // Toggle menuCheckShowTAZElements
2437 if (viewNet->getNetworkViewOptions().menuCheckShowTAZElements->amChecked() == TRUE) {
2438 // show extra information for tests
2439 WRITE_DEBUG("Disabled show TAZ elements through alt + " + toString(numericalKeyPressed + 1));
2440 } else {
2441 // show extra information for tests
2442 WRITE_DEBUG("Enabled show TAZ elements through alt + " + toString(numericalKeyPressed + 1));
2443 }
2444 // Call manually onCmdToggleShowTAZElements
2445 viewNet->onCmdToggleShowTAZElements(obj, sel, nullptr);
2446 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckExtendSelection) {
2447 // Toggle menuCheckExtendSelection
2448 if (viewNet->getNetworkViewOptions().menuCheckExtendSelection->amChecked() == TRUE) {
2449 // show extra information for tests
2450 WRITE_DEBUG("Disabled extend selection through alt + " + toString(numericalKeyPressed + 1));
2451 } else {
2452 // show extra information for tests
2453 WRITE_DEBUG("Enabled extend selection through alt + " + toString(numericalKeyPressed + 1));
2454 }
2455 // Call manually onCmdToggleExtendSelection
2456 viewNet->onCmdToggleExtendSelection(obj, sel, nullptr);
2457 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckChangeAllPhases) {
2458 // Toggle menuCheckChangeAllPhases
2459 if (viewNet->getNetworkViewOptions().menuCheckChangeAllPhases->amChecked() == TRUE) {
2460 // show extra information for tests
2461 WRITE_DEBUG("Disabled change all phases through alt + " + toString(numericalKeyPressed + 1));
2462 } else {
2463 // show extra information for tests
2464 WRITE_DEBUG("Enabled change all phases through alt + " + toString(numericalKeyPressed + 1));
2465 }
2466 // Call manually onCmdToggleChangeAllPhases
2467 viewNet->onCmdToggleChangeAllPhases(obj, sel, nullptr);
2468 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckWarnAboutMerge) {
2469 // Toggle menuCheckWarnAboutMerge
2470 if (viewNet->getNetworkViewOptions().menuCheckWarnAboutMerge->amChecked() == TRUE) {
2471 // show extra information for tests
2472 WRITE_DEBUG("Disabled warn about merge through alt + " + toString(numericalKeyPressed + 1));
2473 } else {
2474 // show extra information for tests
2475 WRITE_DEBUG("Enabled warn about merge through alt + " + toString(numericalKeyPressed + 1));
2476 }
2477 // Call manually onCmdToggleWarnAboutMerge
2478 viewNet->onCmdToggleWarnAboutMerge(obj, sel, nullptr);
2479 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowJunctionBubble) {
2480 // Toggle menuCheckShowJunctionBubble
2482 // show extra information for tests
2483 WRITE_DEBUG("Disabled show junction as bubble through alt + " + toString(numericalKeyPressed + 1));
2484 } else {
2485 // show extra information for tests
2486 WRITE_DEBUG("Enabled show junction as bubble through alt + " + toString(numericalKeyPressed + 1));
2487 }
2488 // Call manually onCmdToggleShowJunctionBubble
2489 viewNet->onCmdToggleShowJunctionBubbles(obj, sel, nullptr);
2490 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckMoveElevation) {
2491 // Toggle menuCheckMoveElevation
2492 if (viewNet->getNetworkViewOptions().menuCheckMoveElevation->amChecked() == TRUE) {
2493 // show extra information for tests
2494 WRITE_DEBUG("Disabled move elevation through alt + " + toString(numericalKeyPressed + 1));
2495 } else {
2496 // show extra information for tests
2497 WRITE_DEBUG("Enabled move elevation through alt + " + toString(numericalKeyPressed + 1));
2498 }
2499 // Call manually onCmdToggleMoveElevation
2500 viewNet->onCmdToggleMoveElevation(obj, sel, nullptr);
2501 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckChainEdges) {
2502 // Toggle menuCheckChainEdges
2503 if (viewNet->getNetworkViewOptions().menuCheckChainEdges->amChecked() == TRUE) {
2504 // show extra information for tests
2505 WRITE_DEBUG("Disabled chain edges through alt + " + toString(numericalKeyPressed + 1));
2506 } else {
2507 // show extra information for tests
2508 WRITE_DEBUG("Enabled chain edges through alt + " + toString(numericalKeyPressed + 1));
2509 }
2510 // Call manually onCmdToggleChainEdges
2511 viewNet->onCmdToggleChainEdges(obj, sel, nullptr);
2512 } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckAutoOppositeEdge) {
2513 // Toggle menuCheckAutoOppositeEdge
2514 if (viewNet->getNetworkViewOptions().menuCheckAutoOppositeEdge->amChecked() == TRUE) {
2515 // show extra information for tests
2516 WRITE_DEBUG("Disabled auto opposite edge through alt + " + toString(numericalKeyPressed + 1));
2517 } else {
2518 // show extra information for tests
2519 WRITE_DEBUG("Enabled auto opposite edge through alt + " + toString(numericalKeyPressed + 1));
2520 }
2521 // Call manually onCmdToggleAutoOppositeEdge
2522 viewNet->onCmdToggleAutoOppositeEdge(obj, sel, nullptr);
2523 } else {
2524 return false;
2525 }
2526 return true;
2527}
2528
2529
2530bool
2531GNEApplicationWindowHelper::toggleEditOptionsDemand(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck, const int numericalKeyPressed, FXObject* obj, FXSelector sel) {
2532 if (menuCheck == viewNet->getDemandViewOptions().menuCheckToggleGrid) {
2533 // Toggle menuCheckToggleGrid
2534 if (viewNet->getDemandViewOptions().menuCheckToggleGrid->amChecked() == TRUE) {
2535 // show extra information for tests
2536 WRITE_DEBUG("Disabled toggle show grid through alt + " + toString(numericalKeyPressed + 1));
2537 } else {
2538 // show extra information for tests
2539 WRITE_DEBUG("Enabled toggle show grid through alt + " + toString(numericalKeyPressed + 1));
2540 }
2541 // Call manually onCmdToggleShowGrid
2542 viewNet->onCmdToggleShowGrid(obj, sel, nullptr);
2543 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckToggleDrawJunctionShape) {
2544 // Toggle menuCheckToggleDrawJunctionShape
2546 // show extra information for tests
2547 WRITE_DEBUG("Disabled draw junction shape through alt + " + toString(numericalKeyPressed + 1));
2548 } else {
2549 // show extra information for tests
2550 WRITE_DEBUG("Enabled draw junction shape through alt + " + toString(numericalKeyPressed + 1));
2551 }
2552 // Call manually onCmdToggleDrawJunctionShape
2553 viewNet->onCmdToggleDrawJunctionShape(obj, sel, nullptr);
2554 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckDrawSpreadVehicles) {
2555 // Toggle menuCheckDrawSpreadVehicles
2557 // show extra information for tests
2558 WRITE_DEBUG("Disabled toggle draw spread vehicles through alt + " + toString(numericalKeyPressed + 1));
2559 } else {
2560 // show extra information for tests
2561 WRITE_DEBUG("Enabled toggle spread vehicles through alt + " + toString(numericalKeyPressed + 1));
2562 }
2563 // Call manually onCmdToggleDrawSpreadVehicles
2564 viewNet->onCmdToggleDrawSpreadVehicles(obj, sel, nullptr);
2565 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckHideShapes) {
2566 // Toggle menuCheckHideShapes
2567 if (viewNet->getDemandViewOptions().menuCheckHideShapes->amChecked() == TRUE) {
2568 // show extra information for tests
2569 WRITE_DEBUG("Disabled hide shapes through alt + " + toString(numericalKeyPressed + 1));
2570 } else {
2571 // show extra information for tests
2572 WRITE_DEBUG("Enabled hide shapes through alt + " + toString(numericalKeyPressed + 1));
2573 }
2574 // Call manually onCmdToggleHideShapes
2575 viewNet->onCmdToggleHideShapes(obj, sel, nullptr);
2576 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowAllTrips) {
2577 // Toggle menuCheckShowAllTrips
2578 if (viewNet->getDemandViewOptions().menuCheckShowAllTrips->amChecked() == TRUE) {
2579 // show extra information for tests
2580 WRITE_DEBUG("Disabled show all trips through alt + " + toString(numericalKeyPressed + 1));
2581 } else {
2582 // show extra information for tests
2583 WRITE_DEBUG("Enabled show all trips through alt + " + toString(numericalKeyPressed + 1));
2584 }
2585 // Call manually onCmdToggleShowTrips
2586 viewNet->onCmdToggleShowTrips(obj, sel, nullptr);
2587 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowAllPersonPlans) {
2588 // Toggle menuCheckShowAllPersonPlans
2590 // show extra information for tests
2591 WRITE_DEBUG("Disabled show all person plans through alt + " + toString(numericalKeyPressed + 1));
2592 } else {
2593 // show extra information for tests
2594 WRITE_DEBUG("Enabled show all person plans through alt + " + toString(numericalKeyPressed + 1));
2595 }
2596 // Call manually onCmdToggleShowAllPersonPlans
2597 viewNet->onCmdToggleShowAllPersonPlans(obj, sel, nullptr);
2598 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckLockPerson) {
2599 // Toggle menuCheckShowAllPersonPlans
2600 if (viewNet->getDemandViewOptions().menuCheckLockPerson->amChecked() == TRUE) {
2601 // show extra information for tests
2602 WRITE_DEBUG("Disabled lock person plan through alt + " + toString(numericalKeyPressed + 1));
2603 } else {
2604 // show extra information for tests
2605 WRITE_DEBUG("Enabled lock person plan through alt + " + toString(numericalKeyPressed + 1));
2606 }
2607 // Call manually onCmdToggleLockPerson
2608 viewNet->onCmdToggleLockPerson(obj, sel, nullptr);
2609 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowAllContainerPlans) {
2610 // Toggle menuCheckShowAllContainerPlans
2612 // show extra information for tests
2613 WRITE_DEBUG("Disabled show all container plans through alt + " + toString(numericalKeyPressed + 1));
2614 } else {
2615 // show extra information for tests
2616 WRITE_DEBUG("Enabled show all container plans through alt + " + toString(numericalKeyPressed + 1));
2617 }
2618 // Call manually onCmdToggleShowAllContainerPlans
2619 viewNet->onCmdToggleShowAllContainerPlans(obj, sel, nullptr);
2620 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckLockContainer) {
2621 // Toggle menuCheckShowAllContainerPlans
2622 if (viewNet->getDemandViewOptions().menuCheckLockContainer->amChecked() == TRUE) {
2623 // show extra information for tests
2624 WRITE_DEBUG("Disabled lock container plan through alt + " + toString(numericalKeyPressed + 1));
2625 } else {
2626 // show extra information for tests
2627 WRITE_DEBUG("Enabled lock container plan through alt + " + toString(numericalKeyPressed + 1));
2628 }
2629 // Call manually onCmdToggleLockContainer
2630 viewNet->onCmdToggleLockContainer(obj, sel, nullptr);
2631 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckHideNonInspectedDemandElements) {
2632 // Toggle menuCheckHideNonInspectedDemandElements
2634 // show extra information for tests
2635 WRITE_DEBUG("Disabled hide non inspected demand elements through alt + " + toString(numericalKeyPressed + 1));
2636 } else {
2637 // show extra information for tests
2638 WRITE_DEBUG("Enabled hide non inspected demand elements through alt + " + toString(numericalKeyPressed + 1));
2639 }
2640 // Call manually onCmdToggleHideNonInspecteDemandElements
2641 viewNet->onCmdToggleHideNonInspecteDemandElements(obj, sel, nullptr);
2642
2643 } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowOverlappedRoutes) {
2644 // Toggle menuCheckShowOverlappedRoutes
2646 // show extra information for tests
2647 WRITE_DEBUG("Disabled show overlapped routes through alt + " + toString(numericalKeyPressed + 1));
2648 } else {
2649 // show extra information for tests
2650 WRITE_DEBUG("Enabled show overlapped routes through alt + " + toString(numericalKeyPressed + 1));
2651 }
2652 // Call manually onCmdToggleHideNonInspecteDemandElements
2653 viewNet->onCmdToggleShowOverlappedRoutes(obj, sel, nullptr);
2654 } else {
2655 return false;
2656 }
2657 return true;
2658}
2659
2660
2661bool
2662GNEApplicationWindowHelper::toggleEditOptionsData(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck, const int numericalKeyPressed, FXObject* obj, FXSelector sel) {
2663 if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleDrawJunctionShape) {
2664 // Toggle menuCheckToggleDrawJunctionShape
2666 // show extra information for tests
2667 WRITE_DEBUG("Disabled draw junction shape through alt + " + toString(numericalKeyPressed + 1));
2668 } else {
2669 // show extra information for tests
2670 WRITE_DEBUG("Enabled draw junction shape through alt + " + toString(numericalKeyPressed + 1));
2671 }
2672 // Call manually onCmdToggleDrawJunctionShape
2673 viewNet->onCmdToggleDrawJunctionShape(obj, sel, nullptr);
2674 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckShowAdditionals) {
2675 // Toggle menuCheckHideShapes
2676 if (viewNet->getDataViewOptions().menuCheckShowAdditionals->amChecked() == TRUE) {
2677 // show extra information for tests
2678 WRITE_DEBUG("Disabled show additionals through alt + " + toString(numericalKeyPressed + 1));
2679 } else {
2680 // show extra information for tests
2681 WRITE_DEBUG("Enabled show shapes through alt + " + toString(numericalKeyPressed + 1));
2682 }
2683 // Call manually onCmdToggleShowAdditionals
2684 viewNet->onCmdToggleShowAdditionals(obj, sel, nullptr);
2685 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckShowShapes) {
2686 // Toggle menuCheckHideShapes
2687 if (viewNet->getDataViewOptions().menuCheckShowShapes->amChecked() == TRUE) {
2688 // show extra information for tests
2689 WRITE_DEBUG("Disabled show shapes through alt + " + toString(numericalKeyPressed + 1));
2690 } else {
2691 // show extra information for tests
2692 WRITE_DEBUG("Enabled show shapes through alt + " + toString(numericalKeyPressed + 1));
2693 }
2694 // Call manually onCmdToggleShowShapes
2695 viewNet->onCmdToggleShowShapes(obj, sel, nullptr);
2696 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckShowDemandElements) {
2697 // Toggle menuCheckShowDemandElements
2698 if (viewNet->getDataViewOptions().menuCheckShowDemandElements->amChecked() == TRUE) {
2699 // show extra information for tests
2700 WRITE_DEBUG("Disabled show demand elements through alt + " + toString(numericalKeyPressed + 1));
2701 } else {
2702 // show extra information for tests
2703 WRITE_DEBUG("Enabled show demand elements through alt + " + toString(numericalKeyPressed + 1));
2704 }
2705 // Call manually onCmdToggleShowDemandElementsData
2706 viewNet->onCmdToggleShowDemandElementsData(obj, sel, nullptr);
2707 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZRelDrawing) {
2708 // Toggle menuCheckToggleTAZRelDrawing
2709 if (viewNet->getDataViewOptions().menuCheckToggleTAZRelDrawing->amChecked() == TRUE) {
2710 // show extra information for tests
2711 WRITE_DEBUG("Disabled toggle TAXRel drawing through alt + " + toString(numericalKeyPressed + 1));
2712 } else {
2713 // show extra information for tests
2714 WRITE_DEBUG("Enabled toggle TAXRel drawing through alt + " + toString(numericalKeyPressed + 1));
2715 }
2716 // Call manually onCmdToggleTAZRelDrawing
2717 viewNet->onCmdToggleTAZRelDrawing(obj, sel, nullptr);
2718 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZDrawFill) {
2719 // Toggle menuCheckToggleTAZDrawFill
2720 if (viewNet->getDataViewOptions().menuCheckToggleTAZDrawFill->amChecked() == TRUE) {
2721 // show extra information for tests
2722 WRITE_DEBUG("Disabled toggle TAZ draw fill through alt + " + toString(numericalKeyPressed + 1));
2723 } else {
2724 // show extra information for tests
2725 WRITE_DEBUG("Enabled toggle TAZ draw fill through alt + " + toString(numericalKeyPressed + 1));
2726 }
2727 // Call manually onCmdToggleTAZDrawFill
2728 viewNet->onCmdToggleTAZDrawFill(obj, sel, nullptr);
2729 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyFrom) {
2730 // Toggle menuCheckToggleTAZRelOnlyFrom
2732 // show extra information for tests
2733 WRITE_DEBUG("Disabled toggle TAZRel only from through alt + " + toString(numericalKeyPressed + 1));
2734 } else {
2735 // show extra information for tests
2736 WRITE_DEBUG("Enabled toggle TAZRel only from through alt + " + toString(numericalKeyPressed + 1));
2737 }
2738 // Call manually onCmdToggleTAZRelOnlyFrom
2739 viewNet->onCmdToggleTAZRelOnlyFrom(obj, sel, nullptr);
2740 } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyTo) {
2741 // Toggle menuCheckToggleTAZRelOnlyTo
2742 if (viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyTo->amChecked() == TRUE) {
2743 // show extra information for tests
2744 WRITE_DEBUG("Disabled toggle TAZRel only to through alt + " + toString(numericalKeyPressed + 1));
2745 } else {
2746 // show extra information for tests
2747 WRITE_DEBUG("Enabled toggle TAZRel only to through alt + " + toString(numericalKeyPressed + 1));
2748 }
2749 // Call manually onCmdToggleTAZRelOnlyTo
2750 viewNet->onCmdToggleTAZRelOnlyTo(obj, sel, nullptr);
2751 } else {
2752 return false;
2753 }
2754 return true;
2755}
2756
2757
2758bool
2759GNEApplicationWindowHelper::stringEndsWith(const std::string& str, const std::string& suffix) {
2760 if (str.length() < suffix.length()) {
2761 return false;
2762 } else {
2763 return str.compare(str.length() - suffix.length(), suffix.length(), suffix) == 0;
2764 }
2765}
2766
2767
2768std::string
2769GNEApplicationWindowHelper::openFileDialog(FXWindow* window, bool save, bool multi) {
2770 if (save) {
2771 return openFileDialog(window, TL("Save file as"), GUIIcon::SAVE,
2772 TL("XML files (*.xml)") + std::string("\n") +
2773 TL("All files (*)"), save, multi);
2774 } else {
2775 return openFileDialog(window, TL("Open file"), GUIIcon::OPEN_SUMOCONFIG,
2776 TL("XML files (*.xml)") + std::string("\n") +
2777 TL("All files (*)"), save, multi);
2778 }
2779}
2780
2781
2782std::string
2783GNEApplicationWindowHelper::openNetworkFileDialog(FXWindow* window, bool save, bool multi) {
2784 if (save) {
2785 return openFileDialog(window, TL("Save Network file as"), GUIIcon::SAVE_NETWORKELEMENTS,
2786 TL("SUMO Network files (*.net.xml)") + std::string("\n") +
2787 TL("SUMO Network files zipped (*.net.xml.gz)") + std::string("\n") +
2788 TL("XML files (*.xml)\nAll files (*)"), save, multi);
2789 } else {
2790 return openFileDialog(window, TL("Open Network file"), GUIIcon::OPEN_NET,
2791 TL("SUMO Network files (*.net.xml,*.net.xml.gz)") + std::string("\n") +
2792 TL("XML files (*.xml)") + std::string("\n") +
2793 TL("All files (*)"), save, multi);
2794 }
2795}
2796
2797
2798std::string
2800 return openFileDialog(window, TL("Open NetConvert file"), GUIIcon::OPEN_NET,
2801 TL("Netconvert files (*.netccfg)") + std::string("\n") +
2802 TL("XML files (*.xml)") + std::string("\n") +
2803 TL("All files (*)"), false);
2804}
2805
2806
2807std::string
2809 return openFileDialog(window, TL("Save plain XML as"), GUIIcon::SAVE,
2810 TL("XML files (*.xml)") + std::string("\n") +
2811 TL("All files (*)"), true);
2812}
2813
2814
2815std::string
2817 return openFileDialog(window, TL("Save joined Junctions as"), GUIIcon::SAVE,
2818 TL("Junction files (*.nod.xml)") + std::string("\n") +
2819 TL("XML files (*.xml)") + std::string("\n") +
2820 TL("All files (*)"), true);
2821}
2822
2823
2824std::string
2826 return openFileDialog(window, TL("Save tool log"), GUIIcon::SAVE,
2827 TL("Text file (*.txt)") + std::string("\n") +
2828 TL("All files (*)"), true);
2829}
2830
2831
2832std::string
2834 return openFileDialog(window, TL("Open OSM file"), GUIIcon::OPEN_NET,
2835 TL("OSM net (*.osm.xml,*.osm)"), false);
2836}
2837
2838
2839std::string
2841 if (save) {
2842 return openFileDialog(window, TL("Save netedit Config file as"), GUIIcon::SAVE_NETEDITCONFIG,
2843 TL("Netedit Config files (*.netecfg)") + std::string("\n") +
2844 TL("All files (*)"), save);
2845 } else {
2846 return openFileDialog(window, TL("Open netedit Config file"), GUIIcon::OPEN_NETEDITCONFIG,
2847 TL("Netedit Config files (*.netecfg)") + std::string("\n") +
2848 TL("Netedit Config files (*.neteditcfg)") + std::string("\n") + // neteditcfg deprecated
2849 TL("All files (*)"), save);
2850 }
2851}
2852
2853
2854std::string
2855GNEApplicationWindowHelper::openSumoConfigFileDialog(FXWindow* window, bool save, bool multi) {
2856 if (save) {
2857 return openFileDialog(window, TL("Save SUMO Config file as"), GUIIcon::SAVE_SUMOCONFIG,
2858 TL("SUMO Config files (*.sumocfg)") + std::string("\n") +
2859 TL("All files (*)"), save, multi);
2860 } else {
2861 return openFileDialog(window, TL("Open SUMO Config file"), GUIIcon::OPEN_SUMOCONFIG,
2862 TL("SUMO Config files (*.sumocfg)") + std::string("\n") +
2863 TL("All files (*)"), save, multi);
2864 }
2865}
2866
2867
2868std::string
2870 if (save) {
2871 return openFileDialog(window, TL("Save TLS file as"), GUIIcon::SAVE_NETWORKELEMENTS,
2872 TL("TLS files (*.tll.xml)") + std::string("\n") +
2873 TL("XML files (*.xml)") + std::string("\n") +
2874 TL("All files (*)"), save);
2875 } else {
2876 return openFileDialog(window, TL("Open TLS file"), GUIIcon::OPEN_TLSPROGRAMS,
2877 TL("TLS files (*.tll.xml)") + std::string("\n") +
2878 TL("XML files (*.xml)") + std::string("\n") +
2879 TL("All files (*)"), save);
2880 }
2881}
2882
2883
2884std::string
2886 if (save) {
2887 return openFileDialog(window, TL("Save EdgeType file as"), GUIIcon::SAVE_NETWORKELEMENTS,
2888 TL("EdgeType files (*.typ.xml)") + std::string("\n") +
2889 TL("XML files (*.xml)") + std::string("\n") +
2890 TL("All files (*)"), save);
2891 } else {
2892 return openFileDialog(window, TL("Open EdgeType file"), GUIIcon::OPEN_NET,
2893 TL("EdgeType files (*.typ.xml)") + std::string("\n") +
2894 TL("XML files (*.xml)") + std::string("\n") +
2895 TL("All files (*)"), save);
2896 }
2897}
2898
2899
2900std::string
2901GNEApplicationWindowHelper::openAdditionalFileDialog(FXWindow* window, bool save, bool multi) {
2902 if (save) {
2903 return openFileDialog(window, TL("Save Additionals file as"), GUIIcon::SAVE_ADDITIONALELEMENTS,
2904 TL("Additional files (*.add.xml)") + std::string("\n") +
2905 TL("XML files (*.xml)") + std::string("\n") +
2906 TL("All files (*)"), save, multi);
2907 } else {
2908 return openFileDialog(window, TL("Open Additionals file"), GUIIcon::MODEADDITIONAL,
2909 TL("Additional files (*.add.xml)") + std::string("\n") +
2910 TL("XML files (*.xml)") + std::string("\n") +
2911 TL("All files (*)"), save, multi);
2912 }
2913}
2914
2915
2916std::string
2917GNEApplicationWindowHelper::openRouteFileDialog(FXWindow* window, bool save, bool multi) {
2918 if (save) {
2919 return openFileDialog(window, TL("Save Route file as"), GUIIcon::SAVE_DEMANDELEMENTS,
2920 TL("Route files (*.rou.xml)") + std::string("\n") +
2921 TL("XML files (*.xml)") + std::string("\n") +
2922 TL("All files (*)"), save, multi);
2923 } else {
2924 return openFileDialog(window, TL("Open Route file"), GUIIcon::SUPERMODEDEMAND,
2925 TL("Route files (*.rou.xml)") + std::string("\n") +
2926 TL("XML files (*.xml)") + std::string("\n") +
2927 TL("All files (*)"), save, multi);
2928 }
2929}
2930
2931
2932std::string
2933GNEApplicationWindowHelper::openDataFileDialog(FXWindow* window, bool save, bool multi) {
2934 if (save) {
2935 return openFileDialog(window, TL("Save Data file as"), GUIIcon::SAVE_DATAELEMENTS,
2936 TL("Data files (*.dat.xml)") + std::string("\n") +
2937 TL("XML files (*.xml)") + std::string("\n") +
2938 TL("All files (*)"), save, multi);
2939 } else {
2940 return openFileDialog(window, TL("Open Data file"), GUIIcon::SUPERMODEDATA,
2941 TL("Data files (*.dat.xml)") + std::string("\n") +
2942 TL("XML files (*.xml)") + std::string("\n") +
2943 TL("All files (*)"), save, multi);
2944 }
2945}
2946
2947
2948std::string
2949GNEApplicationWindowHelper::openMeanDataDialog(FXWindow* window, bool save, bool multi) {
2950 if (save) {
2951 return openFileDialog(window, TL("Save MeanData file as"), GUIIcon::SAVE_MEANDATAELEMENTS,
2952 TL("Meandata files (*.add.xml)") + std::string("\n") +
2953 TL("XML files (*.xml)") + std::string("\n") +
2954 TL("All files (*)"), save, multi);
2955 } else {
2956 return openFileDialog(window, TL("Open MeanData file"), GUIIcon::MODEMEANDATA,
2957 TL("Meandata files (*.add.xml)") + std::string("\n") +
2958 TL("XML files (*.xml)") + std::string("\n") +
2959 TL("All files (*)"), save, multi);
2960 }
2961}
2962
2963
2964std::string
2966 if (save) {
2967 return openFileDialog(window, TL("Save options file as"), GUIIcon::SAVE,
2968 TL("XML files (*.xml)") + std::string("\n") +
2969 TL("All files (*)"), save);
2970 } else {
2971 return openFileDialog(window, TL("Open options file"), GUIIcon::OPEN,
2972 TL("XML files (*.xml)") + std::string("\n") +
2973 TL("All files (*)"), save);
2974 }
2975}
2976
2977
2978std::string
2979GNEApplicationWindowHelper::openFileDialog(FXWindow* window, const std::string title,
2980 GUIIcon icon, const std::string patternList, bool save, bool multi) {
2981 // write title information
2982 WRITE_DEBUG(title);
2983 // configure open dialog
2984 FXFileDialog opendialog(window, title.c_str());
2985 // check if allow to create a new file, or select only existent files
2986 if (save) {
2987 opendialog.setSelectMode(SELECTFILE_ANY);
2988 } else {
2989 if (multi) {
2990 opendialog.setSelectMode(SELECTFILE_MULTIPLE);
2991 } else {
2992 opendialog.setSelectMode(SELECTFILE_EXISTING);
2993 }
2994 }
2995 // set icon and pattern list
2996 opendialog.setIcon(GUIIconSubSys::getIcon(icon));
2997 opendialog.setPatternList(patternList.c_str());
2998 // set current folder
2999 if (gCurrentFolder.length() != 0) {
3000 opendialog.setDirectory(gCurrentFolder);
3001 }
3002 // open dialog
3003 if (opendialog.execute()) {
3004 // continue depending if we're loading or saving
3005 if (save) {
3006 // check if overwritte file
3007 if (MFXUtils::userPermitsOverwritingWhenFileExists(window, opendialog.getFilename())) {
3008 // close save dialog
3009 WRITE_DEBUG("Close save dialog sucesfully");
3010 // udpate current folder
3011 gCurrentFolder = opendialog.getDirectory();
3012 // assureExtension
3013 return MFXUtils::assureExtension(opendialog.getFilename(),
3014 opendialog.getPatternText(opendialog.getCurrentPattern()).after('.').before(')')).text();
3015 } else {
3016 // close additional dialog
3017 WRITE_DEBUG("Abort overwritte file");
3018 // return empty file
3019 return "";
3020 }
3021 } else {
3022 // close load dialog
3023 WRITE_DEBUG("Close load dialog sucesfully");
3024 // udpate current folder
3025 gCurrentFolder = opendialog.getDirectory();
3026 // return file
3027 if (multi) {
3028 FXString* files = opendialog.getFilenames();
3029 std::string result;
3030 bool first = true;
3031 if (files != nullptr) {
3032 for (int i = 0; !files[i].empty(); i++) {
3033 if (first) {
3034 first = false;
3035 } else {
3036 result += " ";
3037 }
3038 result += files[i].text();
3039 }
3040 delete [] files;
3041
3042 }
3043 return result;
3044 } else {
3045 return opendialog.getFilename().text();
3046 }
3047 }
3048 } else {
3049 // close additional dialog
3050 WRITE_DEBUG("Abort dialog");
3051 // return empty file
3052 return "";
3053 }
3054}
3055
3056/****************************************************************************/
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
@ MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES
automatically create opposite edge
Definition GUIAppEnum.h:847
@ MID_GNE_NETGENERATE
netgenerate dialog
Definition GUIAppEnum.h:761
@ MID_HOTKEY_SHIFT_F10_SUMOOPTIONSMENU
open SUMO options menu (used in netedit)
Definition GUIAppEnum.h:272
@ MID_HOTKEY_SHIFT_F7_ADJUST_PERSON_PLANS
Adjust person plans (start und end positions, arrival positions, etc.)
Definition GUIAppEnum.h:270
@ MID_HOTKEY_SHIFT_F5_COMPUTEJUNCTIONS_VOLATILE
compute junctions with volatile options
Definition GUIAppEnum.h:268
@ MID_HOTKEY_CTRL_SHIFT_B_SAVEDATAELEMENTS
save Data Elements
Definition GUIAppEnum.h:204
@ MID_HOTKEY_F3_SUPERMODE_DEMAND
select demand supermode in netedit
Definition GUIAppEnum.h:234
@ MID_GNE_UNDOLISTDIALOG
open undo list dialog
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS
show all person plans
Definition GUIAppEnum.h:879
@ MID_GNE_UNLOCK_ALLELEMENTS
unlock all element
Definition GUIAppEnum.h:857
@ MID_HOTKEY_SHIFT_S_LOCATESTOP
Locate stop - button.
Definition GUIAppEnum.h:188
@ MID_HOTKEY_CTRL_T_OPENNETEDIT_OPENSUMO
Open current SUMO simulation/network in netedit, or current netedit simulation/network in SUMO.
Definition GUIAppEnum.h:123
@ MID_GNE_DATAVIEWOPTIONS_TAZRELDRAWING
toggle TAZRel drawing
Definition GUIAppEnum.h:903
@ MID_GNE_TOGGLE_COMPUTE_NETWORK_DATA
enable/disable computing after switchin between supermodes
Definition GUIAppEnum.h:795
@ MID_TOOLBAREDIT_LOADADDITIONALS
load additionals in sumo-gui/netedit after press ctrl+T
Definition GUIAppEnum.h:681
@ MID_HOTKEY_U_MODE_DECAL_TYPEDISTRIBUTION
hotkey for mode decal AND type distribution
Definition GUIAppEnum.h:69
@ MID_GNE_NETWORKVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
Definition GUIAppEnum.h:821
@ MID_HOTKEY_CTRL_Y_REDO
Undo.
Definition GUIAppEnum.h:133
@ MID_HOTKEY_CTRL_SHIFT_H_SAVEEDGETYPES
save Edge Types
Definition GUIAppEnum.h:212
@ MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION
move elevation instead of x,y
Definition GUIAppEnum.h:843
@ MID_GNE_TOOLBARFILE_RELOAD_EDGETYPES
reload edge types
Definition GUIAppEnum.h:733
@ MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS
hide connections
Definition GUIAppEnum.h:829
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS
show connections
Definition GUIAppEnum.h:827
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYTO
toggle draw TAZRel only to
Definition GUIAppEnum.h:909
@ MID_HOTKEY_CTRL_W_CLOSESIMULATION
Close simulation - ID.
Definition GUIAppEnum.h:129
@ MID_GNE_LOCK_ALLELEMENTS
lock all element
Definition GUIAppEnum.h:855
@ MID_HOTKEY_F7_JOIN_SELECTEDJUNCTIONS_ROUTES
join selected junctions in network mode and normalice demand element ids in demand mode
Definition GUIAppEnum.h:242
@ MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMANDELEMENTS
Perform a single simulation step in SUMO and open Demand Elements in netedit.
Definition GUIAppEnum.h:89
@ MID_HOTKEY_F5_COMPUTE_NETWORK_DEMAND
compute Network in network mode and Demand elements in demand mode
Definition GUIAppEnum.h:238
@ MID_HOTKEY_CTRL_O_OPENSIMULATION_OPENNETWORK
Open simulation in SUMO and open network in netedit.
Definition GUIAppEnum.h:111
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWTAZELEMENTS
show TAZ elements
Definition GUIAppEnum.h:833
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON
lock person
Definition GUIAppEnum.h:881
@ MID_HOTKEY_Z_MODE_TAZ_TAZREL
hotkey for mode editing TAZ and TAZRel
Definition GUIAppEnum.h:75
@ MID_HOTKEY_F9_EDIT_VIEWSCHEME
open edit scheme menu
Definition GUIAppEnum.h:246
@ MID_GNE_DEMANDVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:869
@ MID_GNE_LOCK_SELECTEDELEMENTS
lock selected element
Definition GUIAppEnum.h:859
@ MID_GNE_TOOLBARFILE_SAVESUMOCONFIG_AS
save SUMOConfig as
Definition GUIAppEnum.h:717
@ MID_GNE_TOOLBARFILE_RELOAD_TLSPROGRAMS
reload TLS Programs
Definition GUIAppEnum.h:729
@ MID_HOTKEY_A_MODE_STARTSIMULATION_ADDITIONALS_STOPS
hotkey for start simulation in SUMO and set editing mode additionals AND stops in netedit
Definition GUIAppEnum.h:43
@ MID_CHANGELOG
changelog button
Definition GUIAppEnum.h:655
@ MID_GNE_NETWORKVIEWOPTIONS_ASKFORMERGE
ask before merging junctions
Definition GUIAppEnum.h:839
@ MID_GNE_TOOLBARFILE_OPENFOREIGN
open foreign network
Definition GUIAppEnum.h:707
@ MID_GNE_TOOLBARFILE_RELOAD_NETEDITCONFIG
reload neteditConfig
Definition GUIAppEnum.h:711
@ MID_HOTKEY_CTRL_B_EDITBREAKPOINT_OPENDATAELEMENTS
Edit simulation breakpoints in SUMO and open Data Elements in netedit.
Definition GUIAppEnum.h:85
@ MID_TOOLBAREDIT_LOADDEMAND
load demand in sumo-gui/netedit after press ctrl+T
Definition GUIAppEnum.h:683
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWGRID
show grid
Definition GUIAppEnum.h:867
@ MID_HOTKEY_F1_ONLINEDOCUMENTATION
open online documentation
Definition GUIAppEnum.h:230
@ MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMANDELEMENTS
Save Demand Elements.
Definition GUIAppEnum.h:208
@ MID_HOTKEY_CTRL_R_RELOAD
Reload the previously loaded simulation.
Definition GUIAppEnum.h:119
@ MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK
Stop the simulation in SUMO and save network in netedit.
Definition GUIAppEnum.h:117
@ MID_GNE_TOOLBARFILE_RELOAD_MEANDATAS
reload meanDatas
Definition GUIAppEnum.h:747
@ MID_HOTKEY_D_MODE_SINGLESIMULATIONSTEP_DELETE
hotkey for perform a single simulation step in SUMO and set delete mode in netedit
Definition GUIAppEnum.h:49
@ MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES
create edges in chain mode
Definition GUIAppEnum.h:845
@ MID_GNE_TOOLBARFILE_SAVEDATA_AS
save data elements as
Definition GUIAppEnum.h:739
@ MID_HOTKEY_F10_OPTIONSMENU
open options menu
Definition GUIAppEnum.h:248
@ MID_HOTKEY_F11_FRONTELEMENT
set/clear front element
Definition GUIAppEnum.h:250
@ MID_HOTKEY_F8_CLEANINVALID_CROSSINGS_DEMANDELEMENTS
clean invalid crossings in network mode and demand elements in demand mode
Definition GUIAppEnum.h:244
@ MID_GNE_DATAVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition GUIAppEnum.h:901
@ MID_HOTKEY_C_MODE_CONNECT_CONTAINER
hotkey for mode connecting lanes AND container
Definition GUIAppEnum.h:45
@ MID_HOTKEY_H_MODE_PROHIBITION_CONTAINERPLAN
hotkey for mode prohibition AND container plan
Definition GUIAppEnum.h:53
@ MID_HOTKEY_SHIFT_O_LOCATEPOI
Locate poi - button.
Definition GUIAppEnum.h:182
@ MID_HOTKEY_W_MODE_WIRE_ROUTEDISTRIBUTION
hotkey for mode editing overhead wires AND route distributions
Definition GUIAppEnum.h:73
@ MID_HOTKEY_T_MODE_TLS_TYPE
hotkey for mode editing TLS AND Vehicle Types
Definition GUIAppEnum.h:67
@ MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES
hide shapes
Definition GUIAppEnum.h:875
@ MID_GNE_TOGGLE_UNDOREDO
enable/disable undo-redo
Definition GUIAppEnum.h:797
@ MID_HOTKEY_SHIFT_A_LOCATEADDITIONAL
Locate additional structure - button.
Definition GUIAppEnum.h:172
@ MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS
save TLS Programs as
Definition GUIAppEnum.h:727
@ MID_GNE_DATAVIEWOPTIONS_SHOWADDITIONALS
show additionals
Definition GUIAppEnum.h:897
@ MID_HOTKEY_SHIFT_R_LOCATEROUTE
Locate route - button.
Definition GUIAppEnum.h:186
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES
show junctions as bubbles
Definition GUIAppEnum.h:841
@ MID_HOTKEY_SHIFT_W_LOCATEWALKINGAREA
Locate edge - button.
Definition GUIAppEnum.h:194
@ MID_GNE_TOOLBARFILE_RELOAD_DEMANDELEMENTS
reload demand elements
Definition GUIAppEnum.h:737
@ MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION
extend selection
Definition GUIAppEnum.h:835
@ MID_HOTKEY_CTRL_I_EDITVIEWPORT
Open viewport editor.
Definition GUIAppEnum.h:99
@ MID_RECENTFILE
Loads a file previously loaded.
Definition GUIAppEnum.h:318
@ MID_HOTKEY_S_MODE_STOPSIMULATION_SELECT
hotkey for stop simulation in SUMO and set select mode in netedit
Definition GUIAppEnum.h:63
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWSUBADDITIONALS
show sub-additionals
Definition GUIAppEnum.h:831
@ MID_HOTKEY_SHIFT_C_LOCATECONTAINER
Locate container - button.
Definition GUIAppEnum.h:174
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLCONTAINERPLANS
show all container plans
Definition GUIAppEnum.h:883
@ MID_HOTKEY_CTRL_SHIFT_N_NEWWINDOW
open a new window (SUMO AND netedit)
Definition GUIAppEnum.h:218
@ MID_HOTKEY_SHIFT_V_LOCATEVEHICLE
Locate vehicle - button.
Definition GUIAppEnum.h:192
@ MID_HOTKEY_F4_SUPERMODE_DATA
select data supermode in netedit
Definition GUIAppEnum.h:236
@ MID_HOTKEY_SHIFT_L_LOCATEPOLY
Locate polygons - button.
Definition GUIAppEnum.h:180
@ MID_HOTKEY_F6_CLEAN_SOLITARYJUNCTIONS_UNUSEDROUTES
clean junctions without edges in network mode and unused routes in demand mode
Definition GUIAppEnum.h:240
@ MID_HOTKEY_CTRL_K_OPENTLSPROGRAMS
Load file with TLS Programs.
Definition GUIAppEnum.h:103
@ MID_GNE_LOCK_ELEMENT
lock element
Definition GUIAppEnum.h:853
@ MID_GNE_TOOLBARFILE_SAVENETEDITCONFIG_AS
save neteditConfig as
Definition GUIAppEnum.h:713
@ MID_HOTKEY_SHIFT_E_LOCATEEDGE
Locate edge - button.
Definition GUIAppEnum.h:176
@ MID_CLEARMESSAGEWINDOW
Clear simulation output.
Definition GUIAppEnum.h:367
@ MID_GNE_TOOLBARFILE_OPENMEANDATAS
open meanData file
Definition GUIAppEnum.h:743
@ MID_HOTKEY_R_MODE_CROSSING_ROUTE_EDGERELDATA
hotkey for mode editing crossing, routes and edge rel datas
Definition GUIAppEnum.h:65
@ MID_TUTORIAL
tutorial button
Definition GUIAppEnum.h:659
@ MID_GNE_TOGGLE_UNDOREDO_LOADING
enable/disable undo-redo during loading
Definition GUIAppEnum.h:799
@ MID_GNE_DATAVIEWOPTIONS_TAZDRAWFILL
toggle draw TAZ fill
Definition GUIAppEnum.h:905
@ MID_HOTKEY_CTRL_SHIFT_M_SAVEMEANDATAS
save Mean Datas
Definition GUIAppEnum.h:216
@ MID_HOTKEY_L_MODE_PERSONPLAN
hotkey for mode person plan
Definition GUIAppEnum.h:57
@ MID_GNE_TOOLBARFILE_SAVEMEANDATAS_AS
save meanDatas as
Definition GUIAppEnum.h:745
@ MID_GNE_TOOLBARFILE_RELOAD_ADDITIONALS
reload additionals
Definition GUIAppEnum.h:725
@ MID_HOTKEY_V_MODE_VEHICLE
hotkey for mode create vehicles
Definition GUIAppEnum.h:71
@ MID_HOTKEY_SHIFT_P_LOCATEPERSON
Locate person - button.
Definition GUIAppEnum.h:184
@ MID_HOTKEY_I_MODE_INSPECT
hotkey for mode inspecting object attributes
Definition GUIAppEnum.h:55
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition GUIAppEnum.h:823
@ MID_HOTKEY_SHIFT_J_LOCATEJUNCTION
Locate junction - button.
Definition GUIAppEnum.h:178
@ MID_HOTKEY_CTRL_SHIFT_E_SAVENETEDITCONFIG
save netedit Config
Definition GUIAppEnum.h:210
@ MID_GNE_TOOLBARFILE_SAVEADDITIONALS_AS
save additionals as
Definition GUIAppEnum.h:721
@ MID_GNE_TOOLBARFILE_SAVEEDGETYPES_AS
save edgeTypes as
Definition GUIAppEnum.h:731
@ MID_HOTKEYS
hotkeys button
Definition GUIAppEnum.h:657
@ MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED
hide non-inspected demand element
Definition GUIAppEnum.h:873
@ MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS
Save Additional Elements.
Definition GUIAppEnum.h:202
@ MID_GNE_TOOLBARFILE_RELOADNETWORK
reload only network
Definition GUIAppEnum.h:705
@ MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES
change all phases
Definition GUIAppEnum.h:837
@ MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS
Start the simulation in SUMO and open Additionals Elements in netedit.
Definition GUIAppEnum.h:83
@ MID_GNE_DATAVIEWOPTIONS_SHOWSHAPES
show shapes
Definition GUIAppEnum.h:899
@ MID_HOTKEY_E_MODE_EDGE_EDGEDATA
hotkey for mode adding edges AND edgeDatas
Definition GUIAppEnum.h:51
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYFROM
toggle draw TAZRel only from
Definition GUIAppEnum.h:907
@ MID_GNE_TOOLBARFILE_RELOAD_SUMOCONFIG
reload SUMOConfig
Definition GUIAppEnum.h:715
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:819
@ MID_HOTKEY_CTRL_SHIFT_O_OPENNETCONVERTFILE
open Netconvert file
Definition GUIAppEnum.h:220
@ MID_HOTKEY_CTRL_M_OPENSUMOCONFIG
open sumo config
Definition GUIAppEnum.h:107
@ MID_GNE_TOOLBARFILE_SAVEDEMAND_AS
save demand elements as
Definition GUIAppEnum.h:735
@ MID_GNE_TOOLBARFILE_SAVENETWORK_AS
save network as
Definition GUIAppEnum.h:719
@ MID_GNE_DEMANDVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
Definition GUIAppEnum.h:871
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWOVERLAPPEDROUTES
show overlapped routes
Definition GUIAppEnum.h:887
@ MID_HOTKEY_CTRL_Z_UNDO
Redo.
Definition GUIAppEnum.h:135
@ MID_FEEDBACK
feedback button
Definition GUIAppEnum.h:661
@ MID_HOTKEY_CTRL_H_APPSETTINGS_OPENEDGETYPES
open app setting dialog in SUMO and open edge type files in netedit
Definition GUIAppEnum.h:97
@ MID_HOTKEY_CTRL_SHIFT_S_SAVESUMOCONFIG
save SUMOConfig (SUMO AND netedit)
Definition GUIAppEnum.h:222
@ MID_HOTKEY_F12_ABOUT
open about dialog
Definition GUIAppEnum.h:254
@ MID_HOTKEY_CTRL_E_EDITSELECTION_LOADNETEDITCONFIG
Edit selection in SUMO and load neteditConfig in netedit.
Definition GUIAppEnum.h:91
@ MID_GNE_TOOLBARFILE_RELOAD_DATAELEMENTS
reload data elements
Definition GUIAppEnum.h:741
@ MID_HOTKEY_CTRL_SHIFT_K_SAVETLS
save TLS Programs
Definition GUIAppEnum.h:214
@ MID_HOTKEY_SHIFT_T_LOCATETLS
Locate TLS - button.
Definition GUIAppEnum.h:190
@ MID_HOTKEY_M_MODE_MOVE_MEANDATA
hotkey for mode moving element AND mean data
Definition GUIAppEnum.h:59
@ MID_HOTKEY_F2_SUPERMODE_NETWORK
select network supermode in netedit
Definition GUIAppEnum.h:232
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKCONTAINER
lock container
Definition GUIAppEnum.h:885
@ MID_HOTKEY_CTRL_N_OPENNETWORK_NEWNETWORK
open network in SUMO and create new empty network in netedit
Definition GUIAppEnum.h:109
@ MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES
select edges
Definition GUIAppEnum.h:825
@ MID_GNE_SAVEJOINEDJUNCTIONS
save joined junctions
Definition GUIAppEnum.h:709
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWTRIPS
show all trips
Definition GUIAppEnum.h:877
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEGRID
show grid
Definition GUIAppEnum.h:817
@ MID_GNE_TOOLBARFILE_SAVEJUPEDSIMELEMENTS_AS
save JuPedSim as
Definition GUIAppEnum.h:723
@ MID_HOTKEY_P_MODE_POLYGON_PERSON
hotkey for mode creating polygons
Definition GUIAppEnum.h:61
@ MID_HOTKEY_CTRL_L_SAVEASPLAINXML
save network as plain XML
Definition GUIAppEnum.h:105
#define GUIDesignToolbarMenuBarNetedit
design for top toolbar (file, edit, processing...) used only in netedit (due supermodes buttons)
Definition GUIDesigns.h:431
#define GUIDesignToolBarGrip
design for toolbar grip (used to change the position of toolbar with mouse)
Definition GUIDesigns.h:449
#define GUIDesignToolBar
design for default toolbar
Definition GUIDesigns.h:434
#define GUIDesignToolBarRaisedNext
design for first toolbar shell positioned in the next position of dock
Definition GUIDesigns.h:443
#define GUIDesignToolBarRaisedSupermodes
design for toolbar supermodes (grip + buttons)
Definition GUIDesigns.h:440
#define GUIDesignToolBarRaisedSame
design for toolbar
Definition GUIDesigns.h:437
FXString gCurrentFolder
The folder used as last.
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
@ CLEANJUNCTIONS
@ DATAMODE_CHECKBOX_SHOWADDITIONALS
@ SAVE_NETEDITCONFIG
@ SAVE_DATAELEMENTS
@ NETWORKMODE_CHECKBOX_BUBBLES
@ SAVE_NETWORKELEMENTS
@ DATAMODE_CHECKBOX_TAZRELONLYFROM
@ MODEPERSONPLAN
@ MODECROSSING
@ MODEMEANDATA
@ MODEADDITIONAL
@ MODEEDGERELDATA
@ EDITVIEWPORT
@ SUPERMODEDEMAND
@ CLEARMESSAGEWINDOW
@ MODEPROHIBITION
@ SAVE_ADDITIONALELEMENTS
@ DEMANDMODE_CHECKBOX_HIDENONINSPECTEDDEMANDELEMENTS
@ NETWORKMODE_CHECKBOX_HIDECONNECTIONS
@ DEMANDMODE_CHECKBOX_SHOWTRIPS
@ OPEN_ADDITIONALS
@ COMMONMODE_CHECKBOX_TOGGLEDRAWJUNCTIONSHAPE
@ NETEDIT_MINI
@ DATAMODE_CHECKBOX_SHOWSHAPES
@ NETWORKMODE_CHECKBOX_SELECTEDGES
@ COMMONMODE_CHECKBOX_SHOWDEMANDELEMENTS
@ COMPUTEJUNCTIONS
@ DEMANDMODE_CHECKBOX_LOCKPERSON
@ LOCATEVEHICLE
@ FRONTELEMENT
@ NETWORKMODE_CHECKBOX_APPLYTOALLPHASES
@ MODECREATEEDGE
@ LOCATEWALKINGAREA
@ DATAMODE_CHECKBOX_TAZRELONLYTO
@ NETWORKMODE_CHECKBOX_AUTOSELECTJUNCTIONS
@ OPEN_MEANDATAS
@ LOCATEPERSON
@ SAVE_MEANDATAELEMENTS
@ DATAMODE_CHECKBOX_TAZRELDRAWING
@ NETWORKMODE_CHECKBOX_SHOWCONNECTIONS
@ TRANSHIP_EDGE
@ LOCK_SELECTED
@ DEMANDMODE_CHECKBOX_SHOWPERSONPLANS
@ MODECONTAINER
@ DEMANDMODE_CHECKBOX_HIDESHAPES
@ JPS_WALKABLEAREA
@ DATAMODE_CHECKBOX_TAZDRAWFILL
@ MODEEDGEDATA
@ TRANSPORT_EDGE
@ NETWORKMODE_CHECKBOX_ELEVATION
@ SUPERMODENETWORK
@ JPS_OBSTACLE
@ COMMONMODE_CHECKBOX_SPREADVEHICLE
@ SAVE_DEMANDELEMENTS
@ OPEN
open icons
@ ADJUSTPERSONPLANS
@ DEMANDMODE_CHECKBOX_LOCKCONTAINER
@ NETWORKMODE_CHECKBOX_SHOWSUBADDITIONALS
@ SAVE_JUPEDSIMELEMENTS
@ LOCATECONTAINER
@ NETWORKMODE_CHECKBOX_SHOWTAZELEMENTS
@ SUPERMODEDATA
@ MODECONNECTION
@ LOCATEJUNCTION
@ MODECONTAINERPLAN
@ NETWORKMODE_CHECKBOX_CHAIN
@ COMPUTEDEMAND
@ OPEN_NETEDITCONFIG
@ DEMANDMODE_CHECKBOX_SHOWOVERLAPPEDROUTES
@ NETWORKMODE_CHECKBOX_ASKFORMERGE
@ SAVE_SUMOCONFIG
@ MODETYPEDISTRIBUTION
@ OVERHEADWIRE
@ COMMONMODE_CHECKBOX_TOGGLEGRID
@ OPEN_TLSPROGRAMS
@ JOINJUNCTIONS
@ MODEROUTEDISTRIBUTION
@ PERSONTRIP_EDGE
@ MODETAZRELDATA
@ OPEN_SUMOCONFIG
@ SAVE
save icons
@ DEMANDMODE_CHECKBOX_SHOWCONTAINERPLANS
@ NETWORKMODE_CHECKBOX_TWOWAY
#define WRITE_DEBUG(msg)
Definition MsgHandler.h:306
#define WRITE_ERROR(msg)
Definition MsgHandler.h:304
#define TL(string)
Definition MsgHandler.h:315
@ SUMO_TAG_EDGEREL
a relation between two edges
@ GNE_TAG_EDGEREL_SINGLE
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ SUMO_TAG_CONNECTION
connectioon between two lanes
@ SUMO_TAG_WALKINGAREA
walking area for pedestrians
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ GNE_TAG_POILANE
Point of interest over Lane.
@ GNE_TAG_JPS_OBSTACLE
polygon used for draw juPedSim obstacles
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ GNE_TAG_JPS_WALKABLEAREA
polygon used for draw juPedSim walkable areas
@ SUMO_TAG_EDGE
begin/end of the description of an edge
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
GNESumoConfigHandler(OptionsCont &sumoOptions, const std::string &file)
Constructor.
The main window of Netedit.
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
Dialog for netgenerate tool dialog.
Dialog for python tool dialog.
Abstract dialog for tools.
Abstract dialog for tools.
bool isPlanTransport() const
return true if tag correspond to a transport
bool isContainer() const
return true if tag correspond to a container element
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isRoute() const
return true if tag correspond to a route element
bool isVehicle() const
return true if tag correspond to a vehicle element
bool isPlanStopContainer() const
return true if tag correspond to a container stop plan
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isPlanPersonTrip() const
return true if tag correspond to a person trip plan
bool isWireElement() const
return true if tag correspond to a Wire element
bool isPlanRide() const
return true if tag correspond to a ride plan
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
bool isPlanStopPerson() const
return true if tag correspond to a person stop plan
bool isVehicleStop() const
return true if tag correspond to a vehicle stop element
bool isPerson() const
return true if tag correspond to a person element
bool isPlanWalk() const
return true if tag correspond to a walk plan
bool isPlanTranship() const
return true if tag correspond to a tranship
long onCmdToggleShowDemandElementsNetwork(FXObject *, FXSelector, void *)
toggle show demand elements (network)
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
long onCmdToggleShowDemandElementsData(FXObject *, FXSelector, void *)
toggle show demand elements (data)
long onCmdToggleTAZDrawFill(FXObject *, FXSelector, void *)
toggle TAZdrawFill
long onCmdToggleWarnAboutMerge(FXObject *, FXSelector, void *)
toggle warn for merge
long onCmdToggleDrawSpreadVehicles(FXObject *, FXSelector, void *)
toggle draw vehicles in begin position or spread in lane
long onCmdToggleShowConnections(FXObject *, FXSelector, void *)
toggle show connections
long onCmdToggleShowTAZElements(FXObject *, FXSelector, void *)
toggle show TAZ elements
long onCmdToggleMoveElevation(FXObject *, FXSelector, void *)
toggle move elevation
long onCmdToggleShowAllPersonPlans(FXObject *, FXSelector, void *)
toggle show all person plans in super mode demand
long onCmdToggleTAZRelOnlyTo(FXObject *, FXSelector, void *)
toggle TAZRez only to
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
long onCmdToggleChainEdges(FXObject *, FXSelector, void *)
toggle chain edges
long onCmdToggleLockContainer(FXObject *, FXSelector, void *)
toggle lock container in super mode demand
long onCmdToggleShowGrid(FXObject *, FXSelector, void *)
toggle show grid
long onCmdToggleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toggle hide non inspected demand elements
long onCmdToggleDrawJunctionShape(FXObject *, FXSelector, void *)
toggle draw junction shape
long onCmdToggleShowShapes(FXObject *, FXSelector, void *)
toggle show shapes in super mode data
long onCmdToggleExtendSelection(FXObject *, FXSelector, void *)
toggle extend selection
long onCmdToggleShowOverlappedRoutes(FXObject *, FXSelector, void *)
toggle hide non inspected demand elements
long onCmdToggleAutoOppositeEdge(FXObject *, FXSelector, void *)
toggle autoOpposite edge
long onCmdToggleChangeAllPhases(FXObject *, FXSelector, void *)
toggle change all phases
long onCmdToggleTAZRelDrawing(FXObject *, FXSelector, void *)
toggle TAZRel drawing
long onCmdToggleShowJunctionBubbles(FXObject *, FXSelector, void *)
toggle show junction bubbles
long onCmdToggleShowAdditionalSubElements(FXObject *, FXSelector, void *)
toggle show additional sub-elements
long onCmdToggleShowAllContainerPlans(FXObject *, FXSelector, void *)
toggle show all container plans in super mode demand
long onCmdToggleTAZRelOnlyFrom(FXObject *, FXSelector, void *)
toggle TAZRez only from
long onCmdToggleShowAdditionals(FXObject *, FXSelector, void *)
toggle show additionals in super mode data
long onCmdToggleLockPerson(FXObject *, FXSelector, void *)
toggle lock person in super mode demand
long onCmdToggleSelectEdges(FXObject *, FXSelector, void *)
toggle select edges
long onCmdToggleShowTrips(FXObject *, FXSelector, void *)
toggle show all trips in super mode demand
long onCmdToggleHideShapes(FXObject *, FXSelector, void *)
toggle hide shapes in super mode demand
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
long onCmdToggleHideConnections(FXObject *, FXSelector, void *)
toggle hide connections
static MFXMenuCheckIcon * buildFXMenuCheckboxIcon(FXComposite *p, const std::string &text, const std::string &shortcut, const std::string &info, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu checkbox with icon
static FXMenuCommand * buildFXMenuCommandRecentFile(FXComposite *p, const std::string &text, FXObject *tgt, FXSelector sel)
build menu command (for recent files)
static FXMenuCheck * buildFXMenuCheckbox(FXComposite *p, const std::string &text, const std::string &info, FXObject *tgt, FXSelector sel)
build menu checkbox
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
static FXMenuCommand * buildFXMenuCommandShortcut(FXComposite *p, const std::string &text, const std::string &shortcut, const std::string &info, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
A logging window for the gui.
bool amChecked() const
check if this MFXCheckableButton is checked
static FXbool userPermitsOverwritingWhenFileExists(FXWindow *const parent, const FXString &file)
Returns true if either the file given by its name does not exist or the user allows overwriting it.
Definition MFXUtils.cpp:39
static FXString assureExtension(const FXString &filename, const FXString &defaultExtension)
Corrects missing extension.
Definition MFXUtils.cpp:69
A storage for options typed value containers)
Definition OptionsCont.h:89
static OptionsCont & getOptions()
Retrieves the options.
A SAX-Handler for loading options.
bool errorOccurred() const
Returns the information whether an error occurred.
static std::string replace(std::string str, const std::string &what, const std::string &by)
Replaces all occurrences of the second string by the third string within the first string.
static std::string transcode(const XMLCh *const data)
converts a 0-terminated XMLCh* array (usually UTF-16, stemming from Xerces) into std::string in UTF-8
static std::string transcodeToLocal(const std::string &utf8String)
convert a string from UTF-8 to the local codepage
EditMenuCommands(GNEApplicationWindow *GNEApp)
constructor
DemandViewOptions demandViewOptions
demand view options
NetworkViewOptions networkViewOptions
network view options
void buildUndoRedoMenuCommands(FXMenuPane *editMenu)
build undo-redo menu commands
void buildViewMenuCommands(FXMenuPane *editMenu)
build view menu commands
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindow
void buildOpenSUMOMenuCommands(FXMenuPane *editMenu)
build open sumo menu commands
void buildFrontElementMenuCommand(FXMenuPane *editMenu)
build front element commands
void buildEdgeTypeSection(FXMenuPane *menuPane)
build edge type section
FileMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void buildDemandSection(FXMenuPane *menuPane)
build demand section
void buildFileMenuCommands(FXMenuPane *fileMenu, FXMenuPane *fileMenuNEEDITConfig, FXMenuPane *fileMenuSumoConfig, FXMenuPane *fileMenuTLS, FXMenuPane *fileMenuEdgeTypes, FXMenuPane *fileMenuAdditionals, FXMenuPane *fileMenuDemandElements, FXMenuPane *fileMenuDataElements, FXMenuPane *fileMenuMeanDataElements)
build menu commands
void buildDataSection(FXMenuPane *menuPane)
build data section
void buildTrafficLightSection(FXMenuPane *menuPane)
build traffic light section
void buildAdditionalSection(FXMenuPane *menuPane)
build additional section
void buildMeanDataSection(FXMenuPane *menuPane)
build meanData section
void buildNeteditConfigSection(FXMenuPane *menuPane)
build netedit config section
void buildSumoConfigSection(FXMenuPane *menuPane)
build SUMO Config section
void buildHelpMenuCommands(FXMenuPane *helpMenu)
build menu commands
HelpMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void buildLocateMenuCommands(FXMenuPane *locateMenu)
build menu commands
LocateMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void buildLockMenuCommands(FXMenuPane *editMenu)
build menu commands
void hideNetworkLockMenuCommands()
show network processing menu commands
void hideDemandLockMenuCommands()
show demand processing menu commands
void hideDataLockMenuCommands()
show data processing menu commands
void showDataLockMenuCommands()
show data processing menu commands
LockMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void showNetworkLockMenuCommands()
show network processing menu commands
FXHotKey parseHotKey(const FXwchar character)
Parse hot key from string.
void showDemandLockMenuCommands()
show demand processing menu commands
void editLocking(const GNEAttributeCarrier *AC, const FXbool value)
lock or unlock object based in a tag property
void buildRecentConfigFiles(FXMenuPane *fileMenu, FXMenuPane *fileMenuRecentConfigFiles)
build recent config
MenuBarFile(GNEApplicationWindow *GNEApp)
constructor
void buildRecentNetworkFiles(FXMenuPane *fileMenu, FXMenuPane *fileMenuRecentNetworkFiles)
build recent network
CommonMenuCommands(const ModesMenuCommands *modesMenuCommandsParent)
constructor
DataMenuCommands(const ModesMenuCommands *modesMenuCommandsParent)
constructor
DemandMenuCommands(const ModesMenuCommands *modesMenuCommandsParent)
constructor
NetworkMenuCommands(const ModesMenuCommands *modesMenuCommandsParent)
constructor
CommonMenuCommands commonMenuCommands
Common Menu Commands.
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindow
void buildModesMenuCommands(FXMenuPane *modesMenu)
build modes menu commands
ModesMenuCommands(GNEApplicationWindow *GNEApp)
constructor
DemandMenuCommands demandMenuCommands
Demand Menu Commands.
void setDefaultView(Supermode supermode)
set default view
void setJuPedSimView(Supermode supermode)
set JuPedSim view
NetworkMenuCommands networkMenuCommands
Network Menu Commands.
void showDataProcessingMenuCommands()
show data processing menu commands
void showDemandProcessingMenuCommands()
show demand processing menu commands
void hideDemandProcessingMenuCommands()
show demand processing menu commands
void hideDataProcessingMenuCommands()
show data processing menu commands
void buildProcessingMenuCommands(FXMenuPane *processingMenu)
build menu commands
void showNetworkProcessingMenuCommands()
show network processing menu commands
ProcessingMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void hideNetworkProcessingMenuCommands()
show network processing menu commands
void buildSupermodeCommands(FXMenuPane *editMenu)
build menu commands
SupermodeCommands(GNEApplicationWindow *GNEApp)
constructor
ToolbarsGrip(GNEApplicationWindow *GNEApp)
constructor
long postProcessing(FXObject *menuCommand) const
run postprocessing
void buildTools(FXMenuPane *toolsMenu, const std::map< std::string, FXMenuPane * > &menuPaneToolMaps)
build tools (and menu commands)
ToolsMenuCommands(GNEApplicationWindow *GNEApp)
constructor
long showTool(FXObject *menuCommand) const
show tool
long runNetgenerateDialog(const OptionsCont *netgenerateOptions) const
run netgenerate dialog
long runToolDialog(FXObject *menuCommand) const
run tool dialog
WindowsMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void buildWindowsMenuCommands(FXMenuPane *windowsMenu, FXStatusBar *statusbar, GUIMessageWindow *messageWindow)
build menu commands
static bool toggleEditOptionsData(GNEViewNet *viewNet, const MFXCheckableButton *menuCheck, const int numericalKeyPressed, FXObject *obj, FXSelector sel)
toggle edit options Data menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)
static std::string openRouteFileDialog(FXWindow *window, bool save, bool multi=false)
open route file dialog
static bool stringEndsWith(const std::string &str, const std::string &suffix)
check if a string ends with another string
static std::string openMeanDataDialog(FXWindow *window, bool save, bool multi=false)
open meandata filename dialog
static std::string openAdditionalFileDialog(FXWindow *window, bool save, bool multi=false)
open additional dialog
static std::string saveToolLog(FXWindow *window)
open tool file dialog
static std::string openOptionFileDialog(FXWindow *window, bool save)
open option dialog
static std::string openOSMFileDialog(FXWindow *window)
open OSM file dialog
static bool toggleEditOptionsDemand(GNEViewNet *viewNet, const MFXCheckableButton *menuCheck, const int numericalKeyPressed, FXObject *obj, FXSelector sel)
toggle edit options Demand menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)
static std::string saveJoinedJunctionsFileDialog(FXWindow *window)
open joined junctions file dialog
static bool toggleEditOptionsNetwork(GNEViewNet *viewNet, const MFXCheckableButton *menuCheck, const int numericalKeyPressed, FXObject *obj, FXSelector sel)
toggle edit options Network menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)
static std::string openTLSFileDialog(FXWindow *window, bool save)
open TLS file dialog
static std::string openDataFileDialog(FXWindow *window, bool save, bool multi=false)
open data file dialog
static std::string openNeteditConfigFileDialog(FXWindow *window, bool save)
open netedit config file dialog
static std::string savePlainXMLFileDialog(FXWindow *window)
open plain xml file dialog
static std::string openSumoConfigFileDialog(FXWindow *window, bool save, bool multi=false)
open SUMO config file dialog
static std::string openFileDialog(FXWindow *window, bool save, bool multi)
open general file dialog
static std::string openEdgeTypeFileDialog(FXWindow *window, bool save)
open edgeType file dialog
static std::string openNetworkFileDialog(FXWindow *window, bool save, bool multi=false)
open netconvert file dialog
static std::string openNetconvertFileDialog(FXWindow *window)
open netconvert file dialog
MFXCheckableButton * menuCheckToggleTAZDrawFill
menu check to toggle TAZ draw fill
MFXCheckableButton * menuCheckShowAdditionals
menu check to show Additionals
MFXCheckableButton * menuCheckShowShapes
menu check to show Shapes
MFXCheckableButton * menuCheckToggleTAZRelOnlyFrom
menu check to toggle TAZRel only from
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
MFXCheckableButton * menuCheckToggleTAZRelDrawing
menu check to toggle TAZ Rel drawing
MFXCheckableButton * menuCheckShowDemandElements
menu check to show Demand Elements
MFXCheckableButton * menuCheckToggleTAZRelOnlyTo
menu check to toggle TAZRel only to
MFXCheckableButton * menuCheckShowAllTrips
show all trips
MFXCheckableButton * menuCheckToggleGrid
menu check to show grid button
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
MFXCheckableButton * menuCheckDrawSpreadVehicles
menu check to draw vehicles in begin position or spread in lane
MFXCheckableButton * menuCheckShowOverlappedRoutes
show overlapped routes
MFXCheckableButton * menuCheckShowAllPersonPlans
show all person plans
MFXCheckableButton * menuCheckShowAllContainerPlans
show all container plans
MFXCheckableButton * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
MFXCheckableButton * menuCheckHideShapes
Hide shapes (Polygons and POIs)
MFXCheckableButton * menuCheckLockPerson
Lock Person.
MFXCheckableButton * menuCheckLockContainer
Lock Container.
MFXCheckableButton * menuCheckSelectEdges
checkable button to select only edges
MFXCheckableButton * menuCheckChainEdges
checkable button to the endpoint for a created edge should be set as the new source
MFXCheckableButton * menuCheckShowDemandElements
checkable button to show Demand Elements
MFXCheckableButton * menuCheckMoveElevation
checkable button to apply movement to elevation
MFXCheckableButton * menuCheckShowTAZElements
checkable button to show TAZ elements
MFXCheckableButton * menuCheckAutoOppositeEdge
check checkable to create auto create opposite edge
MFXCheckableButton * menuCheckDrawSpreadVehicles
checkable button to draw vehicles in begin position or spread in lane
MFXCheckableButton * menuCheckShowConnections
checkable button to show connections
MFXCheckableButton * menuCheckHideConnections
checkable button to hide connections in connect mode
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
MFXCheckableButton * menuCheckToggleGrid
checkable button to show grid button
MFXCheckableButton * menuCheckShowJunctionBubble
checkable button to show connection as bubble in "Move" mode.
MFXCheckableButton * menuCheckWarnAboutMerge
checkable button to we should warn about merging junctions
MFXCheckableButton * menuCheckShowAdditionalSubElements
checkable button to show additional sub-elements
MFXCheckableButton * menuCheckChangeAllPhases
checkable button to set change all phases
MFXCheckableButton * menuCheckExtendSelection
checkable button to extend to edge nodes