Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNETagSelector.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2023 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// Frame for select tags
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
29class GNEFrame;
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
34
37 FXDECLARE(GNETagSelector)
38
39public:
41 GNETagSelector(GNEFrame* frameParent, GNETagProperties::TagType type, SumoXMLTag tag, bool onlyDrawables = true);
42
45
47 void showTagSelector();
48
50 void hideTagSelector();
51
54
57
59 void setCurrentTagType(GNETagProperties::TagType tagType, const bool onlyDrawables, const bool notifyFrameParent = true);
60
62 void setCurrentTag(SumoXMLTag newTag, const bool notifyFrameParent = true);
63
65 void refreshTagSelector();
66
70 long onCmdSelectTag(FXObject*, FXSelector, void*);
72
73protected:
75 FOX_CONSTRUCTOR(GNETagSelector)
76
77private:
78 class ACTemplate {
79
80 public:
82 ACTemplate(GNENet* net, const GNETagProperties tagProperty);
83
86
89
90 private:
93
95 ACTemplate(const ACTemplate&) = delete;
96
98 ACTemplate& operator=(const ACTemplate& src) = delete;
99 };
100
103
106
109
112
114 std::vector<ACTemplate*> myACTemplates;
115};
SumoXMLTag
Numbers representing SUMO-XML - element names.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
ACTemplate & operator=(const ACTemplate &src)=delete
Invalidated assignment operator.
GNEAttributeCarrier * myAC
editedAC
GNEAttributeCarrier * getAC() const
get template AC
ACTemplate(const ACTemplate &)=delete
Invalidated copy constructor.
GNETagProperties::TagType myTagType
current tagType
MFXComboBoxIcon * myTagsMatchBox
comboBox with the tags
GNEAttributeCarrier * myCurrentTemplateAC
current templateAC;
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
void showTagSelector()
show item selector
GNEAttributeCarrier * getTemplateAC(SumoXMLTag ACTag) const
get templateAC
long onCmdSelectTag(FXObject *, FXSelector, void *)
GNEFrame * myFrameParent
pointer to Frame Parent
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
void setCurrentTagType(GNETagProperties::TagType tagType, const bool onlyDrawables, const bool notifyFrameParent=true)
set current type manually
void hideTagSelector()
hide item selector
std::vector< ACTemplate * > myACTemplates
list with ACTemplates
~GNETagSelector()
destructor
void setCurrentTag(SumoXMLTag newTag, const bool notifyFrameParent=true)
set current type manually
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)