Path: blob/main/src/netedit/frames/common/GNEComboBoxAttrProperty.h
185790 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2006-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 GNEComboBoxAttrProperty.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202516///17// ComboBox icon specific for attr properties18/****************************************************************************/19#pragma once20#include <config.h>2122#include <vector>23#include <utils/foxtools/MFXComboBoxIcon.h>2425// ===========================================================================26// class declaration27// ===========================================================================2829class GNEAttributeProperties;3031// ===========================================================================32// class definitions33// ===========================================================================3435class GNEComboBoxAttrProperty : public MFXComboBoxIcon {3637public:38/// @brief Construct a Combo Box widget with room to display cols columns of text39GNEComboBoxAttrProperty(FXComposite* p, MFXStaticToolTip* staticToolTip, const bool canSearch, const int visibleItems,40FXObject* tgt, FXSelector sel, FXuint opts, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0,41FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);4243/// @brief Destructor44~GNEComboBoxAttrProperty();4546/// @brief append item47FXint appendAttrItem(const GNEAttributeProperties* attrProperties, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr);4849/// @brief get attribute properties50const GNEAttributeProperties* getAttrProperties(FXint index) const;5152/// @brief get current attribute property53const GNEAttributeProperties* getCurrentAttrProperty() const;5455/// @brief Set the current item56long setCurrentItem(const GNEAttributeProperties* attrProperties, FXbool notify = FALSE);5758/// @brief check if the given attribute exist in comboBox59bool hasAttrProperty(const GNEAttributeProperties* attrProperties);6061/// @brief Remove all items from the list62void clearItems();6364private:65/// @brief vector with tag properties66std::vector<const GNEAttributeProperties*> myAttrProperties;6768/// @brief delete original replace the item at index69FXint updateIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;7071/// @brief delete original insert icon item in the given position72FXint insertIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;7374/// @brief delete original append icon item in the last position75FXint appendIconItem(const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;7677/// @brief invalidate copy constructor78GNEComboBoxAttrProperty(const GNEComboBoxAttrProperty&) = delete;7980/// @brief invalidate assignment operator81GNEComboBoxAttrProperty& operator=(const GNEComboBoxAttrProperty&) = delete;82};838485