/****************************************************************************/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 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 <netedit/frames/common/GNEGroupBoxModule.h>2425// ===========================================================================26// class declaration27// ===========================================================================2829class GNEFrame;3031// ===========================================================================32// class definitions33// ===========================================================================3435class GNEDemandElementSelector : public GNEGroupBoxModule {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,45const std::vector<SumoXMLTag> exceptions = {});4647/// @brief destructor48~GNEDemandElementSelector();4950/// @brief get current demand element51GNEDemandElement* getCurrentDemandElement() const;5253// @brief obtain allowed tags (derived from tagTypes)54const std::vector<SumoXMLTag>& getAllowedTags() const;5556/// @brief set current demand element57void setDemandElement(GNEDemandElement* demandElement);5859/// @brief set multiple demand elements to filter60void setDemandElements(const std::vector<GNEDemandElement*>& demandElements);6162/// @brief show demand element selector63void showDemandElementSelector();6465/// @brief hide demand element selector66void hideDemandElementSelector();6768/// @brief check if demand element selector is shown69bool isDemandElementSelectorShown() const;7071/// @brief refresh demand element selector72void refreshDemandElementSelector();7374/// @brief get previous plan element75GNEDemandElement* getPreviousPlanElement() const;7677/// @name FOX-callbacks78/// @{79/// @brief Called when the user select another demand elementelement in ComboBox80long onCmdSelectDemandElement(FXObject*, FXSelector, void*);81/// @}8283protected:84/// @brief FOX need this85FOX_CONSTRUCTOR(GNEDemandElementSelector)8687private:88/// @brief pointer to frame Parent89GNEFrame* myFrameParent;9091/// @brief comboBox with the list of elements type92MFXComboBoxIcon* myDemandElementsComboBox;9394/// @brief current demand element95GNEDemandElement* myCurrentDemandElement;9697/// @brief demand element tags98std::vector<SumoXMLTag> myDemandElementTags;99100/// @brief tag type (person, container or vehicle)101GNETagProperties::Type myTagType;102103/// @brief flag for enable/disable multiple element selection104bool mySelectingMultipleElements;105};106107108