Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEComboBoxTagProperty.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-2026 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 tag properties
19/****************************************************************************/
20#pragma once
21#include <config.h>
22#include <vector>
23
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
40 GNEComboBoxTagProperty(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 appendTagItem(const GNETagProperties* tagProperties, FXColor bgColor = FXRGB(255, 255, 255), void* ptr = nullptr);
49
51 const GNETagProperties* getTagProperties(FXint index) const;
52
55
57 bool hasTagProperty(const GNETagProperties* tagProperties) const;
58
60 long setCurrentItem(const GNETagProperties* tagProperties, FXbool notify = FALSE);
61
63 void clearItems();
64
65private:
67 std::vector<const GNETagProperties*> myTagProperties;
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};
GNEComboBoxTagProperty(const GNEComboBoxTagProperty &)=delete
invalidate copy constructor
void clearItems()
Remove all items from the list.
GNEComboBoxTagProperty & operator=(const GNEComboBoxTagProperty &)=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
const GNETagProperties * getTagProperties(FXint index) const
get tag properties
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
FXint appendTagItem(const GNETagProperties *tagProperties, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append item
GNEComboBoxTagProperty(FXComposite *p, MFXStaticToolTip *staticToolTip, const bool canSearch, const int visibleItems, FXObject *tgt, FXSelector sel, FXuint opts, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
Construct a Combo Box widget with room to display cols columns of text.
const GNETagProperties * getCurrentTagProperty() const
get current tag property
long setCurrentItem(const GNETagProperties *tagProperties, 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
bool hasTagProperty(const GNETagProperties *tagProperties) const
check if the comboBox has the given tag property
std::vector< const GNETagProperties * > myTagProperties
vector with tag properties
MFXComboBoxIcon(FXComposite *p, MFXStaticToolTip *staticToolTip, const bool canSearch, const int visibleItems, FXObject *tgt, FXSelector sel, FXuint opts, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
Construct a Combo Box widget with room to display cols columns of text.
MFXStaticToolTip (based on FXToolTip).