Path: blob/main/src/utils/foxtools/MFXComboBoxAttrProperty.h
169678 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 MFXComboBoxAttrProperty.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202516///17// ComboBox icon specific for attr properties18/****************************************************************************/19#pragma once20#include <config.h>2122#include "MFXComboBoxIcon.h"2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEAttributeProperties;2930// ===========================================================================31// class definitions32// ===========================================================================3334class MFXComboBoxAttrProperty : public MFXComboBoxIcon {3536public:37/// @brief Construct a Combo Box widget with room to display cols columns of text38MFXComboBoxAttrProperty(FXComposite* p, MFXStaticToolTip* staticToolTip, const bool canSearch, const int visibleItems,39FXObject* tgt, FXSelector sel, FXuint opts, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0,40FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);4142/// @brief Destructor43~MFXComboBoxAttrProperty();4445/// @brief append item46FXint appendAttrItem(const GNEAttributeProperties* attrProperties, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr);4748/// @brief get attribute properties49const GNEAttributeProperties* getAttrProperties(FXint index) const;5051/// @brief get current attribute property52const GNEAttributeProperties* getCurrentAttrProperty() const;5354/// @brief Set the current item55long setCurrentItem(const GNEAttributeProperties* attrProperties, FXbool notify = FALSE);5657/// @brief check if the given attribute exist in comboBox58bool hasAttrProperty(const GNEAttributeProperties* attrProperties);5960/// @brief Remove all items from the list61void clearItems();6263private:64/// @brief vector with tag properties65std::vector<const GNEAttributeProperties*> myAttrProperties;6667/// @brief delete original replace the item at index68FXint updateIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;6970/// @brief delete original insert icon item in the given position71FXint insertIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;7273/// @brief delete original append icon item in the last position74FXint appendIconItem(const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;7576/// @brief invalidate copy constructor77MFXComboBoxAttrProperty(const MFXComboBoxAttrProperty&) = delete;7879/// @brief invalidate assignment operator80MFXComboBoxAttrProperty& operator=(const MFXComboBoxAttrProperty&) = delete;81};828384