Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEComboBoxAttrProperty.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2006-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// ComboBox icon specific for attr properties
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <vector>
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
40 GNEComboBoxAttrProperty(FXComposite* p, MFXStaticToolTip* staticToolTip, const bool canSearch, const int visibleItems,
41 FXObject* tgt, FXSelector sel, FXuint opts, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0,
42 FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);
43
46
48 FXint appendAttrItem(const GNEAttributeProperties* attrProperties, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr);
49
51 const GNEAttributeProperties* getAttrProperties(FXint index) const;
52
55
57 long setCurrentItem(const GNEAttributeProperties* attrProperties, FXbool notify = FALSE);
58
60 bool hasAttrProperty(const GNEAttributeProperties* attrProperties);
61
63 void clearItems();
64
65private:
67 std::vector<const GNEAttributeProperties*> myAttrProperties;
68
70 FXint updateIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;
71
73 FXint insertIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;
74
76 FXint appendIconItem(const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;
77
80
83};
void clearItems()
Remove all items from the list.
FXint appendAttrItem(const GNEAttributeProperties *attrProperties, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append item
const GNEAttributeProperties * getAttrProperties(FXint index) const
get attribute properties
std::vector< const GNEAttributeProperties * > myAttrProperties
vector with tag properties
GNEComboBoxAttrProperty & operator=(const GNEComboBoxAttrProperty &)=delete
invalidate assignment operator
const GNEAttributeProperties * getCurrentAttrProperty() const
get current attribute property
bool hasAttrProperty(const GNEAttributeProperties *attrProperties)
check if the given attribute exist in comboBox
long setCurrentItem(const GNEAttributeProperties *attrProperties, FXbool notify=FALSE)
Set the current item.
FXint insertIconItem(FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)=delete
delete original insert icon item in the given position
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)=delete
delete original append icon item in the last position
GNEComboBoxAttrProperty(const GNEComboBoxAttrProperty &)=delete
invalidate copy constructor
FXint updateIconItem(FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)=delete
delete original replace the item at index
MFXStaticToolTip (based on FXToolTip)