Path: blob/main/src/netedit/GNEApplicationWindowHelper.h
169666 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNEApplicationWindowHelper.h14/// @author Pablo Alvarez Lopez15/// @date mar 202016///17// Functions from main window of netedit18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/dialogs/file/GNEFileDialog.h>23#include <utils/common/SUMOTime.h>24#include <utils/foxtools/MFXSynchQue.h>25#include <utils/foxtools/MFXRecentNetworks.h>26#include <utils/foxtools/MFXThreadEvent.h>27#include <utils/foxtools/MFXInterThreadEventClient.h>28#include <utils/geom/Position.h>29#include <utils/gui/div/GUIMessageWindow.h>30#include <utils/gui/windows/GUIMainWindow.h>31#include <utils/shapes/ShapeHandler.h>32#include <utils/options/OptionsCont.h>33#include <utils/tests/InternalTestStep.h>3435#include "GNEViewNetHelper.h"363738// ===========================================================================39// class declarations40// ===========================================================================4142class GNEApplicationWindow;43class GNENet;44class GNENetgenerateDialog;45class GNEPythonTool;46class GNEPythonToolDialog;47class GNERunNetgenerateDialog;48class GNERunPythonToolDialog;49class GNEViewNet;50class MFXMenuCheckIcon;5152// ===========================================================================53// class definition54// ===========================================================================5556struct GNEApplicationWindowHelper {5758/// @brief struct for griped toolbars59struct ToolbarsGrip {6061/// @brief constructor62ToolbarsGrip(GNEApplicationWindow* applicationWindow);6364/// @brief build menu toolbar grips65void buildMenuToolbarsGrip();6667/// @brief build toolbars grips68void buildViewParentToolbarsGrips();6970/// @brief build toolbars grips71void destroyParentToolbarsGrips();7273/// @brief The application menu bar (for file, edit, processing...)74FXMenuBar* menu = nullptr;7576/// @brief The application menu bar for supermodes (network, demand and data)77FXMenuBar* superModes = nullptr;7879/// @brief The application menu bar for save elements80FXMenuBar* saveElements = nullptr;8182/// @brief The application menu bar for time switch83FXMenuBar* timeSwitch = nullptr;8485/// @brief The application menu bar for navigation (zoom, coloring...)86FXMenuBar* navigation = nullptr;8788/// @brief The application menu bar (for select, inspect...)89FXMenuBar* modes = nullptr;9091/// @brief The application menu bar for mode options (show connections, select edges...)92FXMenuBar* intervalBar = nullptr;9394private:95/// @brief pointer to current GNEApplicationWindow96GNEApplicationWindow* myApplicationWindow;9798/// @brief menu bar drag (for file, edit, processing...)99FXToolBarShell* myPythonToolBarShellMenu = nullptr;100101/// @brief menu bar drag for super modes (network, demand and data)102FXToolBarShell* myPythonToolBarShellSuperModes = nullptr;103104/// @brief menu bar drag for save elements105FXToolBarShell* myPythonToolBarShellSaveElements = nullptr;106107/// @brief menu bar drag for time switch108FXToolBarShell* myPythonToolBarShellTimeFormat = nullptr;109110/// @brief menu bar drag for navigation (Zoom, coloring...)111FXToolBarShell* myPythonToolBarShellNavigation = nullptr;112113/// @brief menu bar drag for modes (select, inspect, delete...)114FXToolBarShell* myPythonToolBarShellModes = nullptr;115116/// @brief menu bar drag for interval bar117FXToolBarShell* myPythonToolBarShellIntervalBar = nullptr;118119/// @brief Invalidated copy constructor.120ToolbarsGrip(const ToolbarsGrip&) = delete;121122/// @brief Invalidated assignment operator.123ToolbarsGrip& operator=(const ToolbarsGrip&) = delete;124};125126/// @brief struct for menu bar file127struct MenuBarFile {128129/// @brief constructor130MenuBarFile(GNEApplicationWindow* applicationWindow);131132/// @brief build recent network133void buildRecentNetworkFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentNetworkFiles);134135/// @brief build recent config136void buildRecentConfigFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentConfigFiles);137138/// @brief List of recent networks139MFXRecentNetworks myRecentNetworks;140141/// @brief List of recent configs142MFXRecentNetworks myRecentConfigs;143144private:145/// @brief pointer to current GNEApplicationWindow146GNEApplicationWindow* myApplicationWindow;147148/// @brief Invalidated copy constructor.149MenuBarFile(const MenuBarFile&) = delete;150151/// @brief Invalidated assignment operator.152MenuBarFile& operator=(const MenuBarFile&) = delete;153};154155/// @brief struct for File menu commands156struct FileMenuCommands {157158/// @brief constructor159FileMenuCommands(GNEApplicationWindow* applicationWindow);160161/// @brief build menu commands162void buildFileMenuCommands(FXMenuPane* fileMenu, FXMenuPane* fileMenuNEEDITConfig, FXMenuPane* fileMenuSumoConfig,163FXMenuPane* fileMenuTLS, FXMenuPane* fileMenuEdgeTypes, FXMenuPane* fileMenuAdditionals,164FXMenuPane* fileMenuDemandElements, FXMenuPane* fileMenuDataElements,165FXMenuPane* fileMenuMeanDataElements);166167/// @brief enable menu cascades168void enableMenuCascades();169170/// @brief disable menu cascades171void disableMenuCascades();172173/// @brief set default view174void setDefaultView();175176/// @brief set JuPedSim view177void setJuPedSimView();178179/// @brief checkBox for allow undo-redo loading180FXMenuCheck* menuCheckAllowUndoRedoLoading = nullptr;181182private:183/// @brief build netedit config section184void buildNeteditConfigSection(FXMenuPane* menuPane);185186/// @brief build SUMO Config section187void buildSumoConfigSection(FXMenuPane* menuPane);188189/// @brief build traffic light section190void buildTrafficLightSection(FXMenuPane* menuPane);191192/// @brief build edge type section193void buildEdgeTypeSection(FXMenuPane* menuPane);194195/// @brief build additional section196void buildAdditionalSection(FXMenuPane* menuPane);197198/// @brief build demand section199void buildDemandSection(FXMenuPane* menuPane);200201/// @brief build data section202void buildDataSection(FXMenuPane* menuPane);203204/// @brief build meanData section205void buildMeanDataSection(FXMenuPane* menuPane);206207/// @brief pointer to current GNEApplicationWindow208GNEApplicationWindow* myApplicationWindow = nullptr;209210/// @brief FXMenuCascade for neteditConfig211FXMenuCascade* myNeteditConfigMenuCascade = nullptr;212213/// @brief FXMenuCascade for SumoConfig214FXMenuCascade* mySumoConfigMenuCascade = nullptr;215216/// @brief FXMenuCascade for TLS217FXMenuCascade* myTLSMenuCascade = nullptr;218219/// @brief FXMenuCascade for edgeTypes220FXMenuCascade* myEdgeTypesMenuCascade = nullptr;221222/// @brief FXMenuCascade for additional223FXMenuCascade* myAdditionalMenuCascade = nullptr;224225/// @brief FXMenuCascade for demand226FXMenuCascade* myDemandMenuCascade = nullptr;227228/// @brief FXMenuCascade for data229FXMenuCascade* myDataMenuCascade = nullptr;230231/// @brief FXMenuCascade for mean data232FXMenuCascade* myMeanDataMenuCascade = nullptr;233234/// @brief Invalidated copy constructor.235FileMenuCommands(const FileMenuCommands&) = delete;236237/// @brief Invalidated assignment operator.238FileMenuCommands& operator=(const FileMenuCommands&) = delete;239};240241/// @brief struct for modes menu commands242struct ModesMenuCommands {243244/// @brief struct for common menu commands245struct CommonMenuCommands {246247/// @brief constructor248CommonMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);249250/// @brief build menu commands251void buildCommonMenuCommands(FXMenuPane* modesMenu);252253/// @brief menu command for delete mode254FXMenuCommand* deleteMode = nullptr;255256/// @brief menu command for inspect mode257FXMenuCommand* inspectMode = nullptr;258259/// @brief menu command for select mode260FXMenuCommand* selectMode = nullptr;261262private:263/// @brief reference to ModesMenuCommands264const ModesMenuCommands* myModesMenuCommandsParent;265266/// @brief Invalidated copy constructor.267CommonMenuCommands(const CommonMenuCommands&) = delete;268269/// @brief Invalidated assignment operator.270CommonMenuCommands& operator=(const CommonMenuCommands&) = delete;271};272273/// @brief struct for network menu commands274struct NetworkMenuCommands {275276/// @brief constructor277NetworkMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);278279/// @brief build menu commands280void buildNetworkMenuCommands(FXMenuPane* modesMenu);281282/// @brief show all menu commands283void showNetworkMenuCommands();284285/// @brief hide all menu commands286void hideNetworkMenuCommands();287288/// @brief menu command for create edge289FXMenuCommand* createEdgeMode = nullptr;290291/// @brief menu command for move mode (network)292FXMenuCommand* moveMode = nullptr;293294/// @brief menu command for connect mode295FXMenuCommand* connectMode = nullptr;296297/// @brief menu command for prohibition mode298FXMenuCommand* prohibitionMode = nullptr;299300/// @brief menu command for TLS Mode301FXMenuCommand* TLSMode = nullptr;302303/// @brief menu command for additional mode304FXMenuCommand* additionalMode = nullptr;305306/// @brief menu command for crossing mode307FXMenuCommand* crossingMode = nullptr;308309/// @brief menu command for TAZ mode310FXMenuCommand* TAZMode = nullptr;311312/// @brief menu command for shape mode313FXMenuCommand* shapeMode = nullptr;314315/// @brief menu command for wire mode316FXMenuCommand* wireMode = nullptr;317318/// @brief menu command for decal mode319FXMenuCommand* decalMode = nullptr;320321private:322/// @brief reference to ModesMenuCommands323const ModesMenuCommands* myModesMenuCommandsParent;324325/// @brief Invalidated copy constructor.326NetworkMenuCommands(const NetworkMenuCommands&) = delete;327328/// @brief Invalidated assignment operator.329NetworkMenuCommands& operator=(const NetworkMenuCommands&) = delete;330};331332/// @brief struct for Demand menu commands333struct DemandMenuCommands {334335/// @brief constructor336DemandMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);337338/// @brief build menu commands339void buildDemandMenuCommands(FXMenuPane* modesMenu);340341/// @brief show all menu commands342void showDemandMenuCommands();343344/// @brief hide all menu commands345void hideDemandMenuCommands();346347/// @brief menu command for move mode (demand)348FXMenuCommand* moveMode = nullptr;349350/// @brief menu command for route mode351FXMenuCommand* routeMode = nullptr;352353/// @brief menu command for route distribution mode354FXMenuCommand* routeDistributionMode = nullptr;355356/// @brief menu command for vehicle mode357FXMenuCommand* vehicleMode = nullptr;358359/// @brief menu command for type mode360FXMenuCommand* typeMode = nullptr;361362/// @brief menu command for type distribution mode363FXMenuCommand* typeDistributionMode = nullptr;364365/// @brief menu command for stop mode366FXMenuCommand* stopMode = nullptr;367368/// @brief menu command for person mode369FXMenuCommand* personMode = nullptr;370371/// @brief menu command for person plan mode372FXMenuCommand* personPlanMode = nullptr;373374/// @brief menu command for container mode375FXMenuCommand* containerMode = nullptr;376377/// @brief menu command for container plan mode378FXMenuCommand* containerPlanMode = nullptr;379380private:381/// @brief reference to ModesMenuCommands382const ModesMenuCommands* myModesMenuCommandsParent;383384/// @brief Invalidated copy constructor.385DemandMenuCommands(const DemandMenuCommands&) = delete;386387/// @brief Invalidated assignment operator.388DemandMenuCommands& operator=(const DemandMenuCommands&) = delete;389};390391/// @brief struct for Data menu commands392struct DataMenuCommands {393394/// @brief constructor395DataMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);396397/// @brief build menu commands398void buildDataMenuCommands(FXMenuPane* modesMenu);399400/// @brief show all menu commands401void showDataMenuCommands();402403/// @brief hide all menu commands404void hideDataMenuCommands();405406/// @brief menu command for edge mode407FXMenuCommand* edgeData = nullptr;408409/// @brief menu command for edge rel mode410FXMenuCommand* edgeRelData = nullptr;411412/// @brief menu command for TAZ rel mode413FXMenuCommand* TAZRelData = nullptr;414415/// @brief menu command for mean data416FXMenuCommand* meanData = nullptr;417418private:419/// @brief reference to ModesMenuCommands420const ModesMenuCommands* myModesMenuCommandsParent;421422/// @brief Invalidated copy constructor.423DataMenuCommands(const DataMenuCommands&) = delete;424425/// @brief Invalidated assignment operator.426DataMenuCommands& operator=(const DataMenuCommands&) = delete;427};428429/// @brief constructor430ModesMenuCommands(GNEApplicationWindow* applicationWindow);431432/// @brief build modes menu commands433void buildModesMenuCommands(FXMenuPane* modesMenu);434435/// @brief set default view436void setDefaultView(Supermode supermode);437438/// @brief set JuPedSim view439void setJuPedSimView(Supermode supermode);440441/// @brief Common Menu Commands442CommonMenuCommands commonMenuCommands;443444/// @brief Network Menu Commands445NetworkMenuCommands networkMenuCommands;446447/// @brief Demand Menu Commands448DemandMenuCommands demandMenuCommands;449450/// @brief Data Menu Commands451DataMenuCommands dataMenuCommands;452453private:454/// @brief pointer to current GNEApplicationWindow455GNEApplicationWindow* myApplicationWindow;456457/// @brief Invalidated copy constructor.458ModesMenuCommands(const ModesMenuCommands&) = delete;459460/// @brief Invalidated assignment operator.461ModesMenuCommands& operator=(const ModesMenuCommands&) = delete;462};463464/// @brief struct for edit menu commands465struct EditMenuCommands {466467/// @brief struct used to group all variables related to view options in supermode Network468struct NetworkViewOptions {469470/// @brief default constructor471NetworkViewOptions(GNEApplicationWindow* applicationWindow);472473/// @brief build menu checks474void buildNetworkViewOptionsMenuChecks(FXMenuPane* editMenu);475476/// @brief hide all options menu checks477void hideNetworkViewOptionsMenuChecks();478479/// @brief update shortcuts (alt+X)480void updateShortcuts();481482/// @brief menu check to show grid button483MFXMenuCheckIcon* menuCheckToggleGrid = nullptr;484485/// @brief menu check to toggle draw junction shape486MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;487488/// @brief menu check to draw vehicles in begin position or spread in lane489MFXMenuCheckIcon* menuCheckDrawSpreadVehicles = nullptr;490491/// @brief menu check to show Demand Elements492MFXMenuCheckIcon* menuCheckShowDemandElements = nullptr;493494/// @brief menu check to select only edges495MFXMenuCheckIcon* menuCheckSelectEdges = nullptr;496497/// @brief menu check to show connections498MFXMenuCheckIcon* menuCheckShowConnections = nullptr;499500/// @brief menu check to hide connections in connect mode501MFXMenuCheckIcon* menuCheckHideConnections = nullptr;502503/// @brief menu check to show additional sub-elements504MFXMenuCheckIcon* menuCheckShowAdditionalSubElements = nullptr;505506/// @brief menu check to show TAZ elements507MFXMenuCheckIcon* menuCheckShowTAZElements = nullptr;508509/// @brief menu check to extend to edge nodes510MFXMenuCheckIcon* menuCheckExtendSelection = nullptr;511512/// @brief menu check to set change all phases513MFXMenuCheckIcon* menuCheckChangeAllPhases = nullptr;514515/// @brief menu check to we should warn about merging junctions516MFXMenuCheckIcon* menuCheckMergeAutomatically = nullptr;517518/// @brief menu check to show connection as bubble in "Move" mode.519MFXMenuCheckIcon* menuCheckShowJunctionBubble = nullptr;520521/// @brief menu check to apply movement to elevation522MFXMenuCheckIcon* menuCheckMoveElevation = nullptr;523524/// @brief menu check to the endpoint for a created edge should be set as the new source525MFXMenuCheckIcon* menuCheckChainEdges = nullptr;526527/// @brief check checkable to create auto create opposite edge528MFXMenuCheckIcon* menuCheckAutoOppositeEdge = nullptr;529530/// @brief separator531FXMenuSeparator* separator = nullptr;532533private:534/// @brief pointer to current GNEApplicationWindow535GNEApplicationWindow* myApplicationWindow;536537/// @brief Invalidated copy constructor.538NetworkViewOptions(const NetworkViewOptions&) = delete;539540/// @brief Invalidated assignment operator.541NetworkViewOptions& operator=(const NetworkViewOptions&) = delete;542};543544/// @brief struct used to group all variables related to view options in supermode Demand545struct DemandViewOptions {546547/// @brief default constructor548DemandViewOptions(GNEApplicationWindow* applicationWindow);549550/// @brief build menu checks551void buildDemandViewOptionsMenuChecks(FXMenuPane* editMenu);552553/// @brief hide all options menu checks554void hideDemandViewOptionsMenuChecks();555556/// @brief update shortcuts (alt+X)557void updateShortcuts();558559/// @brief menu check to show grid button560MFXMenuCheckIcon* menuCheckToggleGrid = nullptr;561562/// @brief menu check to toggle draw junction shape563MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;564565/// @brief menu check to draw vehicles in begin position or spread in lane566MFXMenuCheckIcon* menuCheckDrawSpreadVehicles = nullptr;567568/// @brief menu check for hide shapes (Polygons and POIs)569MFXMenuCheckIcon* menuCheckHideShapes = nullptr;570571/// @brief menu check for show all trips plans572MFXMenuCheckIcon* menuCheckShowAllTrips = nullptr;573574/// @brief menu check for hide non inspected demand elements575MFXMenuCheckIcon* menuCheckHideNonInspectedDemandElements = nullptr;576577/// @brief menu check for show overlapped routes578MFXMenuCheckIcon* menuCheckShowOverlappedRoutes = nullptr;579580/// @brief menu check for show all person plans581MFXMenuCheckIcon* menuCheckShowAllPersonPlans = nullptr;582583/// @brief menu check for lock Person584MFXMenuCheckIcon* menuCheckLockPerson = nullptr;585586/// @brief menu check for show all container plans587MFXMenuCheckIcon* menuCheckShowAllContainerPlans = nullptr;588589/// @brief menu check for lock Container590MFXMenuCheckIcon* menuCheckLockContainer = nullptr;591592/// @brief separator593FXMenuSeparator* separator = nullptr;594595private:596/// @brief pointer to current GNEApplicationWindow597GNEApplicationWindow* myApplicationWindow;598599/// @brief Invalidated copy constructor.600DemandViewOptions(const DemandViewOptions&) = delete;601602/// @brief Invalidated assignment operator.603DemandViewOptions& operator=(const DemandViewOptions&) = delete;604};605606/// @brief struct used to group all variables related to view options in supermode Data607struct DataViewOptions {608609/// @brief default constructor610DataViewOptions(GNEApplicationWindow* applicationWindow);611612/// @brief build menu checks613void buildDataViewOptionsMenuChecks(FXMenuPane* editMenu);614615/// @brief hide all options menu checks616void hideDataViewOptionsMenuChecks();617618/// @brief update shortcuts (alt+X)619void updateShortcuts();620621/// @brief menu check to toggle draw junction shape622MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;623624/// @brief menu check to show Additionals625MFXMenuCheckIcon* menuCheckShowAdditionals = nullptr;626627/// @brief menu check to show Shapes628MFXMenuCheckIcon* menuCheckShowShapes = nullptr;629630/// @brief menu check to show Demand Elements631MFXMenuCheckIcon* menuCheckShowDemandElements = nullptr;632633/// @brief menu check to toggle TAZRel drawing mode634MFXMenuCheckIcon* menuCheckToggleTAZRelDrawing = nullptr;635636/// @brief menu check to toggle TAZ draw fill637MFXMenuCheckIcon* menuCheckToggleTAZDrawFill = nullptr;638639/// @brief menu check to toggle TAZRel only from640MFXMenuCheckIcon* menuCheckToggleTAZRelOnlyFrom = nullptr;641642/// @brief menu check to toggle TAZRel only to643MFXMenuCheckIcon* menuCheckToggleTAZRelOnlyTo = nullptr;644645/// @brief separator646FXMenuSeparator* separator = nullptr;647648private:649/// @brief pointer to current GNEApplicationWindow650GNEApplicationWindow* myApplicationWindow;651652/// @brief Invalidated copy constructor.653DataViewOptions(const DataViewOptions&) = delete;654655/// @brief Invalidated assignment operator.656DataViewOptions& operator=(const DataViewOptions&) = delete;657};658659/// @brief constructor660EditMenuCommands(GNEApplicationWindow* applicationWindow);661662/// @brief build undo-redo menu commands663void buildUndoRedoMenuCommands(FXMenuPane* editMenu);664665/// @brief build view menu commands666void buildViewMenuCommands(FXMenuPane* editMenu);667668/// @brief build front element commands669void buildFrontElementMenuCommand(FXMenuPane* editMenu);670671/// @brief build open sumo menu commands672void buildOpenSUMOMenuCommands(FXMenuPane* editMenu);673674/// @brief FXMenuCommand for undo last change675FXMenuCommand* undoLastChange = nullptr;676677/// @brief FXMenuCommand for redo last change678FXMenuCommand* redoLastChange = nullptr;679680/// @brief FXMenuCommand for open undolist dialog681FXMenuCommand* openUndolistDialog = nullptr;682683/// @brief checkBox for allow undo-redo684FXMenuCheck* menuCheckAllowUndoRedo = nullptr;685686/// @brief network view options687NetworkViewOptions networkViewOptions;688689/// @brief demand view options690DemandViewOptions demandViewOptions;691692/// @brief data view options693DataViewOptions dataViewOptions;694695/// @brief FXMenuCommand for edit view scheme696FXMenuCommand* editViewScheme = nullptr;697698/// @brief FXMenuCommand for edit view port699FXMenuCommand* editViewPort = nullptr;700701/// @brief FXMenuCommand for clear Front element702FXMenuCommand* clearFrontElement = nullptr;703704/// @brief menu check for load additionals in SUMO GUI705FXMenuCheck* loadAdditionalsInSUMOGUI = nullptr;706707/// @brief menu check for load demand in SUMO GUI708FXMenuCheck* loadDemandInSUMOGUI = nullptr;709710/// @brief FXMenuCommand for open in SUMO GUI711FXMenuCommand* openInSUMOGUI = nullptr;712713private:714/// @brief pointer to current GNEApplicationWindow715GNEApplicationWindow* myApplicationWindow;716717/// @brief Invalidated copy constructor.718EditMenuCommands(const EditMenuCommands&) = delete;719720/// @brief Invalidated assignment operator.721EditMenuCommands& operator=(const EditMenuCommands&) = delete;722};723724/// @brief struct for processing menu commands725struct LockMenuCommands {726727/// @brief constructor728LockMenuCommands(GNEApplicationWindow* applicationWindow);729730/// @brief build menu commands731void buildLockMenuCommands(FXMenuPane* editMenu);732733/// @brief remove hotkeys734void removeHotkeys();735736/// @brief show network processing menu commands737void showNetworkLockMenuCommands();738739/// @brief show network processing menu commands740void hideNetworkLockMenuCommands();741742/// @brief show demand processing menu commands743void showDemandLockMenuCommands();744745/// @brief show demand processing menu commands746void hideDemandLockMenuCommands();747748/// @brief show data processing menu commands749void showDataLockMenuCommands();750751/// @brief show data processing menu commands752void hideDataLockMenuCommands();753754/// @brief lock all755void lockAll();756757/// @brief unlock all758void unlockAll();759760/// @brief lock or unlock object based in a tag property761void editLocking(const GNEAttributeCarrier* AC, const FXbool value);762763/// @name Processing FXMenuCommands for Network mode764/// @{765/// @brief menu check to lock junction766MFXMenuCheckIcon* menuCheckLockJunctions = nullptr;767768/// @brief menu check to lock edges769MFXMenuCheckIcon* menuCheckLockEdges = nullptr;770771/// @brief menu check to lock lanes772MFXMenuCheckIcon* menuCheckLockLanes = nullptr;773774/// @brief menu check to lock connections775MFXMenuCheckIcon* menuCheckLockConnections = nullptr;776777/// @brief menu check to lock crossings778MFXMenuCheckIcon* menuCheckLockCrossings = nullptr;779780/// @brief menu check to lock walkingAreas781MFXMenuCheckIcon* menuCheckLockWalkingAreas = nullptr;782783/// @brief menu check to lock additionals784MFXMenuCheckIcon* menuCheckLockAdditionals = nullptr;785786/// @brief menu check to lock TAZs787MFXMenuCheckIcon* menuCheckLockTAZs = nullptr;788789/// @brief menu check to lock Wires790MFXMenuCheckIcon* menuCheckLockWires = nullptr;791792/// @brief menu check to lock polygons793MFXMenuCheckIcon* menuCheckLockPolygons = nullptr;794795/// @brief menu check to lock POIs796MFXMenuCheckIcon* menuCheckLockPOIs = nullptr;797798/// @brief menu check to lock jps walkableareas799MFXMenuCheckIcon* menuCheckLockJpsWalkableAreas = nullptr;800801/// @brief menu check to lock jps obstacles802MFXMenuCheckIcon* menuCheckLockJpsObstacles = nullptr;803804/// @}805806/// @name Processing FXMenuCommands for Demand mode807/// @{808/// @brief menu check to lock routes809MFXMenuCheckIcon* menuCheckLockRoutes = nullptr;810811/// @brief menu check to lock vehicles812MFXMenuCheckIcon* menuCheckLockVehicles = nullptr;813814/// @brief menu check to lock persons815MFXMenuCheckIcon* menuCheckLockPersons = nullptr;816817/// @brief menu check to lock personTrips818MFXMenuCheckIcon* menuCheckLockPersonTrips = nullptr;819820/// @brief menu check to lock walks821MFXMenuCheckIcon* menuCheckLockWalks = nullptr;822823/// @brief menu check to lock rides824MFXMenuCheckIcon* menuCheckLockRides = nullptr;825826/// @brief menu check to lock containers827MFXMenuCheckIcon* menuCheckLockContainers = nullptr;828829/// @brief menu check to lock transports830MFXMenuCheckIcon* menuCheckLockTransports = nullptr;831832/// @brief menu check to lock tranships833MFXMenuCheckIcon* menuCheckLockTranships = nullptr;834835/// @brief menu check to lock stops836MFXMenuCheckIcon* menuCheckLockStops = nullptr;837838/// @}839840/// @name Processing FXMenuCommands for Data mode841/// @{842/// @brief menu check to lock edge datas843MFXMenuCheckIcon* menuCheckLockEdgeDatas = nullptr;844845/// @brief menu check to lock edgeRelDatas846MFXMenuCheckIcon* menuCheckLockEdgeRelDatas = nullptr;847848/// @brief menu check to lock edgeTAZRels849MFXMenuCheckIcon* menuCheckLockEdgeTAZRels = nullptr;850851/// @}852853/// @brief menu check for lock selected elements854MFXMenuCheckIcon* menuCheckLockSelectedElements = nullptr;855856protected:857/// @brief Parse hot key from string858FXHotKey parseHotKey(const FXwchar character);859860private:861/// @brief pointer to current GNEApplicationWindow862GNEApplicationWindow* myApplicationWindow;863864/// @brief Invalidated copy constructor.865LockMenuCommands(const LockMenuCommands&) = delete;866867/// @brief Invalidated assignment operator.868LockMenuCommands& operator=(const LockMenuCommands&) = delete;869};870871/// @brief struct for processing menu commands872struct ProcessingMenuCommands {873874/// @brief constructor875ProcessingMenuCommands(GNEApplicationWindow* applicationWindow);876877/// @brief build menu commands878void buildProcessingMenuCommands(FXMenuPane* processingMenu);879880/// @brief show network processing menu commands881void showNetworkProcessingMenuCommands();882883/// @brief show network processing menu commands884void hideNetworkProcessingMenuCommands();885886/// @brief show demand processing menu commands887void showDemandProcessingMenuCommands();888889/// @brief show demand processing menu commands890void hideDemandProcessingMenuCommands();891892/// @brief show data processing menu commands893void showDataProcessingMenuCommands();894895/// @brief show data processing menu commands896void hideDataProcessingMenuCommands();897898/// @brief show separator899void showSeparator();900901/// @brief hide separator902void hideSeparator();903904/// @name Processing FXMenuCommands for Network mode905/// @{906/// @brief FXMenuCommand for compute network907FXMenuCommand* computeNetwork = nullptr;908909/// @brief FXMenuCommand for compute network with volatile options910FXMenuCommand* computeNetworkVolatile = nullptr;911912/// @brief FXMenuCommand for clean junctions without edges913FXMenuCommand* cleanJunctions = nullptr;914915/// @brief FXMenuCommand for join selected junctions916FXMenuCommand* joinJunctions = nullptr;917918/// @brief FXMenuCommand for clear invalid crossings919FXMenuCommand* clearInvalidCrossings = nullptr;920921/// @brief checkBox for recomputing when changing data mode922MFXMenuCheckIcon* menuCheckRecomputeDataMode = nullptr;923924/// @}925926/// @name Processing FXMenuCommands for Demand mode927/// @{928/// @brief FXMenuCommand for compute demand elements929FXMenuCommand* computeDemand = nullptr;930931/// @brief FXMenuCommand for clean routes without vehicles932FXMenuCommand* cleanRoutes = nullptr;933934/// @brief FXMenuCommand for join routes935FXMenuCommand* joinRoutes = nullptr;936937/// @brief FXMenuCommand for adjust person plans938FXMenuCommand* adjustPersonPlans = nullptr;939940/// @brief FXMenuCommand for clear invalid demand elements941FXMenuCommand* clearInvalidDemandElements = nullptr;942/// @}943944/// @name Processing FXMenuCommands for Data mode945/// @{946947/// @}948949/// @brief FXMenuCommand for open option menus950FXMenuCommand* optionMenus = nullptr;951952private:953/// @brief pointer to current GNEApplicationWindow954GNEApplicationWindow* myApplicationWindow;955956/// @brief separator for optionsMenu957FXMenuSeparator* myOptionsSeparator = nullptr;958959/// @brief separator for checkBox960FXMenuSeparator* mySeparatorCheckBox = nullptr;961962/// @brief Invalidated copy constructor.963ProcessingMenuCommands(const ProcessingMenuCommands&) = delete;964965/// @brief Invalidated assignment operator.966ProcessingMenuCommands& operator=(const ProcessingMenuCommands&) = delete;967};968969/// @brief struct for locate menu commands970struct LocateMenuCommands {971972/// @brief constructor973LocateMenuCommands(GNEApplicationWindow* applicationWindow);974975/// @brief build menu commands976void buildLocateMenuCommands(FXMenuPane* locateMenu);977978private:979/// @brief pointer to current GNEApplicationWindow980GNEApplicationWindow* myApplicationWindow;981982/// @brief Invalidated copy constructor.983LocateMenuCommands(const LocateMenuCommands&) = delete;984985/// @brief Invalidated assignment operator.986LocateMenuCommands& operator=(const LocateMenuCommands&) = delete;987};988989/// @brief struct for locate menu commands990struct ToolsMenuCommands {991992/// @brief constructor993ToolsMenuCommands(GNEApplicationWindow* applicationWindow);994995/// @brief destructor996~ToolsMenuCommands();997998/// @brief build tools (and menu commands)999void buildTools(FXMenuPane* toolsMenu, const std::map<std::string, FXMenuPane*>& menuPaneToolMaps);10001001/// @brief show tool1002long showTool(FXObject* menuCommand);10031004/// @brief run tool dialog1005long runToolDialog(FXObject* menuCommand) const;10061007/// @brief run postprocessing1008long postProcessing(FXObject* menuCommand) const;10091010private:1011/// @brief map with python tools1012std::vector<GNEPythonTool*> myPythonTools;10131014/// @brief python tool dialog1015GNEPythonToolDialog* myPythonToolDialog = nullptr;10161017/// @brief pointer to current GNEApplicationWindow1018GNEApplicationWindow* myApplicationWindow;10191020/// @brief Invalidated copy constructor.1021ToolsMenuCommands(const ToolsMenuCommands&) = delete;10221023/// @brief Invalidated assignment operator.1024ToolsMenuCommands& operator=(const ToolsMenuCommands&) = delete;1025};10261027/// @brief struct for windows menu commands1028struct WindowsMenuCommands {10291030/// @brief constructor1031WindowsMenuCommands(GNEApplicationWindow* applicationWindow);10321033/// @brief build menu commands1034void buildWindowsMenuCommands(FXMenuPane* windowsMenu, FXStatusBar* statusbar, GUIMessageWindow* messageWindow);10351036private:1037/// @brief pointer to current GNEApplicationWindow1038GNEApplicationWindow* myApplicationWindow;10391040/// @brief Invalidated copy constructor.1041WindowsMenuCommands(const WindowsMenuCommands&) = delete;10421043/// @brief Invalidated assignment operator.1044WindowsMenuCommands& operator=(const WindowsMenuCommands&) = delete;1045};10461047/// @brief struct for help menu commands1048struct HelpMenuCommands {10491050/// @brief constructor1051HelpMenuCommands(GNEApplicationWindow* applicationWindow);10521053/// @brief build menu commands1054void buildHelpMenuCommands(FXMenuPane* helpMenu);10551056private:1057/// @brief pointer to current GNEApplicationWindow1058GNEApplicationWindow* myApplicationWindow;10591060/// @brief Invalidated copy constructor.1061HelpMenuCommands(const HelpMenuCommands&) = delete;10621063/// @brief Invalidated assignment operator.1064HelpMenuCommands& operator=(const HelpMenuCommands&) = delete;1065};10661067/// @brief struct for supermode commands1068struct SupermodeCommands {10691070/// @brief constructor1071SupermodeCommands(GNEApplicationWindow* applicationWindow);10721073/// @brief build menu commands1074void buildSupermodeCommands(FXMenuPane* editMenu);10751076/// @brief show all menu commands1077void showSupermodeCommands();10781079/// @brief set default view1080void setDefaultView();10811082/// @brief set JuPedSim view1083void setJuPedSimView();10841085/// @brief FXMenuCommand for network supermode1086FXMenuCommand* networkMode = nullptr;10871088/// @brief FXMenuCommand for demand supermode1089FXMenuCommand* demandMode = nullptr;10901091/// @brief FXMenuCommand for data supermode1092FXMenuCommand* dataMode = nullptr;10931094private:1095/// @brief pointer to current GNEApplicationWindow1096GNEApplicationWindow* myApplicationWindow;10971098/// @brief Invalidated copy constructor.1099SupermodeCommands(const SupermodeCommands&) = delete;11001101/// @brief Invalidated assignment operator.1102SupermodeCommands& operator=(const SupermodeCommands&) = delete;1103};11041105/// @brief SUMO config handler1106class GNESumoConfigHandler {11071108public:1109/// @brief Constructor1110GNESumoConfigHandler(OptionsCont& sumoOptions, const std::string& file);11111112/// @brief load SUMO config1113bool loadSumoConfig();11141115private:1116/// @brief sumo options1117OptionsCont& mySumoOptions;11181119/// @brief SUMO config file1120const std::string myFile;11211122/// @brief Invalidated copy constructor.1123GNESumoConfigHandler(const GNESumoConfigHandler&) = delete;11241125/// @brief Invalidated assignment operator.1126GNESumoConfigHandler& operator=(const GNESumoConfigHandler&) = delete;1127};11281129/// @brief netedit config handler1130class GNENeteditConfigHandler {11311132public:1133/// @brief Constructor1134GNENeteditConfigHandler(const std::string& file);11351136/// @brief load netedit config1137bool loadNeteditConfig();11381139private:1140/// @brief netedit config file1141const std::string myFile;11421143/// @brief Invalidated copy constructor.1144GNENeteditConfigHandler(const GNENeteditConfigHandler&) = delete;11451146/// @brief Invalidated assignment operator.1147GNENeteditConfigHandler& operator=(const GNENeteditConfigHandler&) = delete;1148};11491150/// @brief toggle edit options Network menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)1151static bool toggleEditOptionsNetwork(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,1152FXObject* obj, FXSelector sel);11531154/// @brief toggle edit options Demand menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)1155static bool toggleEditOptionsDemand(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,1156FXObject* obj, FXSelector sel);11571158/// @brief toggle edit options Data menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)1159static bool toggleEditOptionsData(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,1160FXObject* obj, FXSelector sel);11611162/// @brief check if a string ends with another string1163static bool stringEndsWith(const std::string& str, const std::string& suffix);11641165private:1166/// @brief Invalidated copy constructor.1167GNEApplicationWindowHelper(const GNEApplicationWindowHelper&) = delete;11681169/// @brief Invalidated assignment operator.1170GNEApplicationWindowHelper& operator=(const GNEApplicationWindowHelper&) = delete;1171};117211731174