/****************************************************************************/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 GNEDemandSelector.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202216///17// Frame for select demand elements18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/GNETagProperties.h>23#include <utils/foxtools/MFXGroupBoxModule.h>2425// ===========================================================================26// class declaration27// ===========================================================================2829class GNEFrame;3031// ===========================================================================32// class definitions33// ===========================================================================3435class GNEDemandElementSelector : public MFXGroupBoxModule {36/// @brief FOX-declaration37FXDECLARE(GNEDemandElementSelector)3839public:40/// @brief constructor with a single tag41GNEDemandElementSelector(GNEFrame* frameParent, SumoXMLTag demandElementTag, const GNETagProperties::Type tagType);4243/// @brief constructor with tag type44GNEDemandElementSelector(GNEFrame* frameParent, const std::vector<GNETagProperties::Type>& tagTypes);4546/// @brief destructor47~GNEDemandElementSelector();4849/// @brief get current demand element50GNEDemandElement* getCurrentDemandElement() const;5152// @brief obtain allowed tags (derived from tagTypes)53const std::vector<SumoXMLTag>& getAllowedTags() const;5455/// @brief set current demand element56void setDemandElement(GNEDemandElement* demandElement);5758/// @brief set multiple demand elements to filter59void setDemandElements(const std::vector<GNEDemandElement*>& demandElements);6061/// @brief show demand element selector62void showDemandElementSelector();6364/// @brief hide demand element selector65void hideDemandElementSelector();6667/// @brief check if demand element selector is shown68bool isDemandElementSelectorShown() const;6970/// @brief refresh demand element selector71void refreshDemandElementSelector();7273/// @brief get previous plan element74GNEDemandElement* getPreviousPlanElement() const;7576/// @name FOX-callbacks77/// @{78/// @brief Called when the user select another demand elementelement in ComboBox79long onCmdSelectDemandElement(FXObject*, FXSelector, void*);80/// @}8182protected:83/// @brief FOX need this84FOX_CONSTRUCTOR(GNEDemandElementSelector)8586private:87/// @brief pointer to frame Parent88GNEFrame* myFrameParent;8990/// @brief comboBox with the list of elements type91MFXComboBoxIcon* myDemandElementsComboBox;9293/// @brief current demand element94GNEDemandElement* myCurrentDemandElement;9596/// @brief demand element tags97std::vector<SumoXMLTag> myDemandElementTags;9899/// @brief tag type (person, container or vehicle)100GNETagProperties::Type myTagType;101102/// @brief flag for enable/disable multiple element selection103bool mySelectingMultipleElements;104};105106107