Eclipse SUMO - Simulation of Urban MObility
GNEMatchAttribute.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-2024 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 // The Widget for modifying selections of network-elements
19 // (some elements adapted from GUIDialog_GLChosenEditor)
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 #include "GNEElementSet.h"
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
29 
32  FXDECLARE(GNEMatchAttribute)
33 
34 public:
36  GNEMatchAttribute(GNEElementSet* elementSet, SumoXMLTag defaultTag, SumoXMLAttr defaultAttr, const std::string& defaultValue);
37 
40 
42  void enableMatchAttribute();
43 
45  void disableMatchAttribute();
46 
48  void showMatchAttribute(const GNEElementSet::Type type);
49 
51  void hideMatchAttribute();
52 
55 
59  long onCmdSelMBTag(FXObject*, FXSelector, void*);
60 
64  long onCmdSelMBAttribute(FXObject*, FXSelector, void*);
65 
69  long onCmdSelMBString(FXObject*, FXSelector, void*);
70 
74  long onCmdHelp(FXObject*, FXSelector, void*);
75 
77 
78 protected:
80  FOX_CONSTRUCTOR(GNEMatchAttribute)
81 
82 
83  void updateTag();
84 
86  void updateAttribute();
87 
88 private:
91 
94 
97 
100 
103 
105  FXTextField* myMatchString;
106 
109 
111  std::vector<GNETagProperties> myTagPropertiesString;
112 
115 
118 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Type
FOX-declaration.
Definition: GNEElementSet.h:42
void showMatchAttribute(const GNEElementSet::Type type)
show match attributes
~GNEMatchAttribute()
destructor
MFXComboBoxIcon * myMatchAttrComboBox
attributes of the match box
FXButton * myMatchStringButton
match string button
SumoXMLAttr myCurrentAttribute
current SumoXMLTag Attribute
GNEElementSet * myElementSet
pointer to element set Parent
MFXComboBoxIcon * myMatchTagComboBox
tag of the match box
void updateTag()
FOX need this.
std::vector< GNETagProperties > myTagPropertiesString
vector with tagProperties
GNEMatchAttribute(GNEElementSet *elementSet, SumoXMLTag defaultTag, SumoXMLAttr defaultAttr, const std::string &defaultValue)
FOX-declaration.
GNEMatchAttribute & operator=(const GNEMatchAttribute &)=delete
Invalidated assignment operator.
void updateAttribute()
update attribute
GNEMatchAttribute(const GNEMatchAttribute &)=delete
Invalidated copy constructor.
FXTextField * myMatchString
string of the match
void hideMatchAttribute()
hide match attributes
long onCmdSelMBTag(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
long onCmdSelMBString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
long onCmdSelMBAttribute(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
void enableMatchAttribute()
enable match attributes
void disableMatchAttribute()
disable match attributes
SumoXMLTag myCurrentTag
current SumoXMLTag tag
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)