Path: blob/main/src/netedit/frames/GNEViewObjectSelector.h
169678 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNEViewObjectSelector.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202216///17// NetworkElement selector module18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/MFXGroupBoxModule.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEAttributeCarrier;29class GNEFrame;30class GNETagProperties;3132// ===========================================================================33// class definitions34// ===========================================================================3536class GNEViewObjectSelector : protected MFXGroupBoxModule {37/// @brief FOX-declaration38FXDECLARE(GNEViewObjectSelector)3940public:41/// @brief constructor42GNEViewObjectSelector(GNEFrame* frameParent);4344/// @brief destructor45~GNEViewObjectSelector();4647/// @brief get tag with selected element type48SumoXMLTag getTag() const;4950/// @brief check if the given AC is selected51bool isNetworkElementSelected(const GNEAttributeCarrier* AC) const;5253/// @brief show GNEViewObjectSelector Module54void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute);5556/// @brief hide GNEViewObjectSelector Module57void hideNetworkElementsSelector();5859/// @brief toggle selected element60bool toggleSelectedElement(const GNEAttributeCarrier* AC);6162/// @brief toggle selected lane63bool toggleSelectedLane(const GNELane* lane);6465/// @brief clear selection66void clearSelection();6768/// @brie fill SUMO base object69bool fillSumoBaseObject(CommonXMLStructure::SumoBaseObject* baseObject) const;7071/// @name FOX-callbacks72/// @{73/// @brief called when user pres button use selected edges74long onCmdUseSelectedElements(FXObject*, FXSelector, void*);7576/// @brief called when clear selection button is pressed77long onCmdClearSelection(FXObject*, FXSelector, void*);78/// @}7980protected:81/// @brief FOX need this82GNEViewObjectSelector();8384private:85/// @brief pointer to frame parent86GNEFrame* myFrameParent;8788/// @brief button for use selected edges89FXButton* myUseSelected = nullptr;9091/// @brief List of GNEViewObjectSelector92FXList* myList = nullptr;9394/// @brief info label95FXLabel* myLabel = nullptr;9697/// @brief button for clear selection98FXButton* myClearSelection = nullptr;99100/// @brief selected ACs101std::vector<const GNEAttributeCarrier*> mySelectedACs;102103/// @brief network element type104SumoXMLTag myTag = SUMO_TAG_NOTHING;105106/// @brief attribute vinculated107SumoXMLAttr myAttribute = SUMO_ATTR_NOTHING;108};109110111