Path: blob/main/src/netedit/GNEApplicationWindowHelper.h
193674 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 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 <netedit/GNETagProperties.h>24#include <utils/common/SUMOTime.h>25#include <utils/foxtools/MFXInterThreadEventClient.h>26#include <utils/foxtools/MFXRecentNetworks.h>27#include <utils/foxtools/MFXSynchQue.h>28#include <utils/foxtools/MFXThreadEvent.h>29#include <utils/geom/Position.h>30#include <utils/gui/div/GUIMessageWindow.h>31#include <utils/gui/windows/GUIMainWindow.h>32#include <utils/options/OptionsCont.h>33#include <utils/shapes/ShapeHandler.h>34#include <utils/tests/InternalTestStep.h>3536#include "GNEViewNetHelper.h"3738// ===========================================================================39// class declarations40// ===========================================================================4142class GNEApplicationWindow;43class FileBucket;44class GNENet;45class GNENetgenerateDialog;46class GNEPythonTool;47class GNEPythonToolDialog;48class GNERunNetgenerateDialog;49class GNERunPythonToolDialog;50class GNEViewNet;51class MFXMenuCheckIcon;5253// ===========================================================================54// class definition55// ===========================================================================5657struct GNEApplicationWindowHelper {5859/// @brief struct for griped toolbars60struct ToolbarsGrip {6162/// @brief constructor63ToolbarsGrip(GNEApplicationWindow* applicationWindow);6465/// @brief build menu toolbar grips66void buildMenuToolbarsGrip();6768/// @brief build toolbars grips69void buildViewParentToolbarsGrips();7071/// @brief build toolbars grips72void destroyParentToolbarsGrips();7374/// @brief The application menu bar (for file, edit, processing...)75FXMenuBar* menu = nullptr;7677/// @brief The application menu bar for supermodes (network, demand and data)78FXMenuBar* superModes = nullptr;7980/// @brief The application menu bar for save elements81FXMenuBar* saveElements = nullptr;8283/// @brief The application menu bar for time switch84FXMenuBar* timeSwitch = nullptr;8586/// @brief The application menu bar for navigation (zoom, coloring...)87FXMenuBar* navigation = nullptr;8889/// @brief The application menu bar (for select, inspect...)90FXMenuBar* modes = nullptr;9192/// @brief The application menu bar for mode options (show connections, select edges...)93FXMenuBar* intervalBar = nullptr;9495private:96/// @brief pointer to current GNEApplicationWindow97GNEApplicationWindow* myApplicationWindow;9899/// @brief menu bar drag (for file, edit, processing...)100FXToolBarShell* myPythonToolBarShellMenu = nullptr;101102/// @brief menu bar drag for super modes (network, demand and data)103FXToolBarShell* myPythonToolBarShellSuperModes = nullptr;104105/// @brief menu bar drag for save elements106FXToolBarShell* myPythonToolBarShellSaveElements = nullptr;107108/// @brief menu bar drag for time switch109FXToolBarShell* myPythonToolBarShellTimeFormat = nullptr;110111/// @brief menu bar drag for navigation (Zoom, coloring...)112FXToolBarShell* myPythonToolBarShellNavigation = nullptr;113114/// @brief menu bar drag for modes (select, inspect, delete...)115FXToolBarShell* myPythonToolBarShellModes = nullptr;116117/// @brief menu bar drag for interval bar118FXToolBarShell* myPythonToolBarShellIntervalBar = nullptr;119120/// @brief Invalidated copy constructor.121ToolbarsGrip(const ToolbarsGrip&) = delete;122123/// @brief Invalidated assignment operator.124ToolbarsGrip& operator=(const ToolbarsGrip&) = delete;125};126127/// @brief struct for menu bar file128struct MenuBarFile {129130/// @brief constructor131MenuBarFile(GNEApplicationWindow* applicationWindow);132133/// @brief build recent network134void buildRecentNetworkFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentNetworkFiles);135136/// @brief build recent config137void buildRecentConfigFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentConfigFiles);138139/// @brief List of recent networks140MFXRecentNetworks myRecentNetworks;141142/// @brief List of recent configs143MFXRecentNetworks myRecentConfigs;144145private:146/// @brief pointer to current GNEApplicationWindow147GNEApplicationWindow* myApplicationWindow;148149/// @brief Invalidated copy constructor.150MenuBarFile(const MenuBarFile&) = delete;151152/// @brief Invalidated assignment operator.153MenuBarFile& operator=(const MenuBarFile&) = delete;154};155156/// @brief struct for File menu commands157struct FileMenuCommands {158159/// @brief constructor160FileMenuCommands(GNEApplicationWindow* applicationWindow);161162/// @brief build menu commands163void buildFileMenuCommands(FXMenuPane* fileMenu, FXMenuPane* fileMenuNEEDITConfig, FXMenuPane* fileMenuSumoConfig,164FXMenuPane* fileMenuTLS, FXMenuPane* fileMenuEdgeTypes, FXMenuPane* fileMenuAdditionals,165FXMenuPane* fileMenuDemandElements, FXMenuPane* fileMenuDataElements,166FXMenuPane* fileMenuMeanDataElements);167168/// @brief enable menu cascades169void enableMenuCascades();170171/// @brief disable menu cascades172void disableMenuCascades();173174/// @brief set default view175void setDefaultView();176177/// @brief set JuPedSim view178void setJuPedSimView();179180/// @brief checkBox for allow undo-redo loading181FXMenuCheck* menuCheckAllowUndoRedoLoading = nullptr;182183private:184/// @brief build netedit config section185void buildNeteditConfigSection(FXMenuPane* menuPane);186187/// @brief build SUMO Config section188void buildSumoConfigSection(FXMenuPane* menuPane);189190/// @brief build traffic light section191void buildTrafficLightSection(FXMenuPane* menuPane);192193/// @brief build edge type section194void buildEdgeTypeSection(FXMenuPane* menuPane);195196/// @brief build additional section197void buildAdditionalSection(FXMenuPane* menuPane);198199/// @brief build demand section200void buildDemandSection(FXMenuPane* menuPane);201202/// @brief build data section203void buildDataSection(FXMenuPane* menuPane);204205/// @brief build meanData section206void buildMeanDataSection(FXMenuPane* menuPane);207208/// @brief pointer to current GNEApplicationWindow209GNEApplicationWindow* myApplicationWindow = nullptr;210211/// @brief FXMenuCascade for neteditConfig212FXMenuCascade* myNeteditConfigMenuCascade = nullptr;213214/// @brief FXMenuCascade for SumoConfig215FXMenuCascade* mySumoConfigMenuCascade = nullptr;216217/// @brief FXMenuCascade for TLS218FXMenuCascade* myTLSMenuCascade = nullptr;219220/// @brief FXMenuCascade for edgeTypes221FXMenuCascade* myEdgeTypesMenuCascade = nullptr;222223/// @brief FXMenuCascade for additional224FXMenuCascade* myAdditionalMenuCascade = nullptr;225226/// @brief FXMenuCascade for demand227FXMenuCascade* myDemandMenuCascade = nullptr;228229/// @brief FXMenuCascade for data230FXMenuCascade* myDataMenuCascade = nullptr;231232/// @brief FXMenuCascade for mean data233FXMenuCascade* myMeanDataMenuCascade = nullptr;234235/// @brief Invalidated copy constructor.236FileMenuCommands(const FileMenuCommands&) = delete;237238/// @brief Invalidated assignment operator.239FileMenuCommands& operator=(const FileMenuCommands&) = delete;240};241242/// @brief struct for modes menu commands243struct ModesMenuCommands {244245/// @brief struct for common menu commands246struct CommonMenuCommands {247248/// @brief constructor249CommonMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);250251/// @brief build menu commands252void buildCommonMenuCommands(FXMenuPane* modesMenu);253254/// @brief menu command for delete mode255FXMenuCommand* deleteMode = nullptr;256257/// @brief menu command for inspect mode258FXMenuCommand* inspectMode = nullptr;259260/// @brief menu command for select mode261FXMenuCommand* selectMode = nullptr;262263private:264/// @brief reference to ModesMenuCommands265const ModesMenuCommands* myModesMenuCommandsParent;266267/// @brief Invalidated copy constructor.268CommonMenuCommands(const CommonMenuCommands&) = delete;269270/// @brief Invalidated assignment operator.271CommonMenuCommands& operator=(const CommonMenuCommands&) = delete;272};273274/// @brief struct for network menu commands275struct NetworkMenuCommands {276277/// @brief constructor278NetworkMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);279280/// @brief build menu commands281void buildNetworkMenuCommands(FXMenuPane* modesMenu);282283/// @brief show all menu commands284void showNetworkMenuCommands();285286/// @brief hide all menu commands287void hideNetworkMenuCommands();288289/// @brief menu command for create edge290FXMenuCommand* createEdgeMode = nullptr;291292/// @brief menu command for move mode (network)293FXMenuCommand* moveMode = nullptr;294295/// @brief menu command for connect mode296FXMenuCommand* connectMode = nullptr;297298/// @brief menu command for prohibition mode299FXMenuCommand* prohibitionMode = nullptr;300301/// @brief menu command for TLS Mode302FXMenuCommand* TLSMode = nullptr;303304/// @brief menu command for additional mode305FXMenuCommand* additionalMode = nullptr;306307/// @brief menu command for crossing mode308FXMenuCommand* crossingMode = nullptr;309310/// @brief menu command for TAZ mode311FXMenuCommand* TAZMode = nullptr;312313/// @brief menu command for shape mode314FXMenuCommand* shapeMode = nullptr;315316/// @brief menu command for wire mode317FXMenuCommand* wireMode = nullptr;318319/// @brief menu command for decal mode320FXMenuCommand* decalMode = nullptr;321322private:323/// @brief reference to ModesMenuCommands324const ModesMenuCommands* myModesMenuCommandsParent;325326/// @brief Invalidated copy constructor.327NetworkMenuCommands(const NetworkMenuCommands&) = delete;328329/// @brief Invalidated assignment operator.330NetworkMenuCommands& operator=(const NetworkMenuCommands&) = delete;331};332333/// @brief struct for Demand menu commands334struct DemandMenuCommands {335336/// @brief constructor337DemandMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);338339/// @brief build menu commands340void buildDemandMenuCommands(FXMenuPane* modesMenu);341342/// @brief show all menu commands343void showDemandMenuCommands();344345/// @brief hide all menu commands346void hideDemandMenuCommands();347348/// @brief menu command for move mode (demand)349FXMenuCommand* moveMode = nullptr;350351/// @brief menu command for route mode352FXMenuCommand* routeMode = nullptr;353354/// @brief menu command for route distribution mode355FXMenuCommand* routeDistributionMode = nullptr;356357/// @brief menu command for vehicle mode358FXMenuCommand* vehicleMode = nullptr;359360/// @brief menu command for type mode361FXMenuCommand* typeMode = nullptr;362363/// @brief menu command for type distribution mode364FXMenuCommand* typeDistributionMode = nullptr;365366/// @brief menu command for stop mode367FXMenuCommand* stopMode = nullptr;368369/// @brief menu command for person mode370FXMenuCommand* personMode = nullptr;371372/// @brief menu command for person plan mode373FXMenuCommand* personPlanMode = nullptr;374375/// @brief menu command for container mode376FXMenuCommand* containerMode = nullptr;377378/// @brief menu command for container plan mode379FXMenuCommand* containerPlanMode = nullptr;380381private:382/// @brief reference to ModesMenuCommands383const ModesMenuCommands* myModesMenuCommandsParent;384385/// @brief Invalidated copy constructor.386DemandMenuCommands(const DemandMenuCommands&) = delete;387388/// @brief Invalidated assignment operator.389DemandMenuCommands& operator=(const DemandMenuCommands&) = delete;390};391392/// @brief struct for Data menu commands393struct DataMenuCommands {394395/// @brief constructor396DataMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);397398/// @brief build menu commands399void buildDataMenuCommands(FXMenuPane* modesMenu);400401/// @brief show all menu commands402void showDataMenuCommands();403404/// @brief hide all menu commands405void hideDataMenuCommands();406407/// @brief menu command for edge mode408FXMenuCommand* edgeData = nullptr;409410/// @brief menu command for edge rel mode411FXMenuCommand* edgeRelData = nullptr;412413/// @brief menu command for TAZ rel mode414FXMenuCommand* TAZRelData = nullptr;415416/// @brief menu command for mean data417FXMenuCommand* meanData = nullptr;418419private:420/// @brief reference to ModesMenuCommands421const ModesMenuCommands* myModesMenuCommandsParent;422423/// @brief Invalidated copy constructor.424DataMenuCommands(const DataMenuCommands&) = delete;425426/// @brief Invalidated assignment operator.427DataMenuCommands& operator=(const DataMenuCommands&) = delete;428};429430/// @brief constructor431ModesMenuCommands(GNEApplicationWindow* applicationWindow);432433/// @brief build modes menu commands434void buildModesMenuCommands(FXMenuPane* modesMenu);435436/// @brief set default view437void setDefaultView(Supermode supermode);438439/// @brief set JuPedSim view440void setJuPedSimView(Supermode supermode);441442/// @brief Common Menu Commands443CommonMenuCommands commonMenuCommands;444445/// @brief Network Menu Commands446NetworkMenuCommands networkMenuCommands;447448/// @brief Demand Menu Commands449DemandMenuCommands demandMenuCommands;450451/// @brief Data Menu Commands452DataMenuCommands dataMenuCommands;453454private:455/// @brief pointer to current GNEApplicationWindow456GNEApplicationWindow* myApplicationWindow;457458/// @brief Invalidated copy constructor.459ModesMenuCommands(const ModesMenuCommands&) = delete;460461/// @brief Invalidated assignment operator.462ModesMenuCommands& operator=(const ModesMenuCommands&) = delete;463};464465/// @brief struct for edit menu commands466struct EditMenuCommands {467468/// @brief struct used to group all variables related to view options in supermode Network469struct NetworkViewOptions {470471/// @brief default constructor472NetworkViewOptions(GNEApplicationWindow* applicationWindow);473474/// @brief build menu checks475void buildNetworkViewOptionsMenuChecks(FXMenuPane* editMenu);476477/// @brief hide all options menu checks478void hideNetworkViewOptionsMenuChecks();479480/// @brief update shortcuts (alt+X)481void updateShortcuts();482483/// @brief menu check to show grid button484MFXMenuCheckIcon* menuCheckToggleGrid = nullptr;485486/// @brief menu check to toggle draw junction shape487MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;488489/// @brief menu check to draw vehicles in begin position or spread in lane490MFXMenuCheckIcon* menuCheckDrawSpreadVehicles = nullptr;491492/// @brief menu check to show Demand Elements493MFXMenuCheckIcon* menuCheckShowDemandElements = nullptr;494495/// @brief menu check to select only edges496MFXMenuCheckIcon* menuCheckSelectEdges = nullptr;497498/// @brief menu check to show connections499MFXMenuCheckIcon* menuCheckShowConnections = nullptr;500501/// @brief menu check to hide connections in connect mode502MFXMenuCheckIcon* menuCheckHideConnections = nullptr;503504/// @brief menu check to show additional sub-elements505MFXMenuCheckIcon* menuCheckShowAdditionalSubElements = nullptr;506507/// @brief menu check to show TAZ elements508MFXMenuCheckIcon* menuCheckShowTAZElements = nullptr;509510/// @brief menu check to extend to edge nodes511MFXMenuCheckIcon* menuCheckExtendSelection = nullptr;512513/// @brief menu check to set change all phases514MFXMenuCheckIcon* menuCheckChangeAllPhases = nullptr;515516/// @brief menu check to we should warn about merging junctions517MFXMenuCheckIcon* menuCheckMergeAutomatically = nullptr;518519/// @brief menu check to show connection as bubble in "Move" mode.520MFXMenuCheckIcon* menuCheckShowJunctionBubble = nullptr;521522/// @brief menu check to apply movement to elevation523MFXMenuCheckIcon* menuCheckMoveElevation = nullptr;524525/// @brief menu check to the endpoint for a created edge should be set as the new source526MFXMenuCheckIcon* menuCheckChainEdges = nullptr;527528/// @brief check checkable to create auto create opposite edge529MFXMenuCheckIcon* menuCheckAutoOppositeEdge = nullptr;530531/// @brief separator532FXMenuSeparator* separator = nullptr;533534private:535/// @brief pointer to current GNEApplicationWindow536GNEApplicationWindow* myApplicationWindow;537538/// @brief Invalidated copy constructor.539NetworkViewOptions(const NetworkViewOptions&) = delete;540541/// @brief Invalidated assignment operator.542NetworkViewOptions& operator=(const NetworkViewOptions&) = delete;543};544545/// @brief struct used to group all variables related to view options in supermode Demand546struct DemandViewOptions {547548/// @brief default constructor549DemandViewOptions(GNEApplicationWindow* applicationWindow);550551/// @brief build menu checks552void buildDemandViewOptionsMenuChecks(FXMenuPane* editMenu);553554/// @brief hide all options menu checks555void hideDemandViewOptionsMenuChecks();556557/// @brief update shortcuts (alt+X)558void updateShortcuts();559560/// @brief menu check to show grid button561MFXMenuCheckIcon* menuCheckToggleGrid = nullptr;562563/// @brief menu check to toggle draw junction shape564MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;565566/// @brief menu check to draw vehicles in begin position or spread in lane567MFXMenuCheckIcon* menuCheckDrawSpreadVehicles = nullptr;568569/// @brief menu check for hide shapes (Polygons and POIs)570MFXMenuCheckIcon* menuCheckHideShapes = nullptr;571572/// @brief menu check for show all trips plans573MFXMenuCheckIcon* menuCheckShowAllTrips = nullptr;574575/// @brief menu check for hide non inspected demand elements576MFXMenuCheckIcon* menuCheckHideNonInspectedDemandElements = nullptr;577578/// @brief menu check for show overlapped routes579MFXMenuCheckIcon* menuCheckShowOverlappedRoutes = nullptr;580581/// @brief menu check for show all person plans582MFXMenuCheckIcon* menuCheckShowAllPersonPlans = nullptr;583584/// @brief menu check for lock Person585MFXMenuCheckIcon* menuCheckLockPerson = nullptr;586587/// @brief menu check for show all container plans588MFXMenuCheckIcon* menuCheckShowAllContainerPlans = nullptr;589590/// @brief menu check for lock Container591MFXMenuCheckIcon* menuCheckLockContainer = nullptr;592593/// @brief separator594FXMenuSeparator* separator = nullptr;595596private:597/// @brief pointer to current GNEApplicationWindow598GNEApplicationWindow* myApplicationWindow;599600/// @brief Invalidated copy constructor.601DemandViewOptions(const DemandViewOptions&) = delete;602603/// @brief Invalidated assignment operator.604DemandViewOptions& operator=(const DemandViewOptions&) = delete;605};606607/// @brief struct used to group all variables related to view options in supermode Data608struct DataViewOptions {609610/// @brief default constructor611DataViewOptions(GNEApplicationWindow* applicationWindow);612613/// @brief build menu checks614void buildDataViewOptionsMenuChecks(FXMenuPane* editMenu);615616/// @brief hide all options menu checks617void hideDataViewOptionsMenuChecks();618619/// @brief update shortcuts (alt+X)620void updateShortcuts();621622/// @brief menu check to toggle draw junction shape623MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;624625/// @brief menu check to show Additionals626MFXMenuCheckIcon* menuCheckShowAdditionals = nullptr;627628/// @brief menu check to show Shapes629MFXMenuCheckIcon* menuCheckShowShapes = nullptr;630631/// @brief menu check to show Demand Elements632MFXMenuCheckIcon* menuCheckShowDemandElements = nullptr;633634/// @brief menu check to toggle TAZRel drawing mode635MFXMenuCheckIcon* menuCheckToggleTAZRelDrawing = nullptr;636637/// @brief menu check to toggle TAZ draw fill638MFXMenuCheckIcon* menuCheckToggleTAZDrawFill = nullptr;639640/// @brief menu check to toggle TAZRel only from641MFXMenuCheckIcon* menuCheckToggleTAZRelOnlyFrom = nullptr;642643/// @brief menu check to toggle TAZRel only to644MFXMenuCheckIcon* menuCheckToggleTAZRelOnlyTo = nullptr;645646/// @brief separator647FXMenuSeparator* separator = nullptr;648649private:650/// @brief pointer to current GNEApplicationWindow651GNEApplicationWindow* myApplicationWindow;652653/// @brief Invalidated copy constructor.654DataViewOptions(const DataViewOptions&) = delete;655656/// @brief Invalidated assignment operator.657DataViewOptions& operator=(const DataViewOptions&) = delete;658};659660/// @brief constructor661EditMenuCommands(GNEApplicationWindow* applicationWindow);662663/// @brief build undo-redo menu commands664void buildUndoRedoMenuCommands(FXMenuPane* editMenu);665666/// @brief build view menu commands667void buildViewMenuCommands(FXMenuPane* editMenu);668669/// @brief build front element commands670void buildFrontElementMenuCommand(FXMenuPane* editMenu);671672/// @brief build open sumo menu commands673void buildOpenSUMOMenuCommands(FXMenuPane* editMenu);674675/// @brief FXMenuCommand for undo last change676FXMenuCommand* undoLastChange = nullptr;677678/// @brief FXMenuCommand for redo last change679FXMenuCommand* redoLastChange = nullptr;680681/// @brief FXMenuCommand for open undolist dialog682FXMenuCommand* openUndolistDialog = nullptr;683684/// @brief checkBox for allow undo-redo685FXMenuCheck* menuCheckAllowUndoRedo = nullptr;686687/// @brief network view options688NetworkViewOptions networkViewOptions;689690/// @brief demand view options691DemandViewOptions demandViewOptions;692693/// @brief data view options694DataViewOptions dataViewOptions;695696/// @brief FXMenuCommand for edit view scheme697FXMenuCommand* editViewScheme = nullptr;698699/// @brief FXMenuCommand for edit view port700FXMenuCommand* editViewPort = nullptr;701702/// @brief FXMenuCommand for toggle front element703FXMenuCommand* toggleFrontElement = nullptr;704705/// @brief menu check for load additionals in SUMO GUI706FXMenuCheck* loadAdditionalsInSUMOGUI = nullptr;707708/// @brief menu check for load demand in SUMO GUI709FXMenuCheck* loadDemandInSUMOGUI = nullptr;710711/// @brief FXMenuCommand for open in SUMO GUI712FXMenuCommand* openInSUMOGUI = nullptr;713714private:715/// @brief pointer to current GNEApplicationWindow716GNEApplicationWindow* myApplicationWindow;717718/// @brief Invalidated copy constructor.719EditMenuCommands(const EditMenuCommands&) = delete;720721/// @brief Invalidated assignment operator.722EditMenuCommands& operator=(const EditMenuCommands&) = delete;723};724725/// @brief struct for processing menu commands726struct LockMenuCommands {727728/// @brief constructor729LockMenuCommands(GNEApplicationWindow* applicationWindow);730731/// @brief build menu commands732void buildLockMenuCommands(FXMenuPane* editMenu);733734/// @brief remove hotkeys735void removeHotkeys();736737/// @brief show network processing menu commands738void showNetworkLockMenuCommands();739740/// @brief show network processing menu commands741void hideNetworkLockMenuCommands();742743/// @brief show demand processing menu commands744void showDemandLockMenuCommands();745746/// @brief show demand processing menu commands747void hideDemandLockMenuCommands();748749/// @brief show data processing menu commands750void showDataLockMenuCommands();751752/// @brief show data processing menu commands753void hideDataLockMenuCommands();754755/// @brief lock all756void lockAll();757758/// @brief unlock all759void unlockAll();760761/// @brief lock or unlock object based in a tag property762void editLocking(const GNEAttributeCarrier* AC, const FXbool value);763764/// @name Processing FXMenuCommands for Network mode765/// @{766/// @brief menu check to lock junction767MFXMenuCheckIcon* menuCheckLockJunctions = nullptr;768769/// @brief menu check to lock edges770MFXMenuCheckIcon* menuCheckLockEdges = nullptr;771772/// @brief menu check to lock lanes773MFXMenuCheckIcon* menuCheckLockLanes = nullptr;774775/// @brief menu check to lock connections776MFXMenuCheckIcon* menuCheckLockConnections = nullptr;777778/// @brief menu check to lock crossings779MFXMenuCheckIcon* menuCheckLockCrossings = nullptr;780781/// @brief menu check to lock walkingAreas782MFXMenuCheckIcon* menuCheckLockWalkingAreas = nullptr;783784/// @brief menu check to lock additionals785MFXMenuCheckIcon* menuCheckLockAdditionals = nullptr;786787/// @brief menu check to lock TAZs788MFXMenuCheckIcon* menuCheckLockTAZs = nullptr;789790/// @brief menu check to lock Wires791MFXMenuCheckIcon* menuCheckLockWires = nullptr;792793/// @brief menu check to lock polygons794MFXMenuCheckIcon* menuCheckLockPolygons = nullptr;795796/// @brief menu check to lock POIs797MFXMenuCheckIcon* menuCheckLockPOIs = nullptr;798799/// @brief menu check to lock jps walkableareas800MFXMenuCheckIcon* menuCheckLockJpsWalkableAreas = nullptr;801802/// @brief menu check to lock jps obstacles803MFXMenuCheckIcon* menuCheckLockJpsObstacles = nullptr;804805/// @}806807/// @name Processing FXMenuCommands for Demand mode808/// @{809/// @brief menu check to lock routes810MFXMenuCheckIcon* menuCheckLockRoutes = nullptr;811812/// @brief menu check to lock vehicles813MFXMenuCheckIcon* menuCheckLockVehicles = nullptr;814815/// @brief menu check to lock persons816MFXMenuCheckIcon* menuCheckLockPersons = nullptr;817818/// @brief menu check to lock personTrips819MFXMenuCheckIcon* menuCheckLockPersonTrips = nullptr;820821/// @brief menu check to lock walks822MFXMenuCheckIcon* menuCheckLockWalks = nullptr;823824/// @brief menu check to lock rides825MFXMenuCheckIcon* menuCheckLockRides = nullptr;826827/// @brief menu check to lock containers828MFXMenuCheckIcon* menuCheckLockContainers = nullptr;829830/// @brief menu check to lock transports831MFXMenuCheckIcon* menuCheckLockTransports = nullptr;832833/// @brief menu check to lock tranships834MFXMenuCheckIcon* menuCheckLockTranships = nullptr;835836/// @brief menu check to lock stops837MFXMenuCheckIcon* menuCheckLockStops = nullptr;838839/// @}840841/// @name Processing FXMenuCommands for Data mode842/// @{843/// @brief menu check to lock edge datas844MFXMenuCheckIcon* menuCheckLockEdgeDatas = nullptr;845846/// @brief menu check to lock edgeRelDatas847MFXMenuCheckIcon* menuCheckLockEdgeRelDatas = nullptr;848849/// @brief menu check to lock edgeTAZRels850MFXMenuCheckIcon* menuCheckLockEdgeTAZRels = nullptr;851852/// @}853854/// @brief menu check for lock selected elements855MFXMenuCheckIcon* menuCheckLockSelectedElements = nullptr;856857protected:858/// @brief Parse hot key from string859FXHotKey parseHotKey(const FXwchar character);860861private:862/// @brief pointer to current GNEApplicationWindow863GNEApplicationWindow* myApplicationWindow;864865/// @brief Invalidated copy constructor.866LockMenuCommands(const LockMenuCommands&) = delete;867868/// @brief Invalidated assignment operator.869LockMenuCommands& operator=(const LockMenuCommands&) = delete;870};871872/// @brief struct for processing menu commands873struct ProcessingMenuCommands {874875/// @brief constructor876ProcessingMenuCommands(GNEApplicationWindow* applicationWindow);877878/// @brief build menu commands879void buildProcessingMenuCommands(FXMenuPane* processingMenu);880881/// @brief show network processing menu commands882void showNetworkProcessingMenuCommands();883884/// @brief show network processing menu commands885void hideNetworkProcessingMenuCommands();886887/// @brief show demand processing menu commands888void showDemandProcessingMenuCommands();889890/// @brief show demand processing menu commands891void hideDemandProcessingMenuCommands();892893/// @brief show data processing menu commands894void showDataProcessingMenuCommands();895896/// @brief show data processing menu commands897void hideDataProcessingMenuCommands();898899/// @brief show separator900void showSeparator();901902/// @brief hide separator903void hideSeparator();904905/// @name Processing FXMenuCommands for Network mode906/// @{907/// @brief FXMenuCommand for compute network908FXMenuCommand* computeNetwork = nullptr;909910/// @brief FXMenuCommand for compute network with volatile options911FXMenuCommand* computeNetworkVolatile = nullptr;912913/// @brief FXMenuCommand for clean junctions without edges914FXMenuCommand* cleanJunctions = nullptr;915916/// @brief FXMenuCommand for join selected junctions917FXMenuCommand* joinJunctions = nullptr;918919/// @brief FXMenuCommand for clear invalid crossings920FXMenuCommand* clearInvalidCrossings = nullptr;921922/// @brief checkBox for recomputing when changing data mode923MFXMenuCheckIcon* menuCheckRecomputeDataMode = nullptr;924925/// @}926927/// @name Processing FXMenuCommands for Demand mode928/// @{929/// @brief FXMenuCommand for compute demand elements930FXMenuCommand* computeDemand = nullptr;931932/// @brief FXMenuCommand for clean routes without vehicles933FXMenuCommand* cleanRoutes = nullptr;934935/// @brief FXMenuCommand for join routes936FXMenuCommand* joinRoutes = nullptr;937938/// @brief FXMenuCommand for adjust person plans939FXMenuCommand* adjustPersonPlans = nullptr;940941/// @brief FXMenuCommand for clear invalid demand elements942FXMenuCommand* clearInvalidDemandElements = nullptr;943/// @}944945/// @name Processing FXMenuCommands for Data mode946/// @{947948/// @}949950/// @brief FXMenuCommand for open option menus951FXMenuCommand* optionMenus = nullptr;952953private:954/// @brief pointer to current GNEApplicationWindow955GNEApplicationWindow* myApplicationWindow;956957/// @brief separator for optionsMenu958FXMenuSeparator* myOptionsSeparator = nullptr;959960/// @brief separator for checkBox961FXMenuSeparator* mySeparatorCheckBox = nullptr;962963/// @brief Invalidated copy constructor.964ProcessingMenuCommands(const ProcessingMenuCommands&) = delete;965966/// @brief Invalidated assignment operator.967ProcessingMenuCommands& operator=(const ProcessingMenuCommands&) = delete;968};969970/// @brief struct for locate menu commands971struct LocateMenuCommands {972973/// @brief constructor974LocateMenuCommands(GNEApplicationWindow* applicationWindow);975976/// @brief build menu commands977void buildLocateMenuCommands(FXMenuPane* locateMenu);978979private:980/// @brief pointer to current GNEApplicationWindow981GNEApplicationWindow* myApplicationWindow;982983/// @brief Invalidated copy constructor.984LocateMenuCommands(const LocateMenuCommands&) = delete;985986/// @brief Invalidated assignment operator.987LocateMenuCommands& operator=(const LocateMenuCommands&) = delete;988};989990/// @brief struct for locate menu commands991struct ToolsMenuCommands {992993/// @brief constructor994ToolsMenuCommands(GNEApplicationWindow* applicationWindow);995996/// @brief destructor997~ToolsMenuCommands();998999/// @brief build tools (and menu commands)1000void buildTools(FXMenuPane* toolsMenu, const std::map<std::string, FXMenuPane*>& menuPaneToolMaps);10011002/// @brief show tool1003long showTool(FXObject* menuCommand);10041005/// @brief run tool dialog1006long runToolDialog(FXObject* menuCommand) const;10071008/// @brief run postprocessing1009long postProcessing(FXObject* menuCommand) const;10101011private:1012/// @brief map with python tools1013std::vector<GNEPythonTool*> myPythonTools;10141015/// @brief python tool dialog1016GNEPythonToolDialog* myPythonToolDialog = nullptr;10171018/// @brief pointer to current GNEApplicationWindow1019GNEApplicationWindow* myApplicationWindow;10201021/// @brief Invalidated copy constructor.1022ToolsMenuCommands(const ToolsMenuCommands&) = delete;10231024/// @brief Invalidated assignment operator.1025ToolsMenuCommands& operator=(const ToolsMenuCommands&) = delete;1026};10271028/// @brief struct for windows menu commands1029struct WindowsMenuCommands {10301031/// @brief constructor1032WindowsMenuCommands(GNEApplicationWindow* applicationWindow);10331034/// @brief build menu commands1035void buildWindowsMenuCommands(FXMenuPane* windowsMenu, FXStatusBar* statusbar, GUIMessageWindow* messageWindow);10361037private:1038/// @brief pointer to current GNEApplicationWindow1039GNEApplicationWindow* myApplicationWindow;10401041/// @brief Invalidated copy constructor.1042WindowsMenuCommands(const WindowsMenuCommands&) = delete;10431044/// @brief Invalidated assignment operator.1045WindowsMenuCommands& operator=(const WindowsMenuCommands&) = delete;1046};10471048/// @brief struct for help menu commands1049struct HelpMenuCommands {10501051/// @brief constructor1052HelpMenuCommands(GNEApplicationWindow* applicationWindow);10531054/// @brief build menu commands1055void buildHelpMenuCommands(FXMenuPane* helpMenu);10561057private:1058/// @brief pointer to current GNEApplicationWindow1059GNEApplicationWindow* myApplicationWindow;10601061/// @brief Invalidated copy constructor.1062HelpMenuCommands(const HelpMenuCommands&) = delete;10631064/// @brief Invalidated assignment operator.1065HelpMenuCommands& operator=(const HelpMenuCommands&) = delete;1066};10671068/// @brief struct for supermode commands1069struct SupermodeCommands {10701071/// @brief constructor1072SupermodeCommands(GNEApplicationWindow* applicationWindow);10731074/// @brief build menu commands1075void buildSupermodeCommands(FXMenuPane* editMenu);10761077/// @brief show all menu commands1078void showSupermodeCommands();10791080/// @brief set default view1081void setDefaultView();10821083/// @brief set JuPedSim view1084void setJuPedSimView();10851086/// @brief FXMenuCommand for network supermode1087FXMenuCommand* networkMode = nullptr;10881089/// @brief FXMenuCommand for demand supermode1090FXMenuCommand* demandMode = nullptr;10911092/// @brief FXMenuCommand for data supermode1093FXMenuCommand* dataMode = nullptr;10941095private:1096/// @brief pointer to current GNEApplicationWindow1097GNEApplicationWindow* myApplicationWindow;10981099/// @brief Invalidated copy constructor.1100SupermodeCommands(const SupermodeCommands&) = delete;11011102/// @brief Invalidated assignment operator.1103SupermodeCommands& operator=(const SupermodeCommands&) = delete;1104};11051106/// @brief SUMO config handler1107class GNESumoConfigHandler {11081109public:1110/// @brief Constructor1111GNESumoConfigHandler(GNEApplicationWindow* applicationWindow, const std::string& sumoConfigFile);11121113/// @brief load SUMO config1114bool loadSumoConfig();11151116private:1117/// @brief pointer to current GNEApplicationWindow1118GNEApplicationWindow* myApplicationWindow;11191120/// @brief SUMO config file1121const std::string mySumoConfigFile;11221123/// @brief Invalidated copy constructor.1124GNESumoConfigHandler(const GNESumoConfigHandler&) = delete;11251126/// @brief Invalidated assignment operator.1127GNESumoConfigHandler& operator=(const GNESumoConfigHandler&) = delete;1128};11291130/// @brief netconvert config handler1131class GNENetconvertConfigHandler {11321133public:1134/// @brief Constructor1135GNENetconvertConfigHandler(const std::string& file);11361137/// @brief load netconvert config1138bool loadNetconvertConfig();11391140private:1141/// @brief netconvert config file1142const std::string myNetconvertConfigFile;11431144/// @brief Invalidated copy constructor.1145GNENetconvertConfigHandler(const GNENetconvertConfigHandler&) = delete;11461147/// @brief Invalidated assignment operator.1148GNENetconvertConfigHandler& operator=(const GNENetconvertConfigHandler&) = delete;1149};11501151/// @brief netedit config handler1152class GNENeteditConfigHandler {11531154public:1155/// @brief Constructor1156GNENeteditConfigHandler(GNEApplicationWindow* applicationWindow, const std::string& neteditConfigFile);11571158/// @brief load netedit config1159bool loadNeteditConfig();11601161private:1162/// @brief pointer to current GNEApplicationWindow1163GNEApplicationWindow* myApplicationWindow;11641165/// @brief netedit config file1166const std::string myNeteditConfigFile;11671168/// @brief Invalidated copy constructor.1169GNENeteditConfigHandler(const GNENeteditConfigHandler&) = delete;11701171/// @brief Invalidated assignment operator.1172GNENeteditConfigHandler& operator=(const GNENeteditConfigHandler&) = delete;1173};11741175/// @brief modul for handling file buckets1176class FileBucketHandler {11771178public:1179/// @brief constructor1180FileBucketHandler(GNEApplicationWindow* applicationWindow, OptionsCont& neteditOptions, OptionsCont& sumoOptions);11811182/// @brief destructor1183~FileBucketHandler();11841185/// @brief register AC1186void registerAC(const GNEAttributeCarrier* AC);11871188/// @brief delete AC1189void unregisterAC(const GNEAttributeCarrier* AC);11901191/// @brief update filename vinculated with this AC1192FileBucket* updateAC(const GNEAttributeCarrier* AC, const std::string& filename);11931194/// @brief check if the given filename can be assigned to the given AC1195bool checkFilename(const GNEAttributeCarrier* AC, const std::string& filename) const;11961197/// @brief get current config directory (if we defined a netedit, sumo or netconvert config)1198std::string getConfigDirectory() const;11991200/// @brief get current config patter (if we defined a netedit, sumo or netconvert config)1201std::string getConfigFilePrefix(const std::string& sufix) const;12021203/// @brief functions related with buckets1204/// @{12051206/// @brief get default bucket1207FileBucket* getDefaultBucket(const FileBucket::Type type) const;12081209/// @brief get bucket1210FileBucket* getBucket(const FileBucket::Type type, const std::string& filename, const bool create);12111212/// @brief get vector with all fileBuckets related with the given file type1213const std::vector<FileBucket*>& getFileBuckets(const FileBucket::Type type) const;12141215/// @}12161217/// @brief functions related with filenames1218/// @{12191220/// @brief get default filename associated with the given tipe1221std::string getDefaultFilename(const FileBucket::Type type) const;12221223/// @brief get default folder associated with the given tipe1224std::string getDefaultFolder(const FileBucket::Type type) const;12251226/// brief set default additional file1227void setDefaultFilenameFile(const FileBucket::Type type, const std::string& filename);12281229/// @brief check if at least we have an additional file defined1230bool isFilenameDefined(const FileBucket::Type type) const;12311232/// brief set default files for all buckets1233void resetDefaultFilenames();12341235/// @}12361237/// @brief update options1238void updateOptions();12391240private:1241/// @brief parse filenames1242std::string parseFilenames(const std::vector<FileBucket::Type> types) const;12431244/// @brief removed empty buckets1245void removeEmptyBuckets();12461247/// @brief get prefix of the given filename1248std::string getPrefix(FileBucket::Type type, const std::vector<std::string> invalidExtensions) const;12491250/// @brief pointer to application window1251GNEApplicationWindow* myApplicationWindow = nullptr;12521253/// @brief reference to netedit options1254OptionsCont& myNeteditOptions;12551256/// @brief reference to sumo options1257OptionsCont& mySumoOptions;12581259/// @brief map with the buckets1260std::map<FileBucket::Type, std::vector<FileBucket*> > myBuckets;12611262/// @brief Invalidated copy constructor.1263FileBucketHandler(const FileBucketHandler&) = delete;12641265/// @brief Invalidated assignment operator.1266FileBucketHandler& operator=(const FileBucketHandler&) = delete;1267};12681269/// @brief toggle edit options Network menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)1270static bool toggleEditOptionsNetwork(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,1271FXObject* obj, FXSelector sel);12721273/// @brief toggle edit options Demand menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)1274static bool toggleEditOptionsDemand(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,1275FXObject* obj, FXSelector sel);12761277/// @brief toggle edit options Data menu commands (called in GNEApplicationWindow::onCmdToggleEditOptions)1278static bool toggleEditOptionsData(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,1279FXObject* obj, FXSelector sel);12801281/// @brief check if a string ends with another string1282static bool stringEndsWith(const std::string& str, const std::string& suffix);12831284private:1285/// @brief Invalidated copy constructor.1286GNEApplicationWindowHelper(const GNEApplicationWindowHelper&) = delete;12871288/// @brief Invalidated assignment operator.1289GNEApplicationWindowHelper& operator=(const GNEApplicationWindowHelper&) = delete;1290};129112921293