/****************************************************************************/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 GNEViewNetHelper.h14/// @author Pablo Alvarez Lopez15/// @date Feb 201916///17// A file used to reduce the size of GNEViewNet.h grouping structs and classes18/****************************************************************************/19#pragma once20#include <config.h>2122#include <unordered_set>23#include <netedit/elements/GNEMoveElement.h>24#include <utils/foxtools/MFXButtonTooltip.h>25#include <utils/foxtools/MFXMenuButtonTooltip.h>26#include <utils/foxtools/MFXCheckableButton.h>27#include <utils/foxtools/MFXLCDLabel.h>28#include <utils/gui/globjects/GUIGlObject.h>29#include <utils/gui/globjects/GUIGlObjectTypes.h>30#include <utils/gui/div/GUIGlobalViewObjectsHandler.h>31#include <utils/xml/CommonXMLStructure.h>3233// ===========================================================================34// enum35// ===========================================================================3637/// @brie enum for supermodes38enum class Supermode {39/// @brief Network mode (Edges, junctions, etc..)40NETWORK,41///@brief Demand mode (Routes, Vehicles etc..)42DEMAND,43///@brief Data mode (edgeData, LaneData etc..)44DATA45};4647/// @brie enum for network edit modes48enum class NetworkEditMode {49/// @brief empty Network mode50NETWORK_NONE,51///@brief mode for inspecting network elements52NETWORK_INSPECT,53///@brief mode for deleting network elements54NETWORK_DELETE,55///@brief mode for selecting network elements56NETWORK_SELECT,57///@brief mode for moving network elements58NETWORK_MOVE,59///@brief mode for creating new edges60NETWORK_CREATE_EDGE,61///@brief mode for connecting lanes62NETWORK_CONNECT,63///@brief mode for editing tls64NETWORK_TLS,65///@brief Mode for editing additionals66NETWORK_ADDITIONAL,67///@brief Mode for editing crossing68NETWORK_CROSSING,69///@brief Mode for editing TAZ70NETWORK_TAZ,71///@brief Mode for editing Polygons72NETWORK_SHAPE,73///@brief Mode for editing connection prohibitions74NETWORK_PROHIBITION,75///@brief Mode for editing wires76NETWORK_WIRE,77///@brief Mode for editing decals78NETWORK_DECAL79};8081/// @brie enum for demand edit modes82enum class DemandEditMode {83/// @brief empty Demand mode84DEMAND_NONE,85///@brief mode for inspecting demand elements86DEMAND_INSPECT,87///@brief mode for deleting demand elements88DEMAND_DELETE,89///@brief mode for selecting demand elements90DEMAND_SELECT,91///@brief mode for moving demand elements92DEMAND_MOVE,93///@brief Mode for editing routes94DEMAND_ROUTE,95///@brief Mode for editing route distributions96DEMAND_ROUTEDISTRIBUTION,97///@brief Mode for editing vehicles98DEMAND_VEHICLE,99///@brief Mode for editing types100DEMAND_TYPE,101///@brief Mode for editing type distributions102DEMAND_TYPEDISTRIBUTION,103///@brief Mode for editing stops104DEMAND_STOP,105///@brief Mode for editing person106DEMAND_PERSON,107///@brief Mode for editing person plan108DEMAND_PERSONPLAN,109///@brief Mode for editing container110DEMAND_CONTAINER,111///@brief Mode for editing container plan112DEMAND_CONTAINERPLAN113};114115/// @brief enum for data edit modes116enum class DataEditMode {117/// @brief empty Data mode118DATA_NONE,119/// @brief mode for inspecting data elements120DATA_INSPECT,121/// @brief mode for deleting data elements122DATA_DELETE,123/// @brief mode for selecting data elements124DATA_SELECT,125/// @brief mode for create edgeData elements126DATA_EDGEDATA,127/// @brief mode for create edgeRelData elements128DATA_EDGERELDATA,129/// @brief mode for create TAZRelData elements130DATA_TAZRELDATA,131/// @brief mode for create meanData elements132DATA_MEANDATA133};134135// ===========================================================================136// class declarations137// ===========================================================================138139class GNEAttributeCarrier;140class GNEFrame;141class GNENet;142class GNETagPropertiesDatabase;143class GNEUndoList;144class GNEViewNet;145class GNEViewParent;146// dialogs147class GNEVClassesDialog;148class GNEFixNetworkElements;149class GNEFixAdditionalElementsDialog;150class GNEFixDemandElementsDialog;151// network elements152class GNENetworkElement;153class GNEJunction;154class GNEEdge;155class GNELane;156class GNEConnection;157class GNECrossing;158class GNEWalkingArea;159class GNEInternalLane;160// additional elements161class GNEAdditional;162class GNEPoly;163class GNEPOI;164class GNETAZ;165// demand elements166class GNEDemandElement;167// data elements168class GNEDataSet;169class GNEGenericData;170class GNEEdgeData;171class GNEEdgeRelData;172class GNETAZRelData;173174// ===========================================================================175// classes and structs definitions176// ===========================================================================177178struct GNEViewNetHelper {179180/// @brief lock manager181class LockManager {182183public:184/// @brief constructor185LockManager(GNEViewNet* viewNet);186187/// @brief destructor188~LockManager();189190/// @brief check if given GLObject is locked for inspect, select, delete and move191bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const;192193/// @brief update flags194void updateFlags();195196/// @brief update lock inspect menuBar197void updateLockMenuBar();198199private:200/// @brief operation locked201class OperationLocked {202203public:204/// @brief constructor205OperationLocked();206207/// @brief parameter constructor208OperationLocked(Supermode supermode);209210/// @brief destructor211~OperationLocked();212213/// @brief get supermode214Supermode getSupermode() const;215216/// @brief flag for lock/unlock217bool lock = false;218219private:220/// @brief supermode associated with this operation locked221Supermode mySupermode;222};223224/// @brief pointer to viewNet225GNEViewNet* myViewNet;226227/// @brief map with locked elements228std::map<GUIGlObjectType, OperationLocked> myLockedElements;229230/// @brief Invalidated copy constructor.231LockManager(const LockManager&) = delete;232233/// @brief Invalidated assignment operator.234LockManager& operator=(const LockManager&) = delete;235};236237/// @brief class used for group inspected elements238class InspectedElements {239240public:241/// @brief constructor242InspectedElements();243244/// @name inspect functions245/// @{246/// @brief inspect AC247void inspectAC(GNEAttributeCarrier* AC);248249/// @brief inspect multiple ACs250void inspectACs(const std::vector<GNEAttributeCarrier*>& ACs);251252/// @brief uninspect AC253void uninspectAC(GNEAttributeCarrier* AC);254255/// @brief clear inspected AC256void clearInspectedElements();257258/// @}259260/// @name get functions261/// @{262/// @brief get first inspected AC (needed because the main container is a hash)263GNEAttributeCarrier* getFirstAC() const;264265/// @brief get hash table with all inspected ACs266const std::unordered_set<GNEAttributeCarrier*>& getACs() const;267268/// @}269270/// @name check functions271/// @{272// @brief check if the given AC is inspected273bool isACInspected(GNEAttributeCarrier* AC) const;274275// @brief check if the given constant AC is inspected276bool isACInspected(const GNEAttributeCarrier* AC) const;277278/// @brief check if we're inspecting at least one element279bool isInspectingElements() const;280281/// @brief check if we're inspecting exactly one element282bool isInspectingSingleElement() const;283284/// @brief check if we're inspecting more than one elements285bool isInspectingMultipleElements() const;286287/// @}288289private:290/// @brief first inspected element (usually the clicked element)291GNEAttributeCarrier* myFirstInspectedAC = nullptr;292293/// @brief hash table with all inspected ACs (we use a set to make deletion of massive elements more quickly)294std::unordered_set<GNEAttributeCarrier*> myInspectedACs;295296/// @brief Invalidated copy constructor.297InspectedElements(const InspectedElements&) = delete;298299/// @brief Invalidated assignment operator.300InspectedElements& operator=(const InspectedElements&) = delete;301};302303/// @brief class used for group front elements304class MarkFrontElements {305306public:307/// @brief constructor308MarkFrontElements();309310/// @brief mark AC as drawing front311void markAC(GNEAttributeCarrier* AC);312313/// @brief unmark AC for drawing front314void unmarkAC(GNEAttributeCarrier* AC);315316/// @brief unmark all ACs317void unmarkAll();318319/// @brief get hash table with all fronted ACs320const std::unordered_set<GNEAttributeCarrier*>& getACs() const;321322private:323/// @brief hash table with all marked ACs (we use a set to make deletion of massive elements more quickly)324std::unordered_set<GNEAttributeCarrier*> myMarkedACs;325326/// @brief Invalidated copy constructor.327MarkFrontElements(const MarkFrontElements&) = delete;328329/// @brief Invalidated assignment operator.330MarkFrontElements& operator=(const MarkFrontElements&) = delete;331};332333/// @brief class used to group all variables related with objects under cursor after a click over view334class ViewObjectsSelector {335336public:337/// @brief constructor338ViewObjectsSelector(GNEViewNet* viewNet);339340/// @brief update objects (using gViewObjectsHandler)341void updateObjects();342343/// @brief update merging junctions344void updateMergingJunctions();345346/// @brief fill the given SUMO base object with the current single objects347void fillSumoBaseObject(CommonXMLStructure::SumoBaseObject* baseObjet) const;348349/// @brief filter all elements except the given GLO type350void filterAllExcept(GUIGlObjectType exception);351352/// @brief filter by supermode353void filterBySuperMode();354355/// @brief filter (remove) junctions356void filterJunctions();357358/// @brief filter (remove) edges359void filterEdges();360361/// @brief filter (remove) lanes362void filterLanes();363364/// @brief filter (remove) connections365void filterConnections();366367/// @brief filter (remove) crossings368void filterCrossings();369370/// @brief filter (remove) walkingAreas371void filterWalkingAreas();372373/// @brief filter (remove) polys and POIs374void filterShapes();375376/// @brief filter (remove) additionals377void filterAdditionals(const bool includeStoppigPlaces, const bool includeTAZs);378379/// @brief filter (remove) network elements380void filterNetworkElements();381382/// @brief filter (remove) demand elements383void filterDemandElements(const bool includeRoutes);384385/// @brief filter (remove) datga elements386void filterDataElements();387388/// @brief filter locked elements (except the ignoreFilter)389void filterLockedElements(const std::vector<GUIGlObjectType> ignoreFilter = {});390391/// @brief get front GUIGLObject or a pointer to nullptr392const GUIGlObject* getGUIGlObjectFront() const;393394/// @brief get front attribute carrier or a pointer to nullptr395GNEAttributeCarrier* getAttributeCarrierFront() const;396397/// @brief get front network element or a pointer to nullptr398GNENetworkElement* getNetworkElementFront() const;399400/// @brief get front additional element or a pointer to nullptr401GNEAdditional* getAdditionalFront() const;402403/// @brief get front demand element or a pointer to nullptr404GNEDemandElement* getDemandElementFront() const;405406/// @brief get generic data element or a pointer to nullptr407GNEGenericData* getGenericDataElementFront() const;408409/// @brief get front junction or a pointer to nullptr410GNEJunction* getJunctionFront() const;411412/// @brief get front edge or a pointer to nullptr413GNEEdge* getEdgeFront() const;414415/// @brief get front lane or a pointer to nullptr416GNELane* getLaneFront() const;417418/// @brief get front lane or a pointer to nullptr checking if is locked419GNELane* getLaneFrontNonLocked() const;420421/// @brief get lanes422const std::vector<GNELane*>& getLanes() const;423424/// @brief get front crossing or a pointer to nullptr425GNECrossing* getCrossingFront() const;426427/// @brief get front walkingArea or a pointer to nullptr428GNEWalkingArea* getWalkingAreaFront() const;429430/// @brief get front connection or a pointer to nullptr431GNEConnection* getConnectionFront() const;432433/// @brief get front internal lane or a pointer to nullptr434GNEInternalLane* getInternalLaneFront() const;435436/// @brief get front TAZ or a pointer to nullptr437GNETAZ* getTAZFront() const;438439/// @brief get front POI or a pointer to nullptr440GNEPOI* getPOIFront() const;441442/// @brief get front Poly or a pointer to nullptr443GNEPoly* getPolyFront() const;444445/// @brief get edge data element or a pointer to nullptr446GNEEdgeData* getEdgeDataElementFront() const;447448/// @brief get edge rel data element or a pointer to nullptr449GNEEdgeRelData* getEdgeRelDataElementFront() const;450451/// @brief get TAZ rel data element or a pointer to nullptr452GNETAZRelData* getTAZRelDataElementFront() const;453454/// @brief get vector with GL objects455const std::vector<GUIGlObject*>& getGLObjects() const;456457/// @brief get vector with ACs458const std::vector<GNEAttributeCarrier*>& getAttributeCarriers() const;459460/// @brief get vector with junctions461const std::vector<GNEJunction*>& getJunctions() const;462463/// @brief get vector with edges464const std::vector<GNEEdge*>& getEdges() const;465466/// @brief get vector with TAZs467const std::vector<GNETAZ*>& getTAZs() const;468469/// @brief get vector with additionals470const std::vector<GNEAdditional*>& getAdditionals() const;471472/// @brief get vector with Demand Elements473const std::vector<GNEDemandElement*>& getDemandElements() const;474475/// @brief get merging junctions476const std::vector<const GNEJunction*>& getMergingJunctions() const;477478protected:479/// @brief objects container480class ViewObjectsContainer {481482public:483/// @brief constructor484ViewObjectsContainer();485486/// @brief clear elements487void clearElements();488489/// @brief reseve memory for all elements490void reserve(int size);491492/// @brief filter elements493void filterElements(const std::vector<const GUIGlObject*>& objects);494495/// @brief vector with the GUIGlObjects496std::vector<GUIGlObject*> GUIGlObjects;497498/// @brief vector with the attribute carriers499std::vector<GNEAttributeCarrier*> attributeCarriers;500501/// @brief vector with the network elements502std::vector<GNENetworkElement*> networkElements;503504/// @brief vector with the additional elements505std::vector<GNEAdditional*> additionals;506507/// @brief vector with the demand elements508std::vector<GNEDemandElement*> demandElements;509510/// @brief vector with the generic datas511std::vector<GNEGenericData*> genericDatas;512513/// @brief vector with the junctions514std::vector<GNEJunction*> junctions;515516/// @brief vector with the edges517std::vector<GNEEdge*> edges;518519/// @brief vector with the lanes520std::vector<GNELane*> lanes;521522/// @brief vector with the crossings523std::vector<GNECrossing*> crossings;524525/// @brief vector with the walkingAreas526std::vector<GNEWalkingArea*> walkingAreas;527528/// @brief vector with the connections529std::vector<GNEConnection*> connections;530531/// @brief vector with the internal lanes532std::vector<GNEInternalLane*> internalLanes;533534/// @brief vector with the TAZ elements535std::vector<GNETAZ*> TAZs;536537/// @brief vector with the POIs538std::vector<GNEPOI*> POIs;539540/// @brief vector with the polys541std::vector<GNEPoly*> polys;542543/// @brief vector with the edge datas544std::vector<GNEEdgeData*> edgeDatas;545546/// @brief vector with the edge relation datas547std::vector<GNEEdgeRelData*> edgeRelDatas;548549/// @brief vector with the TAZ relation datas550std::vector<GNETAZRelData*> TAZRelDatas;551552private:553/// @brief Invalidated copy constructor.554ViewObjectsContainer(const ViewObjectsContainer&) = delete;555556/// @brief Invalidated assignment operator.557ViewObjectsContainer& operator=(const ViewObjectsContainer&) = delete;558};559560/// @brief pointer to viewNet561const GNEViewNet* myViewNet;562563/// @brief objects container with selected objects564ViewObjectsContainer myViewObjects;565566/// @brief merging junctions567std::vector<const GNEJunction*> myMergingJunctions;568569private:570/// @brief update network elements571void updateNetworkElements(ViewObjectsContainer& container, const GUIGlObject* glObject);572573/// @brief update additional elements574void updateAdditionalElements(ViewObjectsContainer& container, const GUIGlObject* glObject);575576/// @brief update shape elements577void updateShapeElements(ViewObjectsContainer& container, const GUIGlObject* glObject);578579/// @brief update TAZ elements580void updateTAZElements(ViewObjectsContainer& container, const GUIGlObject* glObject);581582/// @brief update demand elements583void updateDemandElements(ViewObjectsContainer& container, const GUIGlObject* glObject);584585/// @brief update generic data elements586void updateGenericDataElements(ViewObjectsContainer& container, const GUIGlObject* glObject);587588/// @brief process GL objects589void processGUIGlObjects(const GUIViewObjectsHandler::GLObjectsSortedContainer& objectsContainer);590591/// @brief default constructor592ViewObjectsSelector();593594/// @brief Invalidated copy constructor.595ViewObjectsSelector(const ViewObjectsSelector&) = delete;596597/// @brief Invalidated assignment operator.598ViewObjectsSelector& operator=(const ViewObjectsSelector&) = delete;599};600601/// @brief class used to group all variables related with mouse buttons and key pressed after certain events602struct MouseButtonKeyPressed {603604/// @brief constructor605MouseButtonKeyPressed();606607/// @brief update status of MouseButtonKeyPressed during current event608void update(void* eventData);609610/// @brief check if SHIFT is pressed during current event611bool shiftKeyPressed() const;612613/// @brief check if CONTROL is pressed during current event614bool controlKeyPressed() const;615616/// @brief check if ALT is pressed during current event617bool altKeyPressed() const;618619/// @brief check if mouse left button is pressed during current event620bool mouseLeftButtonPressed() const;621622/// @brief check if mouse right button is pressed during current event623bool mouseRightButtonPressed() const;624625private:626/// @brief information of event (must be updated)627FXEvent* myEventInfo;628629/// @brief Invalidated copy constructor.630MouseButtonKeyPressed(const MouseButtonKeyPressed&) = delete;631632/// @brief Invalidated assignment operator.633MouseButtonKeyPressed& operator=(const MouseButtonKeyPressed&) = delete;634};635636/// @brief struct used to group all variables related with save elements637struct SaveElements {638639/// @brief default constructor640SaveElements(GNEViewNet* viewNet);641642/// @brief destructor643~SaveElements();644645/// @brief build save buttons646void buildSaveElementsButtons();647648/// @brief enable or disable save individual files649void setSaveIndividualFiles(bool value);650651private:652/// @brief pointer to net653GNEViewNet* myViewNet;654655/// The locator menu656FXPopup* mySaveIndividualFilesPopup = nullptr;657658/// @brief checkable button for save individual files659MFXMenuButtonTooltip* mySaveIndividualFiles = nullptr;660661/// @brief checkable button for save netedit config662MFXButtonTooltip* mySaveNeteditConfig = nullptr;663664/// @brief checkable button for save SUMO config665MFXButtonTooltip* mySaveSumoConfig = nullptr;666667/// @brief checkable button for save network668MFXButtonTooltip* mySaveNetwork = nullptr;669670/// @brief checkable button for save additional elements671MFXButtonTooltip* mySaveAdditionalElements = nullptr;672673/// @brief checkable button for save demand elements674MFXButtonTooltip* mySaveDemandElements = nullptr;675676/// @brief checkable button for save genericdata elements677MFXButtonTooltip* mySaveDataElements = nullptr;678679/// @brief checkable button for save meanData elements680MFXButtonTooltip* mySaveMeanDataElements = nullptr;681682/// @brief Invalidated copy constructor.683SaveElements(const SaveElements&) = delete;684685/// @brief Invalidated assignment operator.686SaveElements& operator=(const SaveElements&) = delete;687};688689/// @brief struct used to group all variables related with time format690struct TimeFormat {691692/// @brief default constructor693TimeFormat(GNEViewNet* viewNet);694695/// @brief build time format buttons696void buildTimeFormatButtons();697698/// @brief switch time format699void switchTimeFormat();700701/// @brief update button label702void updateButtonLabel();703704private:705/// @brief pointer to net706GNEViewNet* myViewNet;707708/// @brief checkable button for switch between timeSteps and HH:MM:SS709MFXButtonTooltip* mySwitchButton = nullptr;710711/// @brief Invalidated copy constructor.712TimeFormat(const TimeFormat&) = delete;713714/// @brief Invalidated assignment operator.715TimeFormat& operator=(const TimeFormat&) = delete;716};717718/// @brief struct used to group all variables related with Supermodes719struct EditModes {720721/// @brief constructor722EditModes(GNEViewNet* viewNet);723724/// @brief destructor725~EditModes();726727/// @brief build checkable buttons728void buildSuperModeButtons();729730/// @brief set supermode731void setSupermode(Supermode supermode, const bool force);732733/// @brief set Network edit mode734void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);735736/// @brief set Demand edit mode737void setDemandEditMode(DemandEditMode demandMode, const bool force = false);738739/// @brief set Data edit mode740void setDataEditMode(DataEditMode dataMode, const bool force = false);741742/// @check if current supermode is Network743bool isCurrentSupermodeNetwork() const;744745/// @check if current supermode is Demand746bool isCurrentSupermodeDemand() const;747748/// @check if current supermode is Data749bool isCurrentSupermodeData() const;750751/// @brief set view752void setView(FXSelector sel);753754/// @brief check if default view is enabled755bool isDefaultView() const;756757/// @brief check if default view is enabled758bool isJuPedSimView() const;759760/// @brief the current supermode761Supermode currentSupermode;762763/// @brief the current Network edit mode764NetworkEditMode networkEditMode;765766/// @brief the current Demand edit mode767DemandEditMode demandEditMode;768769/// @brief the current Data edit mode770DataEditMode dataEditMode;771772/// @brief checkable button for supermode Network773MFXCheckableButton* networkButton = nullptr;774775/// @brief checkable button for supermode Demand776MFXCheckableButton* demandButton = nullptr;777778/// @brief checkable button for supermode Data779MFXCheckableButton* dataButton = nullptr;780781private:782/// @brief pointer to net783GNEViewNet* myViewNet;784785/// @brief The netedit views menu786FXPopup* myNeteditViewsPopup = nullptr;787788/// @brief The netedit views button789MFXMenuButtonTooltip* myNeteditViewsButton = nullptr;790791/// @brief The default view button792MFXButtonTooltip* myDefaultViewButton = nullptr;793794/// @brief The jupedsim view button795MFXButtonTooltip* myJuPedSimViewButton = nullptr;796797/// @brief Invalidated copy constructor.798EditModes(const EditModes&) = delete;799800/// @brief Invalidated assignment operator.801EditModes& operator=(const EditModes&) = delete;802};803804/// @brief struct used to group all variables related to view options in supermode Network805struct NetworkViewOptions {806807/// @brief default constructor808NetworkViewOptions(GNEViewNet* viewNet);809810/// @brief build menu checks811void buildNetworkViewOptionsMenuChecks();812813/// @brief hide all options menu checks814void hideNetworkViewOptionsMenuChecks();815816/// @brief get visible network menu commands817void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;818819/// @brief check if vehicles must be drawn spread820bool drawSpreadVehicles() const;821822/// @brief check if show demand elements checkbox is enabled823bool showDemandElements() const;824825/// @brief check if select edges checkbox is enabled826bool selectEdges() const;827828/// @brief check if select show connections checkbox is enabled829bool showConnections() const;830831/// @brief check if show sub-additionals832bool showSubAdditionals() const;833834/// @brief check if show TAZ Elements835bool showTAZElements() const;836837/// @brief check if we're editing elevation838bool editingElevation() const;839840/// @brief checkable button to show grid button841MFXCheckableButton* menuCheckToggleGrid = nullptr;842843/// @brief checkable button to show junction shapes844MFXCheckableButton* menuCheckToggleDrawJunctionShape = nullptr;845846/// @brief checkable button to draw vehicles in begin position or spread in lane847MFXCheckableButton* menuCheckDrawSpreadVehicles = nullptr;848849/// @brief checkable button to show Demand Elements850MFXCheckableButton* menuCheckShowDemandElements = nullptr;851852/// @brief checkable button to select only edges853MFXCheckableButton* menuCheckSelectEdges = nullptr;854855/// @brief checkable button to show connections856MFXCheckableButton* menuCheckShowConnections = nullptr;857858/// @brief checkable button to hide connections in connect mode859MFXCheckableButton* menuCheckHideConnections = nullptr;860861/// @brief checkable button to show additional sub-elements862MFXCheckableButton* menuCheckShowAdditionalSubElements = nullptr;863864/// @brief checkable button to show TAZ elements865MFXCheckableButton* menuCheckShowTAZElements = nullptr;866867/// @brief checkable button to extend to edge nodes868MFXCheckableButton* menuCheckExtendSelection = nullptr;869870/// @brief checkable button to set change all phases871MFXCheckableButton* menuCheckChangeAllPhases = nullptr;872873/// @brief checkable button to we should't warn about merging junctions874MFXCheckableButton* menuCheckMergeAutomatically = nullptr;875876/// @brief checkable button to show connection as bubble in "Move" mode.877MFXCheckableButton* menuCheckShowJunctionBubble = nullptr;878879/// @brief checkable button to apply movement to elevation880MFXCheckableButton* menuCheckMoveElevation = nullptr;881882/// @brief checkable button to the endpoint for a created edge should be set as the new source883MFXCheckableButton* menuCheckChainEdges = nullptr;884885/// @brief check checkable to create auto create opposite edge886MFXCheckableButton* menuCheckAutoOppositeEdge = nullptr;887888private:889/// @brief pointer to net890GNEViewNet* myViewNet;891892/// @brief Invalidated copy constructor.893NetworkViewOptions(const NetworkViewOptions&) = delete;894895/// @brief Invalidated assignment operator.896NetworkViewOptions& operator=(const NetworkViewOptions&) = delete;897};898899/// @brief struct used to group all variables related to view options in supermode Demand900struct DemandViewOptions {901902/// @brief default constructor903DemandViewOptions(GNEViewNet* viewNet);904905/// @brief build menu checks906void buildDemandViewOptionsMenuChecks();907908/// @brief hide all options menu checks909void hideDemandViewOptionsMenuChecks();910911/// @brief get visible demand menu commands912void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;913914/// @brief check if vehicles must be drawn spread915bool drawSpreadVehicles() const;916917/// @brief check if non inspected element has to be hidden918bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;919920/// @brief check if shapes has to be drawn921bool showShapes() const;922923/// @brief check if trips has to be drawn924bool showAllTrips() const;925926/// @brief check all person plans has to be show927bool showAllPersonPlans() const;928929/// @brief lock person930void lockPerson(const GNEDemandElement* person);931932/// @brief unlock person933void unlockPerson();934935/// @brief get locked person936const GNEDemandElement* getLockedPerson() const;937938/// @brief check all container plans has to be show939bool showAllContainerPlans() const;940941/// @brief lock container942void lockContainer(const GNEDemandElement* container);943944/// @brief unlock container945void unlockContainer();946947/// @brief show overlapped routes948bool showOverlappedRoutes() const;949950/// @brief get locked container951const GNEDemandElement* getLockedContainer() const;952953/// @brief menu check to show grid button954MFXCheckableButton* menuCheckToggleGrid = nullptr;955956/// @brief checkable button to show junction shapes957MFXCheckableButton* menuCheckToggleDrawJunctionShape = nullptr;958959/// @brief menu check to draw vehicles in begin position or spread in lane960MFXCheckableButton* menuCheckDrawSpreadVehicles = nullptr;961962/// @brief Hide shapes (Polygons and POIs)963MFXCheckableButton* menuCheckHideShapes = nullptr;964965/// @brief show all trips966MFXCheckableButton* menuCheckShowAllTrips = nullptr;967968/// @brief show all person plans969MFXCheckableButton* menuCheckShowAllPersonPlans = nullptr;970971/// @brief Lock Person972MFXCheckableButton* menuCheckLockPerson = nullptr;973974/// @brief show all container plans975MFXCheckableButton* menuCheckShowAllContainerPlans = nullptr;976977/// @brief Lock Container978MFXCheckableButton* menuCheckLockContainer = nullptr;979980/// @brief Hide non inspected demand elements981MFXCheckableButton* menuCheckHideNonInspectedDemandElements = nullptr;982983/// @brief show overlapped routes984MFXCheckableButton* menuCheckShowOverlappedRoutes = nullptr;985986private:987/// @brief pointer to net988GNEViewNet* myViewNet;989990/// @brief pointer to locked person991const GNEDemandElement* myLockedPerson = nullptr;992993/// @brief pointer to locked container994const GNEDemandElement* myLockedContainer = nullptr;995996/// @brief Invalidated copy constructor.997DemandViewOptions(const DemandViewOptions&) = delete;998999/// @brief Invalidated assignment operator.1000DemandViewOptions& operator=(const DemandViewOptions&) = delete;1001};10021003/// @brief struct used to group all variables related to view options in supermode Data1004struct DataViewOptions {10051006/// @brief default constructor1007DataViewOptions(GNEViewNet* viewNet);10081009/// @brief build menu checks1010void buildDataViewOptionsMenuChecks();10111012/// @brief hide all options menu checks1013void hideDataViewOptionsMenuChecks();10141015/// @brief get visible demand menu commands1016void getVisibleDataMenuCommands(std::vector<MFXCheckableButton*>& commands) const;10171018/// @brief check if additionals has to be drawn1019bool showAdditionals() const;10201021/// @brief check if shapes has to be drawn1022bool showShapes() const;10231024/// @brief check if show demand elements checkbox is enabled1025bool showDemandElements() const;10261027/// @brief check if toggle TAZRel drawing checkbox is enabled1028bool TAZRelDrawing() const;10291030/// @brief check if toggle TAZ draw fill checkbox is enabled1031bool TAZDrawFill() const;10321033/// @brief check if toggle TAZRel only from checkbox is enabled1034bool TAZRelOnlyFrom() const;10351036/// @brief check if toggle TAZRel only to checkbox is enabled1037bool TAZRelOnlyTo() const;10381039/// @brief checkable button to show junction shapes1040MFXCheckableButton* menuCheckToggleDrawJunctionShape = nullptr;10411042/// @brief menu check to show Additionals1043MFXCheckableButton* menuCheckShowAdditionals = nullptr;10441045/// @brief menu check to show Shapes1046MFXCheckableButton* menuCheckShowShapes = nullptr;10471048/// @brief menu check to show Demand Elements1049MFXCheckableButton* menuCheckShowDemandElements = nullptr;10501051/// @brief menu check to toggle TAZ Rel drawing1052MFXCheckableButton* menuCheckToggleTAZRelDrawing = nullptr;10531054/// @brief menu check to toggle TAZ draw fill1055MFXCheckableButton* menuCheckToggleTAZDrawFill = nullptr;10561057/// @brief menu check to toggle TAZRel only from1058MFXCheckableButton* menuCheckToggleTAZRelOnlyFrom = nullptr;10591060/// @brief menu check to toggle TAZRel only to1061MFXCheckableButton* menuCheckToggleTAZRelOnlyTo = nullptr;10621063private:1064/// @brief pointer to net1065GNEViewNet* myViewNet;10661067/// @brief Invalidated copy constructor.1068DataViewOptions(const DataViewOptions&) = delete;10691070/// @brief Invalidated assignment operator.1071DataViewOptions& operator=(const DataViewOptions&) = delete;1072};10731074/// @brief class used to group all variables related to interval bar1075class IntervalBar {10761077public:1078/// @brief default constructor1079IntervalBar(GNEViewNet* viewNet);10801081/// @brief build interval bar elements1082void buildIntervalBarElements();10831084/// @brief show interval option bar1085void showIntervalBar();10861087/// @brief hide all options menu checks1088void hideIntervalBar();10891090/// @brief update interval bar1091void updateIntervalBar();10921093// @brief mark for update1094void markForUpdate();10951096/// @name get functions (called by GNEViewNet)1097/// @{10981099/// @brief get generic data type1100SumoXMLTag getGenericDataType() const;11011102/// @brief get dataSet1103GNEDataSet* getDataSet() const;11041105/// @brief get begin1106double getBegin() const;11071108/// @brief get end1109double getEnd() const;11101111/// @brief get parameter1112std::string getParameter() const;11131114/// @}11151116/// @name set functions (called by GNEViewNet)1117/// @{11181119/// @brief set generic data type1120void setGenericDataType();11211122/// @brief set dataSet1123void setDataSet();11241125/// @brief update limit by interval1126void setInterval();11271128/// @brief set begin1129void setBegin();11301131/// @brief set end1132void setEnd();11331134/// @brief set parameter1135void setParameter();11361137/// @}11381139protected:1140/// @brief enable interval bar1141void enableIntervalBar();11421143/// @brief disable interval bar1144void disableIntervalBar();11451146private:1147/// @brief pointer to net1148GNEViewNet* myViewNet;11491150/// @brief flag for update interval bar1151bool myUpdateInterval = true;11521153/// @brief combo box for generic data types1154MFXComboBoxIcon* myGenericDataTypesComboBox = nullptr;11551156/// @brief combo box for data sets1157MFXComboBoxIcon* myDataSetsComboBox = nullptr;11581159/// @brief checkbox for limit data elements by interval1160FXCheckButton* myIntervalCheckBox = nullptr;11611162/// @brief text field for interval begin1163FXTextField* myBeginTextField = nullptr;11641165/// @brief text field for interval end1166FXTextField* myEndTextField = nullptr;11671168/// @brief combo box for filtered parameters1169MFXComboBoxIcon* myParametersComboBox = nullptr;11701171/// @brief current dataSets1172std::vector<std::string> myDataSets;11731174/// @brief current parameters1175std::set<std::string> myParameters;11761177/// @brief Invalidated copy constructor.1178IntervalBar(const IntervalBar&) = delete;11791180/// @brief Invalidated assignment operator.1181IntervalBar& operator=(const IntervalBar&) = delete;1182};11831184/// @brief struct used to group all variables related with movement of single elements1185struct MoveSingleElementModul {11861187/// @brief constructor1188MoveSingleElementModul(GNEViewNet* viewNet);11891190/// @brief begin move network elementshape1191bool beginMoveNetworkElementShape();11921193/// @brief begin move single element in Network mode1194bool beginMoveSingleElementNetworkMode();11951196/// @brief begin move single element in Demand mode1197bool beginMoveSingleElementDemandMode();11981199/// @brief move single element in Network AND Demand mode1200void moveSingleElement(const bool mouseLeftButtonPressed);12011202/// @brief finish moving single elements in Network AND Demand mode1203void finishMoveSingleElement();12041205/// @brief check if there are moving elements1206bool isCurrentlyMovingSingleElement() const;12071208/// @brief get moved element1209GNEMoveElement* getMovedElement() const;12101211protected:1212/// @brief calculate offset1213const GNEMoveOffset calculateMoveOffset() const;12141215private:1216/// @brief pointer to net1217GNEViewNet* myViewNet;12181219/// @brief relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user doesn't click exactly over the center of element)1220Position myRelativeClickedPosition;12211222/// @brief move operations1223GNEMoveOperation* myMoveOperation = nullptr;12241225/// @brief Invalidated copy constructor.1226MoveSingleElementModul(const MoveSingleElementModul&) = delete;12271228/// @brief Invalidated assignment operator.1229MoveSingleElementModul& operator=(const MoveSingleElementModul&) = delete;1230};12311232/// @brief struct used to group all variables related with movement of groups of elements1233struct MoveMultipleElementModul {12341235/// @brief constructor1236MoveMultipleElementModul(GNEViewNet* viewNet);12371238/// @brief begin move selection1239void beginMoveSelection();12401241/// @brief move selection1242void moveSelection(const bool mouseLeftButtonPressed);12431244/// @brief finish moving selection1245void finishMoveSelection();12461247/// @brief check if currently there is element being moved1248bool isMovingSelection() const;12491250/// @brief flag for moving edge1251bool isMovingSelectedEdge() const;12521253/// @brief reset flag for moving edge1254void resetMovingSelectedEdge();12551256/// @brief edge offset1257double getEdgeOffset() const;12581259/// @brief check if there are moving elements1260bool isCurrentlyMovingMultipleElements() const;12611262protected:1263/// @brief calculate move offset1264const GNEMoveOffset calculateMoveOffset() const;12651266/// @brief calculate junction selection1267void calculateJunctionSelection();12681269/// @brief calculate edge selection1270void calculateEdgeSelection(const GNEEdge* clickedEdge);12711272private:1273/// @brief pointer to net1274GNEViewNet* myViewNet;12751276/// @brief original clicked position when moveSelection is called (used for calculate offset during moveSelection())1277Position myClickedPosition;12781279/// @brief flag for enable moving edge1280bool myMovingSelectedEdge;12811282/// @brief offset of moved edge1283double myEdgeOffset;12841285/// @brief move operations1286std::vector<GNEMoveOperation*> myMoveOperations;12871288/// @brief Invalidated copy constructor.1289MoveMultipleElementModul(const MoveMultipleElementModul&) = delete;12901291/// @brief Invalidated assignment operator.1292MoveMultipleElementModul& operator=(const MoveMultipleElementModul&) = delete;1293};12941295/// @brief struct used to group all variables related with movement of groups of elements1296struct VehicleOptions {12971298/// @brief constructor1299VehicleOptions(GNEViewNet* viewNet);13001301/// @brief build menu checks1302void buildVehicleOptionsMenuChecks();13031304/// @brief hide all options menu checks1305void hideVehicleOptionsMenuChecks();13061307private:1308/// @brief pointer to net1309GNEViewNet* myViewNet;13101311/// @brief Invalidated copy constructor.1312VehicleOptions(const VehicleOptions&) = delete;13131314/// @brief Invalidated assignment operator.1315VehicleOptions& operator=(const VehicleOptions&) = delete;1316};13171318/// @brief struct used to group all variables related with movement of groups of elements1319struct VehicleTypeOptions {13201321/// @brief constructor1322VehicleTypeOptions(GNEViewNet* viewNet);13231324/// @brief build menu checks1325void buildVehicleTypeOptionsMenuChecks();13261327/// @brief hide all options menu checks1328void hideVehicleTypeOptionsMenuChecks();13291330private:1331/// @brief pointer to net1332GNEViewNet* myViewNet;13331334/// @brief Invalidated copy constructor.1335VehicleTypeOptions(const VehicleTypeOptions&) = delete;13361337/// @brief Invalidated assignment operator.1338VehicleTypeOptions& operator=(const VehicleTypeOptions&) = delete;1339};13401341/// @brief struct used to group all variables related with selecting using a square or polygon1342/// @note in the future the variables used for selecting through a polygon will be placed here1343struct SelectingArea {13441345/// @brief default constructor1346SelectingArea(GNEViewNet* viewNet);13471348/// @brief begin rectangle selection1349void beginRectangleSelection();13501351/// @brief move rectangle selection1352void moveRectangleSelection();13531354/// @brief finish rectangle selection1355void finishRectangleSelection();13561357/// @brief process rectangle Selection1358void processRectangleSelection();13591360/// @brief process rectangle Selection (only limited to Edges)1361std::vector<GNEEdge*> processEdgeRectangleSelection();13621363/// @brief draw rectangle selection1364void drawRectangleSelection(const RGBColor& color) const;13651366/// @brief whether we have started rectangle-selection1367bool selectingUsingRectangle;13681369/// @brief whether we have started rectangle-selection1370bool startDrawing;13711372private:1373/// @brief Process boundary Selection1374void processBoundarySelection(const Boundary& boundary);13751376/// @brief first corner of the rectangle-selection1377Position selectionCorner1;13781379/// @brief second corner of the rectangle-selection1380Position selectionCorner2;13811382/// @brief pointer to net1383GNEViewNet* myViewNet;13841385/// @brief Invalidated copy constructor.1386SelectingArea(const SelectingArea&) = delete;13871388/// @brief Invalidated assignment operator.1389SelectingArea& operator=(const SelectingArea&) = delete;1390};13911392/// @brief struct used to group all variables related with testing1393struct TestingMode {13941395/// @brief default constructor1396TestingMode(GNEViewNet* viewNet);13971398/// @brief init testing mode1399void initTestingMode();14001401/// @brief draw testing element1402void drawTestingElements(GUIMainWindow* mainWindow);14031404private:1405/// @brief pointer to net1406GNEViewNet* myViewNet;14071408/// @brief Width of net in testing mode1409int myTestingWidth = 0;14101411/// @brief Height of net in testing mode1412int myTestingHeight = 0;14131414/// @brief Invalidated copy constructor.1415TestingMode(const TestingMode&) = delete;14161417/// @brief Invalidated assignment operator.1418TestingMode& operator=(const TestingMode&) = delete;1419};14201421/// @brief struct used to group all variables related with common checkable Buttons1422struct CommonCheckableButtons {14231424/// @brief default constructor1425CommonCheckableButtons(GNEViewNet* viewNet);14261427/// @brief build checkable buttons1428void buildCommonCheckableButtons();14291430/// @brief show all Common Checkable Buttons1431void showCommonCheckableButtons();14321433/// @brief hide all Common Checkable Buttons1434void hideCommonCheckableButtons();14351436/// @brief hide all options menu checks1437void disableCommonCheckableButtons();14381439/// @brief update Common checkable buttons1440void updateCommonCheckableButtons();14411442/// @brief checkable button for edit mode inspect1443MFXCheckableButton* inspectButton = nullptr;14441445/// @brief checkable button for edit mode delete1446MFXCheckableButton* deleteButton = nullptr;14471448/// @brief checkable button for edit mode select1449MFXCheckableButton* selectButton = nullptr;14501451private:1452/// @brief pointer to net1453GNEViewNet* myViewNet;14541455/// @brief Invalidated copy constructor.1456CommonCheckableButtons(const CommonCheckableButtons&) = delete;14571458/// @brief Invalidated assignment operator.1459CommonCheckableButtons& operator=(const CommonCheckableButtons&) = delete;1460};14611462/// @brief struct used to group all variables related with Network checkable Buttons1463struct NetworkCheckableButtons {14641465/// @brief default constructor1466NetworkCheckableButtons(GNEViewNet* viewNet);14671468/// @brief build checkable buttons1469void buildNetworkCheckableButtons();14701471/// @brief show all Network Checkable Buttons1472void showNetworkCheckableButtons();14731474/// @brief hide all Network Checkable Buttons1475void hideNetworkCheckableButtons();14761477/// @brief hide all options menu checks1478void disableNetworkCheckableButtons();14791480/// @brief update network checkable buttons1481void updateNetworkCheckableButtons();14821483/// @brief checkable button for edit mode "move network elements"1484MFXCheckableButton* moveNetworkElementsButton = nullptr;14851486/// @brief checkable button for edit mode create edge1487MFXCheckableButton* createEdgeButton = nullptr;14881489/// @brief checkable button for edit mode connection1490MFXCheckableButton* connectionButton = nullptr;14911492/// @brief checkable button for edit mode traffic light1493MFXCheckableButton* trafficLightButton = nullptr;14941495/// @brief checkable button for edit mode additional1496MFXCheckableButton* additionalButton = nullptr;14971498/// @brief checkable button for edit mode crossing1499MFXCheckableButton* crossingButton = nullptr;15001501/// @brief checkable button for edit mode TAZ1502MFXCheckableButton* TAZButton = nullptr;15031504/// @brief checkable button for edit mode shape1505MFXCheckableButton* shapeButton = nullptr;15061507/// @brief checkable button for edit mode prohibition1508MFXCheckableButton* prohibitionButton = nullptr;15091510/// @brief checkable button for edit mode wires1511MFXCheckableButton* wireButton = nullptr;15121513/// @brief checkable button for edit mode decals1514MFXCheckableButton* decalButton = nullptr;15151516private:1517/// @brief pointer to net1518GNEViewNet* myViewNet;15191520/// @brief Invalidated copy constructor.1521NetworkCheckableButtons(const NetworkCheckableButtons&) = delete;15221523/// @brief Invalidated assignment operator.1524NetworkCheckableButtons& operator=(const NetworkCheckableButtons&) = delete;1525};15261527/// @brief struct used to group all variables related with Demand checkable Buttons1528struct DemandCheckableButtons {15291530/// @brief default constructor1531DemandCheckableButtons(GNEViewNet* viewNet);15321533/// @brief build checkable buttons1534void buildDemandCheckableButtons();15351536/// @brief show all Demand Checkable Buttons1537void showDemandCheckableButtons();15381539/// @brief hide all Demand Checkable Buttons1540void hideDemandCheckableButtons();15411542/// @brief hide all options menu checks1543void disableDemandCheckableButtons();15441545/// @brief update Demand checkable buttons1546void updateDemandCheckableButtons();15471548/// @brief checkable button for edit mode "move demand elements"1549MFXCheckableButton* moveDemandElementsButton = nullptr;15501551/// @brief checkable button for edit mode create routes1552MFXCheckableButton* routeButton = nullptr;15531554/// @brief checkable button for edit mode create route distributions1555MFXCheckableButton* routeDistributionButton = nullptr;15561557/// @brief checkable button for edit mode create vehicles1558MFXCheckableButton* vehicleButton = nullptr;15591560/// @brief checkable button for edit mode create type1561MFXCheckableButton* typeButton = nullptr;15621563/// @brief checkable button for edit mode create type distribution1564MFXCheckableButton* typeDistributionButton = nullptr;15651566/// @brief checkable button for edit mode create stops1567MFXCheckableButton* stopButton = nullptr;15681569/// @brief checkable button for edit mode create persons1570MFXCheckableButton* personButton = nullptr;15711572/// @brief checkable button for edit mode create person plans1573MFXCheckableButton* personPlanButton = nullptr;15741575/// @brief checkable button for edit mode create containers1576MFXCheckableButton* containerButton = nullptr;15771578/// @brief checkable button for edit mode create container plans1579MFXCheckableButton* containerPlanButton = nullptr;15801581private:1582/// @brief pointer to net1583GNEViewNet* myViewNet;15841585/// @brief Invalidated copy constructor.1586DemandCheckableButtons(const DemandCheckableButtons&) = delete;15871588/// @brief Invalidated assignment operator.1589DemandCheckableButtons& operator=(const DemandCheckableButtons&) = delete;1590};15911592/// @brief struct used to group all variables related with Data checkable Buttons1593struct DataCheckableButtons {15941595/// @brief default constructor1596DataCheckableButtons(GNEViewNet* viewNet);15971598/// @brief build checkable buttons1599void buildDataCheckableButtons();16001601/// @brief show all Data Checkable Buttons1602void showDataCheckableButtons();16031604/// @brief hide all Data Checkable Buttons1605void hideDataCheckableButtons();16061607/// @brief hide all options menu checks1608void disableDataCheckableButtons();16091610/// @brief update Data checkable buttons1611void updateDataCheckableButtons();16121613/// @brief checkable button for edit mode "edgeData"1614MFXCheckableButton* edgeDataButton = nullptr;16151616/// @brief checkable button for edit mode "edgeRelData"1617MFXCheckableButton* edgeRelDataButton = nullptr;16181619/// @brief checkable button for edit mode "TAZRelData"1620MFXCheckableButton* TAZRelDataButton = nullptr;16211622/// @brief checkable button for edit mode "meanData"1623MFXCheckableButton* meanDataButton = nullptr;16241625private:1626/// @brief pointer to net1627GNEViewNet* myViewNet;16281629/// @brief Invalidated copy constructor.1630DataCheckableButtons(const DataCheckableButtons&) = delete;16311632/// @brief Invalidated assignment operator.1633DataCheckableButtons& operator=(const DataCheckableButtons&) = delete;1634};16351636/// @brief struct used to group all variables related with edit shapes of NetworkElements1637struct EditNetworkElementShapes {16381639/// @brief default constructor1640EditNetworkElementShapes(GNEViewNet* viewNet);16411642/// @brief start edit custom shape1643void startEditCustomShape(GNENetworkElement* element);16441645/// @brief edit edit shape1646void stopEditCustomShape();16471648/// @brief save edited shape1649void commitShapeEdited();16501651/// @brief pointer to edited network element1652GNENetworkElement* getEditedNetworkElement() const;16531654private:1655/// @brief pointer to viewNet1656GNEViewNet* myViewNet;16571658/// @brief pointer to edited network element1659GNENetworkElement* myEditedNetworkElement = nullptr;16601661/// @brief the previous edit mode before edit NetworkElement's shapes1662NetworkEditMode myPreviousNetworkEditMode;16631664/// @brief Invalidated copy constructor.1665EditNetworkElementShapes(const EditNetworkElementShapes&) = delete;16661667/// @brief Invalidated assignment operator.1668EditNetworkElementShapes& operator=(const EditNetworkElementShapes&) = delete;1669};16701671/// @brief struct for pack all variables and functions related with Block Icon1672struct LockIcon {1673/// @brief draw lock icon1674static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier* AC, GUIGlObjectType type, const Position position,1675const double exaggeration, const double size = 0.5,1676const double offsetx = 0, const double offsety = 0);16771678/// @brief check if icon can be drawn1679static bool checkDrawing(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier* AC,1680GUIGlObjectType type, const double exaggeration);1681private:1682/// @brief constructor1683LockIcon();16841685/// @brief Invalidated copy constructor.1686LockIcon(const LockIcon&) = delete;16871688/// @brief Invalidated assignment operator.1689LockIcon& operator=(const LockIcon&) = delete;1690};16911692/// @brief get scaled rainbow colors1693static const std::vector<RGBColor>& getRainbowScaledColors();16941695/// @brief get rainbow scaled color1696static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);16971698/// @brief filter elements based on the layer1699static std::vector<GUIGlObject*> filterElementsByLayer(const std::vector<GUIGlObject*>& GLObjects);17001701private:1702/// @brief scale (rainbow) colors1703static std::vector<RGBColor> myRainbowScaledColors;1704};170517061707