Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MFXComboBoxAttrProperty.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 "MFXComboBoxIcon.h"
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
34
36
37public:
38
40 MFXComboBoxAttrProperty(FXComposite* p, FXint cols, const bool canSearch,
41 const int visibleItems, FXObject* tgt, FXSelector sel = 0, FXuint opts = COMBOBOX_NORMAL,
42 FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0,
43 FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);
44
47
49 FXint appendAttrItem(const GNEAttributeProperties* attrProperties, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr);
50
52 const GNEAttributeProperties* getAttrProperties(FXint index) const;
53
56
58 long setCurrentItem(const GNEAttributeProperties* attrProperties, FXbool notify = FALSE);
59
61 bool hasAttrProperty(const GNEAttributeProperties* attrProperties);
62
64 void clearItems();
65
66private:
68 std::vector<const GNEAttributeProperties*> myAttrProperties;
69
71 FXint updateIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;
72
74 FXint insertIconItem(FXint index, const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;
75
77 FXint appendIconItem(const FXString& text, FXIcon* icon = nullptr, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr) = delete;
78
81
84};
void clearItems()
Remove all items from the list.
std::vector< const GNEAttributeProperties * > myAttrProperties
vector with tag properties
MFXComboBoxAttrProperty(const MFXComboBoxAttrProperty &)=delete
invalidate copy constructor
MFXComboBoxAttrProperty & operator=(const MFXComboBoxAttrProperty &)=delete
invalidate assignment operator
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
bool hasAttrProperty(const GNEAttributeProperties *attrProperties)
check if the given attribute exist in comboBox
FXint appendAttrItem(const GNEAttributeProperties *attrProperties, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append item
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
long setCurrentItem(const GNEAttributeProperties *attrProperties, FXbool notify=FALSE)
Set the current item.
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
const GNEAttributeProperties * getCurrentAttrProperty() const
get current attribute property
const GNEAttributeProperties * getAttrProperties(FXint index) const
get attribute properties